You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 347 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - phpbb trick for including google adsense into articles/posts [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
foxyfemfem
Support Staff
Support Staff


Joined: Jan 23, 2003
Posts: 668

Location: USA

PostPosted: Sat Sep 10, 2005 5:37 am Reply with quoteBack to top

OPEN VIEWTOPIC.PHP

FIND:

Code:

//
// Start initial var setup
//


BEFORE ADD:

Code:

$adblocktext = <<<EOM
<tr><td colspan=2 align=center>
Insert your Google AdSense Code Here
</td></tr>
<tr><td class="spaceRow" colspan="2" height="1"><img
src="templates/subSilver/images/spacer.gif"
alt="" width="1" height="1" /></td>
</tr>
EOM;


FIND:

Code:

//
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
//
for($i = 0; $i < $total_posts; $i++)
{


AFTER ADD:

Code:

if ($i=="0") {
$adblock = $adblocktext;
} else {
$adblock = "";
}


FIND:

Code:

$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,


AFTER ADD:

Code:

'AD_BLOCK' => $adblock,


SAVE FILE

OPEN VIEWTOPIC_BODY.TPL

FIND:

Code:

<!-- END postrow -->


BEFORE ADD:

Code:

{postrow.AD_BLOCK}


SAVE FILE

Now your forums will insert whatever you wish after the first post. And yes, you can insert Javascript.

Enjoy! Remember too many google ads can be annoying to members.

_________________
If you shoot for the moon and miss, you'll still be amongst the stars.
Find all posts by foxyfemfemView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.039 Seconds - 494 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::