Jump to content

(NB40) Ads After X Posts

newbie LAC

Recommended Posts

  • 1 month later...
13 hours ago, BABOO2018 said:

I have 5 random ads to be shown after 2nd post. How do I ransomize them? 

I use a javascript for that:

<script language="JavaScript"><!--

//Javascript Created by Computerhope http://www.computerhope.com

//store the quotations in arrays

images = new Array(5);

images[0] = "<a href = 'https://www.example.com'><img src='https://www.example.com/banner1.jpg' alt='Alt Text'></a>";

images[1] = "<a href = 'https://www.example.com'><img src='https://www.example.com/banner2.jpg' alt='Alt Text'></a>";

images[2] = "<a href = 'https://www.example.com'><img src='https://www.example.com/banner3.jpg' alt='Alt Text'></a>";

images[3] = "<a href = 'https://www.example.com'><img src='https://www.example.com/banner4.jpg' alt='Alt Text'></a>";

images[4] = "<a href = 'https://www.example.com'><img src='https://www.example.com/banner5.jpg' alt='Alt Text'></a>";

index = Math.floor(Math.random() * images.length);



// --></script>

You just create an ad using this code and change to suit you. Cheers

Link to comment
Share on other sites

  • 1 month later...

Hi @newbie LAC. Pretty awesome plug-in, thank you! Can you please elaborate on what "I" does in the plug-in pid settings? Also, I am trying to make it so an ad appears just before the last updated/added post in a thread, regardless of position. For direct links to the last updated post in a thread, I can directly link to the thread with "?do=getNewComment" appended to the query string. 

Edited by 33andrain
Link to comment
Share on other sites

1 hour ago, newbie LAC said:


"l" is last post. Start read from here

Thanks. My apologies for missing this exchange in my research. I am still not having any luck and I am sure I am just doing something silly. Would appreciate your assistance. Attached are my settings for the plugin now, however by going here, you can see I am still not seeing the ad after the last post in the thread.

I am trying to show an ad after the first post of each page, and then an ad before the last post in each thread.


Screenshot 2018-04-29 06.41.55.png

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...
  • 4 weeks later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...