| Author |
Post |
|
|
#1 Mon Oct 09, 2006 5:38 am
|
|
Member
Registered: Oct 2006
Posts: 37
|
Hello there. Can anyone modify the template code to display adsense under the first post only. I have tried to modify the code but it displays adsense under every replies too. Googe don`t allow to have more than 2 adsense ads on one page. This have what I need. I don`t know how he has done it. http://www.accommodation-forum.com/czech-republic/in-the-drug-store/Please help me to modify the code. Any ideas? 
|
|
|
#2 Mon Oct 09, 2006 4:52 pm
|
|
Developer
Registered: Apr 2004
Posts: 2218
Location: Belgium
|
This is not possible in v1 by modifying templates... You need to edit the PHP code for that.
|
|
|
#3 Mon Oct 09, 2006 5:05 pm
|
|
Member
Registered: Oct 2006
Posts: 37
|
Ok.. It`s maybe difficult to do that or what? If you can do it for me it will be a big help..  Otherwise no problem.. I can wait until the next version release.. Thank you for your reply..
|
|
|
#4 Mon Oct 09, 2006 5:06 pm
|
|
Member
Registered: Oct 2006
Posts: 37
|
I don`t think I can find a release date for the next version.. or version 2.0 Do you have any idea for when it will be released? 
|
|
|
#5 Mon Oct 09, 2006 5:22 pm
|
|
Member
Registered: Apr 2004
Posts: 192
Location: Brussels Belgium
|
When its ready 
|
|
|
#6 Mon Oct 09, 2006 5:43 pm
|
|
Member
Registered: Apr 2004
Posts: 192
Location: Brussels Belgium
|
This seems to work  In file topic.php line 430 after 'poster_ip_addr' => ( !empty($postsdata['poster_ip_addr']) && $functions->get_user_level() == LEVEL_ADMIN ) ? sprintf($template->get_config('poster_ip_addr_format'), sprintf($lang['ViewingIP'], '<a href="'.$functions->make_url('admin.php', array('act' => 'iplookup', 'ip' => $postsdata['poster_ip_addr'])).'">'.$postsdata['poster_ip_addr'].'</a>')) : '', 'colornum' => $colornum )); add /* Google Ad Mod Copyright Vandamme Samuel */ if ( $i == 1 ) { $template->parse('googlead', 'topic'); } Open file templates/[yourtemplate]/topic.tpl.php and goto the end of the file. Before ?> add $templates['googlead'] = 'YOUR GOOGLE STUFF HERE'; (Shortest mod ever!)« Last edit by Samuel on Mon Oct 09, 2006 6:55 pm. »
|
|
|
#7 Mon Oct 09, 2006 6:50 pm
|
|
Member
Registered: Oct 2006
Posts: 37
|
Thanks for the hack. But it seems to there are some errors.
I get this error message:
In file template.php on line 117:
E_USER_ERROR - Unable to load googlead templates file for set "default"!
|
|
|
#8 Mon Oct 09, 2006 6:53 pm
|
|
Member
Registered: Oct 2006
Posts: 37
|
Samuel wrote When its ready 
Ok.. Maybe I had to ask another question.. Do you have any idea for when it will be ready? 
|
|
|
#9 Mon Oct 09, 2006 6:54 pm
|
|
Member
Registered: Apr 2004
Posts: 192
Location: Brussels Belgium
|
Right  I fixed this in my own code but somehow I copy pasted the old code here. /* Google Ad Mod Copyright Vandamme Samuel */ if ( $i == 1 ) { $template->parse('googlead', 'topic'); } this should fix it  I really cant say, probably at the end of 2007
|
|
|
#10 Mon Oct 09, 2006 7:11 pm
|
|
Developer
Registered: Apr 2004
Posts: 2218
Location: Belgium
|
sarangan wrote Samuel wrote When its ready 
Ok.. Maybe I had to ask another question.. Do you have any idea for when it will be ready? 
See http://www.usebb.net/community/topic-831.html.
|
|
|
#11 Mon Oct 09, 2006 9:42 pm
|
|
Member
Registered: Oct 2006
Posts: 37
|
Great hack.. It working prefectly.. Thank you for your help.. I love UseBB!  as most users do. I am looking forward to the next version.
|
|
|
#12 Wed Jan 17, 2007 12:21 pm
|
|
Member
Registered: Dec 2006
Posts: 14
|
yeh its working man
|