Pjblog to add a variety of Google advertising methods Summary _ website application
Source: Internet
Author: User
Add a variety of Google advertising methods summary
The first: How to add Google ads to the article in Pjblog (and other things) First, do a background image (such as I do this), uploaded to the template directory in the images directory, wide and high 555x79, of course, the size of the background map you can completely customize, depending on the size of the Google AdSense ads you will display.
Then, add the following code to the template's Style.css style sheet file:
#gsbg_single {
width:480px;
height:70px;
Background-image:url (images/gsbg2.jpg);
padding-top:10px;
padding-left:75px;
}
Finally, when you're sure you want to display it, insert the following code in the appropriate place in the template:
<div id=gsbg_single>
# # Insert Google AdSense code here
</div>
Second Kind Method One, at the bottom of the static page log to increase the Google Advertising code
1. Open the template folder;
2. Find article.asp;
3. Open by Notepad or FrontPage;
4. Find the following code:
<div id= "Logpanel" class= "Content-body" >
< $ArticleContent $>
<br/><br/>
5. Add your Google AdSense ads code to the following example:
<div id= "Logpanel" class= "Content-body" >
< $ArticleContent $>
<br/><br/>
<script type= "Text/javascript" ><!--
Google_ad_client = "";
Google_ad_width = 300;
Google_ad_height = 250;
Google_ad_format = "300x250_as";
Google_ad_type = "text";
Google_ad_channel = "";
Google_color_border = "FFFFFF";
GOOGLE_COLOR_BG = "FFFFFF";
Google_color_link = "0000FF";
Google_color_text = "000000";
Google_color_url = "0000FF";
--></script>
<script type= "Text/javascript"
Src= "Http://pagead2.googlesyndication.com/pagead/show_ads.js"
</script>
</div>
<br/><br/>
6. Save and upload your FTP, and then enter the admin panel----site Basic settings-----initialization data;
7. Click [Rebuild Data Cache], [re-statistics website data], [rebuild all log to file], [Rebuild the day index], and finally click on [Save Configuration]!
Method Two, add the Google advertisement code at the bottom of the dynamic page log
Use the cls_article.asp below to modify the class.
<div class= "Content-body" >
<%if Len (Log_viewarr (16,0)) >0 Then Response.Write (Log_viewarr (16,0) & "<br/>")%>
<script type= "Text/javascript" ><!--
Google_ad_client = "pub-0615630542242589";
Google_ad_width = 468;
Google_ad_height = 60;
Google_ad_format = "468x60_as";
Google_ad_type = "image";
Google_ad_channel = "";
--></script>
<script type= "Text/javascript"
src= "Http://pagead2.googlesyndication.com/pagead/show_ads.js" >
</script>
<BR/><strong>
Note: The blue word for your own advertising code
The third: Pjblog is a very good program, the main function of all have, but the details of a lot of do not fit themselves, to do more in line with their preferences. You need to change some code or install some plug-ins to implement the code you want to implement. The computer is slow, it takes 5 hours to do a little function, but the fun of DIY is good. Here are some things you do. are collected, not original, such as copyright infringement on email: info#raincai.com, I will be in 24 hours to deal with.
1. The article adds Google's ads. Effect Find it under the template folder. Open article.asp and find < $ArticleContent $>. Paste the code on top of this.
Program code
<!--Google Advertising code-->
<div id= "Vad" class= "Paper01" >
<div class= "Aditem_paper01" >
<script type= "Text/javascript" ><!--
Google_ad_client = "pub-2789878711709805";
Google_ad_width = 200;
Google_ad_height = 200;
Google_ad_format = "200x200_as";
Google_ad_type = "image";
Google_ad_channel = "";
Google_color_border = "336699";
GOOGLE_COLOR_BG = "FFFFFF";
Google_color_link = "0000FF";
Google_color_text = "000000";
Google_color_url = "008000";
--></script>
<script type= "Text/javascript"
src= "Http://pagead2.googlesyndication.com/pagead/show_ads.js" >
</script>
</div></div><!--Google Advertising code-->
If it is a static generation, to the background, the basic settings, initialization data can be displayed.
Under the skin you use to create AD.CSS, the code is as follows:
Program code
. Paper01
{
margin:2px 1px 2px 2px;
Float:right;
Vertical-align:top;
}
. Aditem_paper01
{
padding:0px 0px 0px 20px;
}
In the root directory, the following code is found in header.asp
Reference content
<link rel= "icon" href= "Favicon.ico" type= "Image/x-icon"/>
<link rel= "shortcut icon" href= "Favicon.ico" type= "Image/x-icon"/>
Paste the following code on top of this code:
Reference content
<link rel= "stylesheet" rev= "stylesheet" href= "Skins/<%=skins%>/ad.css" type= "Text/css" media= "All"/> <!--Google Advertising style sheet-->
All this is done. Hey..
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.