Google Adsense

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Google Adsense
echo
CZ Wiz
 Codezwiz Site Donator
Gender: Male
Status: Offline
Joined: Oct 04, 2003
0.15 posts per day
Posts: 1147
Points: 93
   
Hey everyone, I am curious about the Google AdSense block, I filled out the application on google, after I recieve the code or whatever they send me do I just paste it into notepad and name it: block-something.php or is there some uber trick I need to know? Thanks,
echo



Back to top Reply with quote
#2   re: Google Adsense
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.71 posts per day
Posts: 5530
Points: 481,695
   
use the block creator in the web tools links and name it block-Googleorwhatever.php


taut



Back to top Reply with quote
#3   
Purus
CZ Super Newbie
Purus has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Occupation: Student
Gender: Male
Fav. Sports Team: US Junior Orienteering Team
Website:
Status: Offline
Joined: Dec 28, 2003
0.01 posts per day
Posts: 62
Points: 2,591
   
There is already a fabulous Adsense block available. You can download it [ Register or login to view links on this board.] . All you have to do is insert your usernumber and activate the block and it will start displaying your ads.




_________________
[ Register or login to view links on this board.] | [ Register or login to view links on this board.]
Back to top Reply with quote
#4   re: Google Adsense
echo
CZ Wiz
 Codezwiz Site Donator
Gender: Male
Status: Offline
Joined: Oct 04, 2003
0.15 posts per day
Posts: 1147
Points: 93
   
Thanks to both of you, about that one you download, it's set to a pre-size block. What would I edit in this code to make it horizontal instead of vertical?

<?php

/************************************************************************/
/* GoogleAdsense Block                                                  */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2003 by Tyler Mammone                                  */
/* http://www.vie4life.com                                              */
/*                                                                      */
/*                                                                      */
/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2003 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/************************************************************************/
/*                                                                      */
/* If you don't have an account, go to http://www.google.com/adsense    */
/* and sign up.  After you are approved create a new Ad Layout for a    */
/* 120x600 Skyscraper.  Copy the google_ad_client variable from the     */
/* html code the google site gives you, and enter it below.  You may    */
/* configure the following 7 variables to better suit your website.     */
/*                                                                      */
/* Save and upload this file into your /blocks folder.                  */
/*                                                                      */
$ number_of_ads_to_show = "2";
/*                                                                      */
$ google_color_border = "216BB0";
/*                                                                      */
$ google_color_bg = "000000";
/*                                                                      */
$ google_color_link = "FFFFFF";
/*                                                                      */
$ google_color_url = "216BB0";
/*                                                                      */
$ google_color_text = "FFFFFF";
/*                                                                      */
$ google_ad_client = "pub-9839777177813177";
/*                                                                      */
/************************************************************************/
/************************************************************************/
/*                   DO NOT EDIT BELOW THIS LINE                        */
/************************************************************************/
/************************************************************************/

if (e r e g i("block-GoogleAdSense.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}
if ($ number_of_ads_to_show == 1) { $ad_height = 162; }
elseif ($number_of_ads_to_show == 2) { $ad_height = 308; }
elseif ($number_of_ads_to_show == 3) { $ad_height = 454; }
elseif ($number_of_ads_to_show == 4) { $ad_height = 600; }
$ content .= "<center><script type=\"text/javascript\"><!--\n"
."google_ad_client = \"$google_ad_client\";\n"
."google_ad_width = 120;\n"
."google_ad_height = $ad_height;\n"
."google_ad_format = \"120x600_as\";\n"
."google_color_border = \"$google_color_border\";\n"
."google_color_bg = \"$google_color_bg\";\n"
."google_color_link = \"$google_color_link\";\n"
."google_color_url = \"$google_color_url\";\n"
."google_color_text = \"$google_color_text\";\n"
."//--></s c r i p t>\n"
."<s c r ip t type=\"text/j a v a s c r i p t\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.j s\">\n"
."</s c r i p t></center>\n";

/************************************************************************/
/************************************************************************/
?


Thanks,
echo


Back to top Reply with quote
#5   re: Google Adsense
Purus
CZ Super Newbie
Purus has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Occupation: Student
Gender: Male
Fav. Sports Team: US Junior Orienteering Team
Website:
Status: Offline
Joined: Dec 28, 2003
0.01 posts per day
Posts: 62
Points: 2,591
   
By changing the value of "$number_of_ads_to_show", it will automatically resize the block for you to display either 1, 2, 3, or 4 of the ads that normally show with a skyscraper adblock.

If you would like to modify the width of the block, change the value of "google_ad_width". I wouldn't recommend this as 120 is the default width for blocks in Nuke.

To modify the height, either use the option above (this will set the height appropriate for the number of ads you want to show), or change the value of "google_ad_height". I would recommend leaving this as "$ad_height" though since that allows you to modify it simply using the method above.




_________________
[ Register or login to view links on this board.] | [ Register or login to view links on this board.]
Back to top Reply with quote
#6   re: Google Adsense
echo
CZ Wiz
 Codezwiz Site Donator
Gender: Male
Status: Offline
Joined: Oct 04, 2003
0.15 posts per day
Posts: 1147
Points: 93
   
Thank you, I just read the Adsence FAQ (doh!) and it answered most my questions, It says to just copy and paste the code when I get it. Now where am I pasting this code to?
Thanks,
echo



Back to top Reply with quote
#7   Re: re: Google Adsense
Purus
CZ Super Newbie
Purus has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Occupation: Student
Gender: Male
Fav. Sports Team: US Junior Orienteering Team
Website:
Status: Offline
Joined: Dec 28, 2003
0.01 posts per day
Posts: 62
Points: 2,591
   


Originally posted by echo:

Thank you, I just read the Adsence FAQ (doh!) and it answered most my questions, It says to just copy and paste the code when I get it. Now where am I pasting this code to?
Thanks,
echo


No! Don't copy an code. It is all set up in the block already. All you have to edit is:

$ google_ad_client = "pub-9839777177813177";


In the code that you found on AdSense, find your number (pub-xxxxxxxxxxx), and insert it into the block code in the place shown above.



_________________
[ Register or login to view links on this board.] | [ Register or login to view links on this board.]
Back to top Reply with quote
#8   re: Google Adsense
echo
CZ Wiz
 Codezwiz Site Donator
Gender: Male
Status: Offline
Joined: Oct 04, 2003
0.15 posts per day
Posts: 1147
Points: 93
   
Thx, but that block is ugly :P I think I will just copy the code and have it look like it is on many other sites. Thanks though,
echo



Back to top Reply with quote
#9   re: Google Adsense
rld1025
CZ Newbie
usa.gif tennessee.gif
Age: 58
Gender: Male
Status: Offline
Joined: Sep 07, 2003
0.00 posts per day
Posts: 14
Points: 2,102
AIM Address   
Hi

I have been trying to find this google adsense block for a week. When I go to download it, I get redirected to a blank page.. Can anyone please e-mail this to me or tell me where a valid place to download it is?

Thanks

Bob



Back to top Reply with quote
#10   re: Google Adsense
echo
CZ Wiz
 Codezwiz Site Donator
Gender: Male
Status: Offline
Joined: Oct 04, 2003
0.15 posts per day
Posts: 1147
Points: 93
   
Welcome to Codezwiz Bob icon_smile.gif I have attached it here, have fun!
echo



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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
You cannot attach files in this forum
You cannot download files in this forum