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, 212 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 - How to Google Ads on your nuke site... [ ]
 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
luchtzak
Support Mod
Support Mod


Joined: Mar 19, 2003
Posts: 308


PostPosted: Tue Sep 20, 2005 5:29 am Reply with quoteBack to top

ldude69000 wrote:
lol look at mine! www.airsoftstim.com ALL THE BLANC ads i've tried everythign! Sad


I am sorry but your website doesn't seem to work properly...

_________________
Luchtzak Aviation - Snookerforum Belgium
Find all posts by luchtzakView user's profileSend private messageVisit poster's website
ishtar
Sergeant
Sergeant


Joined: Jun 19, 2005
Posts: 96

Location: Suriname

PostPosted: Thu Sep 22, 2005 9:24 am Reply with quoteBack to top

ive put my adsense code in the information area.

check it out

www.metalsuriname.com
Find all posts by ishtarView user's profileSend private messageMSN Messenger
luchtzak
Support Mod
Support Mod


Joined: Mar 19, 2003
Posts: 308


PostPosted: Fri Sep 23, 2005 1:56 am Reply with quoteBack to top

ishtar wrote:
ive put my adsense code in the information area.

check it out

www.metalsuriname.com


I just checked the sourcecode of your website but no sign of Google Adsense code.... You should re-upload your changed file and try again.

_________________
Luchtzak Aviation - Snookerforum Belgium
Find all posts by luchtzakView user's profileSend private messageVisit poster's website
frankie_32
Nuke Cadet
Nuke Cadet


Joined: Jul 27, 2004
Posts: 1


PostPosted: Thu Sep 29, 2005 1:03 pm Reply with quoteBack to top

I am running several themes as well, the way I coded my side block
was like this:

Code:

<?php
   if (eregi("block-googleads.php",$PHP_SELF)) {
       Header("Location: index.php");
       die();
   }

$ThemeSel = get_theme();

include("themes/$ThemeSel/adsense.js");

$content .= "<center><script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">";
$content .= "</script></center>";

?>


Then in each html/themes/named_theme I added a file 'adsense.js'
with your sites adsense code to match theme colors eg:
Code:

<script type="text/javascript">
<!--
google_ad_client = "pub-aaaaaaaaaaaaaaaa";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "text_image";
google_color_border = "f6f6eb";
google_color_bg = "d8d8c4";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
// -->
</script>


This way you don't have escape any of the adsense code.

Hope this can help someone.



dilligaf wrote:
I'm adding just a little update to this code.

If you are like me and have different themes for your site, especially themes that vary in colour, and your Adsense banner looks OK in one theme but crap in the others, I have come up with a solution!!

By simply using the bgcolor of the theme it will now change the colour of your Adsense banner.

Another thing you can do is to make a new file in your root-folder called googleads.php with this in it:

then in the module you like behind:

include("header.php");

add

include("googleads.php");


Just add two new lines to your code and change two other lines (plus all the php echo's)

Code:

<?php
global $bgcolor3, $bgcolor1;
$bgcolour3 = substr(strrchr($bgcolor3,"#"),1);
$bgcolour1 = substr(strrchr($bgcolor1,'#'),1);
echo "<center><script type=\"text/javascript\"><!--\n"
."google_ad_client = \"pub-your_adsense_number\";\n"
."google_ad_width = 468;\n"
."google_ad_height = 60;\n"
."google_ad_format = \"468x60_as\";\n"
."google_ad_type = \"text_image\";\n"
."google_color_border = \"$bgcolour3\";\n"
."google_color_bg = \"$bgcolour1\";\n"
."google_color_link = \"336699\";\n"
."google_color_url = \"000000\";\n"
."google_color_text = \"000000\";\n"
."//--></script>\n"
."<script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">\n"
."</script></center>";
?>


Obviously width, height, format, type and channel are left up to your own preferences as the code above has mine.

Now I hear you say "Why don't you just add $bgcolor1 instead of changing it?"

Well Adsense colours do not like the '#' in front of them so we have to strip them out.
Now one could go a step further and replace the link, url and text colours to if they want to but this was enough for my liking.
Now when anyone changes the theme, the Adsense banner will match.

And remember the '<?" and '?>' at the top and bottom. Since we are using php variables this code now has to be written in php.

Anyhow let me know if you like/dislike.[/quote]
Find all posts by frankie_32View user's profileSend private messageVisit poster's website
luchtzak
Support Mod
Support Mod


Joined: Mar 19, 2003
Posts: 308


PostPosted: Fri Sep 30, 2005 12:58 am Reply with quoteBack to top

Very nice addition Franky! It's perfect for people who have multiple themes!

_________________
Luchtzak Aviation - Snookerforum Belgium
Find all posts by luchtzakView user's profileSend private messageVisit poster's website
Hadriel
Nuke Cadet
Nuke Cadet


Joined: Dec 31, 2004
Posts: 2


PostPosted: Tue Oct 11, 2005 9:09 pm Reply with quoteBack to top

Has anyone figured out how to make a block with 2 of the sqaures side by side?

Some blogs have it when you read their articles, just was curious if anyone has done that yet.

Thanks
Find all posts by HadrielView user's profileSend private message
Patro
Corporal
Corporal


Joined: May 26, 2005
Posts: 69

Location: Singapore

PostPosted: Thu Nov 03, 2005 4:21 am Reply with quoteBack to top

I'm having a hard time just figuring out how to get ads on my site.

The instructions in the first post aren't clear to me at all.

After reading other posts, what I have done is downloaded a txt file called "block-googleads120by600". It looks like this:

<?php
if (eregi("block-googleads120by600.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}

?>
<script language="JavaScript">
<!--
google_ad_client = 'pub-NUMBER HERE';
google_alternate_ad_url = "http://www.nukebling.com/google/120600.php";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = '120X600_as';
google_ad_channel ="";
google_page_url = document.location;
google_color_border = "660000";
google_color_bg = "7D2626";
google_color_link = "FFFFFF";
google_color_url = "DAA520";
google_color_text = "BDB76B";
// -->
</script>

Then I uploaded this file to my 'includes' folder. So far is this correct? What do I do next? I only have one theme.

Thanks.

_________________
Everybody has their own agenda.
Find all posts by PatroView user's profileSend private message
webshark
Sergeant
Sergeant


Joined: Apr 21, 2005
Posts: 106


PostPosted: Thu Nov 03, 2005 6:48 am Reply with quoteBack to top

just save it as block-googleads120by600.php in your blocks folder

make the adjustments your pub icolours etc.

upload it to your host
than login your admin panel / blocks and chose it from drop down box and activate your block

_________________
Image
Find all posts by websharkView user's profileSend private messageVisit poster's website
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12482


PostPosted: Thu Nov 03, 2005 2:32 pm Reply with quoteBack to top

That block won't quite work because it does not put the output into the $content variable

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
Patro
Corporal
Corporal


Joined: May 26, 2005
Posts: 69

Location: Singapore

PostPosted: Wed Nov 09, 2005 3:11 am Reply with quoteBack to top

Evaders, can you paste the block I need to use here? And tell me where to upload it...thanks.

_________________
Everybody has their own agenda.
Find all posts by PatroView user's profileSend private message
jasvanth
Nuke Soldier
Nuke Soldier


Joined: Jan 27, 2006
Posts: 14


PostPosted: Sat Jun 10, 2006 5:14 pm Reply with quoteBack to top

any chance you guys can do something like thjis forclicksor. btw how do i add it in the footer through phpmyadmin, im lost here
Find all posts by jasvanthView 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.042 Seconds - 87 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::