Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» .::.
tattoo fonts
http://www.checkoutmyink.com/category/tattoo-fonts-tattoo

Go Back   Nukemods Forum > General > Open topics

Reply
 
LinkBack Thread Tools Display Modes
Google Adsense in Forum Posts How to...
Old
  (#1 (permalink))
Member
 
Status: Offline
Posts: 450
Join Date: Jul 2004
Google Adsense in Forum Posts How to... - 11-05-2006, 09:32 AM

Ever wanted to have Google Adsense within your forums threads, heres how.

Open: modules/Forums/viewtopic.php:
Find:
Code:
//
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
//
Right under that is the statement that begins the looping through the posts:
Code:
for($i = 0; $i < $total_posts; $i++)
{
Under that code add:
Code:
if ($i=="0") {
$adblock = $adblocktext;
} else {
$adblock = "";
}
Find on Line 1:
Code:
<?php
Next Line add:
Code:
$adblocktext = <<<EOM
<tr><td colspan=2 align=center>
Insert your Google AdSense Code Here
</td></tr>
EOM;
Find:
Code:
$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
Next Line add:
Code:
'AD_BLOCK' => $adblock,
Save and close.

Now go into the themes directory, and into the subdirectory of the theme you are using (i.e. themes/Your_Theme).

Open forums/viewtopic_body.tpl

Find:
Code:

Right above it, add the following:
Code:
{postrow.AD_BLOCK}
Save the file, and you're done!

Now your forums will insert related Google Adsense adverts refering to the topic, after the first post.

As with Google Adsense codes, you can edit Colors to match your theme.

If you need a Google Adsense signup : HERE

DEMO: www.gamers-crib.com


Share4Gain.com- 80% Adsense Revenue Share, no website required
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Super Moderator
 
Duke's Avatar
 
Status: Offline
Posts: 1,016
Join Date: Dec 2005
Location: Under your bed
11-05-2006, 02:19 PM

Great tutorial, thanks Marty!

BTW, have you made recent changes to your site? I seem to remember visiting before and the theme was different?

At any rate, it looks great.




My Daughter Rules!
  Send a message via AIM to Duke  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Member
 
Status: Offline
Posts: 450
Join Date: Jul 2004
11-05-2006, 05:15 PM

Just a face lift yeah.... BTW can you still do that m8 ?


Share4Gain.com- 80% Adsense Revenue Share, no website required
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#4 (permalink))
Junior Member
 
Status: Offline
Posts: 5
Join Date: Sep 2006
Location: Italy
01-07-2007, 09:00 PM

Hi dear,
I've the last version of phpnuke and your trick no have success! The banner doesn't appear... same solution?
Thanks!
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#5 (permalink))
Member
 
Status: Offline
Posts: 450
Join Date: Jul 2004
01-08-2007, 03:31 AM

Quote:
Originally Posted by PSYKKO
Hi dear,
I've the last version of phpnuke and your trick no have success! The banner doesn't appear... same solution?
Thanks!
It should work on any 7.x version including platinum & PNC

Are you sure you dont have adds blocked on your Browser ?
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#6 (permalink))
Junior Member
 
Status: Offline
Posts: 5
Join Date: Sep 2006
Location: Italy
01-08-2007, 10:41 AM

I'm very sure becouse I'm able to see the ads in home page... not in forum!
See my situation:
http://www.acspiritosanto.altervista.org/web/index.php
Thanks.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#7 (permalink))
Member
 
Status: Offline
Posts: 450
Join Date: Jul 2004
01-08-2007, 11:49 AM

Quote:
Originally Posted by PSYKKO
I'm very sure becouse I'm able to see the ads in home page... not in forum!
See my situation:
http://www.acspiritosanto.altervista.org/web/index.php
Thanks.
I looked at your source code and your google ads code is there however I think its the code you are using thats the problem, try just using the google ads code from <script> then center your firefox add.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#8 (permalink))
Junior Member
 
Status: Offline
Posts: 5
Join Date: Sep 2006
Location: Italy
01-08-2007, 01:33 PM

Doesn't work again... I think that there is same protection in this version of phpnuke. I've just delete protection in mainfile.php, about script, but nothing...

Note that the script work in a simple html page... :cry:
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Google adsense problem .... pleeeease help .... krish1234 Nuke 7.x - General 15 03-23-2007 03:01 AM
google adsense in phpnuke afghanano Nuke 7.x - General 3 06-03-2006 10:55 PM
Google Adsense. Please look ldude69000 Site design 0 09-15-2005 05:54 PM
Google Adsense David789 Site design 0 08-24-2005 10:30 AM
latest forum posts in forum index? unknown Purged Topics 3 03-24-2003 03:21 PM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31