Page 1 of 11
uCoz Community » uCoz Modules » Additional Features » How to make my ads appear in the first post in the forum?
How to make my ads appear in the first post in the forum?
khen
Posts: 436
Reputation: 13

Message # 1 | 3:10 PM
I have a forum: http://www.misamisoccidental.org/forum/. I want to make my advertisement appear below each first post of a thread in the forum. I already spent many days in using the conditional operators but I had no success.



Please help me uCoz team and all the guys out there who mastered the uCoz conditional operators.
Attachments: 0588993.jpg(26Kb)

Post edited by khen - Saturday, 2012-02-18, 3:25 PM
Sunny
Posts: 9296
Reputation: 456

Message # 2 | 10:20 AM
Add the following to 'General appearance of forum pages' before BODY:

Code
<script>  
rekPost = 0;  
</script>


Add the following to 'Appearance of entries' where you want it to appear:
Quote
<script>
rekPost = rekPost + 1;
if(rekPost == 1){document.write('advertisement');}
</script>


The red digit means the number of post. This code won't work if your advertisement is a script.

I'm not active on the forum anymore. Please contact other forum staff.
khen
Posts: 436
Reputation: 13

Message # 3 | 10:32 AM
Thank you so much for the reply Sunny. You're such a great helper. My advertisement is a script. How can I make it work?
Post edited by khen - Monday, 2012-02-20, 10:33 AM
Paradox
Posts: 3276
Reputation: 145

Message # 4 | 1:04 PM
khen,

Quote (Sunny)
This code won't work if your advertisement is a script.


You might be able to include the necessary parts of sunny's code into the one you are planning on using although I'm not 100% sure about this. What exactly is the script you are trying to use? If you go to post the full thing here on the forums don't forget to put it in a spoiler/code box. smile

Developer, Designer, Communicator.
Been here for 6 years and counting.
Visit me at alexmoloney.me.
khen
Posts: 436
Reputation: 13

Message # 5 | 11:08 AM
Paradox, I'm using the Google Adsense script. How is it possible to appear my Google ads the within the provided script of Sunny.

Added (2012-02-25, 5:08 AM)
---------------------------------------------
How is it possible to appear my Google adsense script within the provided script of Sunny?


Post edited by khen - Monday, 2012-02-20, 1:32 PM
PixelKhaos
Posts: 636
Reputation: 26

Message # 6 | 1:59 PM
You could make it appear on every post easily.
Proud uCoz user since 2006
Freelance designer - http://pixelkhaos.com
PixelKhaos on twitter - @PixelKhaos

I can help you develop your site for a small fee.
khen
Posts: 436
Reputation: 13

Message # 7 | 1:56 AM
I don't want to make it appear in every post. What I want is to appear the ad in the FIRST POST ONLY (thread starter's first post). But how? Please help.
Sunny
Posts: 9296
Reputation: 456

Message # 8 | 2:20 PM
Quote (Sunny)
{document.write('advertisement');}

Unfortunately I am not a coder, all I can say is that you need to edit this part above.

You can also try the following codes:

- add this to Appearance of entries, to the bottom of the template:

Code
<div class="advert">ADVERTISEMENT</div>


- add to the following to General appearance of forum pages:

Code
<style>  
.advert{display:none}  
.postFirst .advert{display:block !important}  
</style>

I'm not active on the forum anymore. Please contact other forum staff.
khen
Posts: 436
Reputation: 13

Message # 9 | 3:10 PM
Sunny, thanks for your great help. I followed your second suggestion and it works now!... biggrin
uCoz Community » uCoz Modules » Additional Features » How to make my ads appear in the first post in the forum?
Page 1 of 11
Search: