Topic RSS
/* —————————————————
sf_hook_last_post($forumid, $topicid)
Inserts content at the bottom of a topics last post Ð
immediately after the users signature (if used). The
FORUM ID and the TOPIC ID are passed into the hook.
Introduced in version 3.1.2
—————————————————— */
function sf_hook_last_post($forumid, $topcid)
{
return '';
}
$adsense='<script type="text/javascript"><!–
google_ad_client = "pub-9642497531158180";
/* 468x60, created 6/29/08 */
google_ad_slot = "9396562676";
google_ad_width = 468;
google_ad_height = 60;
//–>
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>’;
return $adsense
you have to put the code in the hook function where you want it to appear…
function sf_hook_last_post($forumid, $topcid)
{
$adsense='<script type=”text/javascript”><!–
google_ad_client = “pub-9642497531158180″;
/* 468×60, created 6/29/08 */
google_ad_slot = “9396562676″;
google_ad_width = 468;
google_ad_height = 60;
//–>
</script>
<script type=”text/javascript”
src=”http://pagead2.googlesyndicati…..rdquo;>
</script>’;
return $adsense
}
watch the quotes again…
are you sure you have the single and double quotes correct? that is hand typed and not cut and paste? just tested it too…
and are you sure thats the hook you want to use? that only outputs the code on a topic page after the last post in the topic…
I want to use a hook where it is under every single post I believe. At this moment I'm more or less trying to get one to work and then I can move it to another if needed.
I typed it myself and it's not working. I can copy/paste the adsense code right, just not everything else?
when cutting and pasting from the forum, chars like ‘ and ” may get screwed up…
so you view a topic page? one with a bunch of posts? and there was no adsense after the last post? do you have an adblocker on? hell, just to test dont bother with adsense… just return ‘my hook stuff’ and look for your text string until its working…
The line changes every time it seems but here's the error
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/content/d/a/n/dantheman42501/html/wp-content/plugins/simple-forum/forum/hooks/sf-hook-template.php on line 288
Most Users Ever Online: 444
Currently Online: ptomislav, steve.engelking
73 Guest(s)
Currently Browsing this Page:
2 Guest(s)
Top Posters:
-Radio-: 1251
Lee H: 606
Luffer: 535
Conrad_Farlow: 502
jim: 478
neon: 263
ovizii: 240
Tal: 240
Member Stats:
Guest Posters: 2625
Members: 7361
Moderators: 1
Admins: 2
Forum Stats:
Groups: 5
Forums: 16
Topics: 10890
Posts: 79543
Newest Members: ndc, MacBravO, irlandes1, triphop, betokan, Jonathan Yovani Muñoz, somosguatemala, ahcreate, eatonrabbit, prasanna
Moderators: Brandon C (162)
Administrators: Yellow Swordfish (22223), Mr Papa (23688)
Log In
Register
Home
Add Reply
Add Topic
Offline
Quote




Visit 
Privacy Policy



