Topic RSS
Can anyboy help me please?
I'ts the first time I try to add adsense to my forum but I've got this error:
Parse error: syntax error, unexpected '}' in /home/manuel/public_html/wp-content/plugins/simple-forum/forum/hooks/sf-hook-template.php on line 240
The code I have added is:
function sf_hook_post_topic($forumid, $topicid)
{
$adsense='<script type="text/javascript"><!–
google_ad_client = "pub-3617166114262860";
/* 200x200, creado 16/07/10 */
google_ad_slot = "7621746195";
google_ad_width = 200;
google_ad_height = 200;
//–>
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndicati…..how_ads.js">
</script>';
return $adsense
}
Thanks for your help!
9:41 pm
Hi, I want to put the adsens on the right side of every post. My code is like this:
sf_hook_post_content()
{
$adsense='<script type="text/javascript"><!–
google_ad_client = "pub-XXXXXXXXXXXXXXX";
/* 250x250, criado 18/04/10 */
google_ad_slot = "XXXXXXXXXX";
google_ad_width = 250;
google_ad_height = 250;
//–>
</script>
<script type="text/javascript"
src="http://pagead2……..ow_ads.js">
</script>';
return $adsense;
}
Displays content after any text belonging to the
WordPress page but prior to the start of forum display.
This will display on all forum views
—————————————————— */
function sf_hook_post_content()
{
return '';
}
And an error apperas:
Parse error: syntax error, unexpected '=' in E:home…..simple-forumforumhookssf-hook-template.php on line 131
Can you help me plz?
not sure what you have posted… you dont call the function… you put your code inside it… after copying the hook.txt file to .php file as detailed in file and on wiki…
so change
function sf_hook_post_content()
{
return '';
}to
function sf_hook_post_content()
{
$adsense='<script type="text/javascript"><!–
google_ad_client = "pub-XXXXXXXXXXXXXXX";
/* 250x250, criado 18/04/10 */
google_ad_slot = "XXXXXXXXXX";
google_ad_width = 250;
google_ad_height = 250;
//–>
</script>
<script type="text/javascript"
src="http://pagead2……..ow_ads.js">
</script>';
return $adsense;
}3:57 pm
thx, it worked but, the place where the ad is appearing is wrong. I want to show the ad like this, on the right side of every post.
___________
| |
| Ad Here |
| |
|__________|
4:17 pm
I discovered myself, it must be put on the 'function sf_hook_pre_post'. Thx a lot!
10:55 am
sf-hook-template.php ı prepare this file and sending here ;
simple-forum/forum/hooks
but not work adsense code and page,
Where is send this sf-hook-template.php
have you read the instructions? our wiki has details on how to use the hooks…
but simplistically…
1) rename the sf-hook-template.txt to sf-hook-template.php
2) find the hook (determines the location) you want to use
3) add your hook code. it should return the result, not echo it
There are dozens of examples on adding adsense in this forum… have a quick search…
If you give us more details on what you want to do (what, where, etc), we can help…
Most Users Ever Online: 444
Currently Online: ptomislav, steve.engelking
58 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



