Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
Adsense code - in between forum headers
Avatar
timgunn
Guest
Guests
Feb 26, 2012 - 5:03 pm

Hello,

I know it has been done to death, but now that 5.0 is out how do I put my adsense code in between forum headers?
At the forum view section I was hoping to be able to put 720x90 ads in between these headers for example.

I'm told theres a way to do it via ad injector, but I'm not sure where to paste the random code into. Or which file I should edit in theme in order to do so.

Can somebody help?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 26, 2012 - 6:07 pm

very simple now in 5.0...  just edit your sp theme and echo the ad sense code where you want it... as always, make sure you have your own sp theme and not editing one of ours: http://codex.simple-press.com/.....g-a-theme/

you said between forum headers, so that sounds like on the group view (main page)... so you would edit the spGroupView.php template...  just write out our code, using php echo, where you want it.. you should be able to see the forum head template tag...

let us know if you have problems trying...

Avatar
timgunn
Guest
Guests
Feb 26, 2012 - 7:12 pm

Hello,

Thank you - the looks very promising.
Only when I paste it into the spgroupview.php in themes, it pasts an advert under the heading of every subsection of each 'forum'.

What I was hoping to do. For example on the main view when you have grouped into different forums. E.g a forum for gaming (ps3,xbox360 etc being the subforums) and then another forum for say...mobile phone or something (brands being the sub forums etc).

In between those points I'd like an advert. If that makes sense?

e.g:
-----------------------
Gaming Forum                                                 RSS
     ps3                                                     blah blah posted last
     xbox 360                                             same detail
-----------------------------------
Advert here
-------------------------------
Mobile Forum                                                    RSS
     Nokia                                                      blah post
     Uh, some other brand                                 etc
-----------------------------------
Advert Here

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 26, 2012 - 7:46 pm

if I follow you, put it after:

                        sp_ForumIndexSubForums('', __sp('Sub-Forums'), __sp('Browse topics in %NAME%'));
                    sp_SectionEnd('', 'forum');

Avatar
timgunn
Guest
Guests
Feb 26, 2012 - 8:10 pm

Thank you for once again being so prompt.
I meant more like this:
Image Enlarger

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 26, 2012 - 8:12 pm

ah... okay... then after this:

            sp_SectionEnd('', 'groupHeader');

dont be afraid to play around wink  you can always put it back...  let me know how that works...

Avatar
timgunn
Guest
Guests
Feb 26, 2012 - 8:18 pm

Wow Damn.
Thats awesome. Did anyone ever tell you you were awesome? I hope so. Thank you so much!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 26, 2012 - 8:21 pm

lol. thanks!  appreciate the kind words!  glad to help.

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: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620