Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Adding more than on ad between posts
Avatar
Tal
Member
Free Members
Offline
Apr 6, 2015 - 11:25 am

I've had 1 adsense ad in my forums for a while appearing after the first post based on the info at https://simple-press.com/docum.....-the-forum however if I try to use the second option to insert two ads in (after the first and 4th posts) something isn't right, I'm guessing it's just a syntax error but I don't know enough to know what it is... any suggestions?

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Apr 6, 2015 - 12:32 pm

We would need to see your code. Can you paste it here using the Code Syntax Highlighter on the toolbar?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Tal
Member
Free Members
Offline
Apr 7, 2015 - 1:13 am

I literally just changed this (which was working fine)

if($spTopicView->currentPost==1){

to this

if($spTopicView->currentPost==1) || ($spTopicView->currentPost==4){
Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Apr 7, 2015 - 3:48 am

That is incorrect I am afraid. The way you have it means the if statement has no parentheses for it's enclosing conditional statement. Should be like this:

if($spTopicView->currentPost==1 || $spTopicView->currentPost==4)

That should do the trick.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Tal
Member
Free Members
Offline
Apr 7, 2015 - 4:55 am

Thanks... you might want to update the info via the link I got it from 🙂

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Apr 7, 2015 - 5:26 am

Whoops! Apologies for that. Been corrected.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17364
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625