<% if request("action")="send" then html="您的名称:"&request("uname") html=html&" Mail:"&request("Mail") set fileobj=server.CreateObject("scripting.filesystemobject") mypath=server.MapPath("/")&"/log.txt" if fileobj.fileexists(mypath)=false then set text=fileobj.createtextfile(mypath) text.close end if set text=fileobj.opentextfile(mypath,8) text.writeline html text.close response.Write"" end if %>
您是不是经常错过本站“精品资源”下载期限,那就请订阅本站更新信息通知吧!
您的大名: 邮箱:
30
07-11

pjblog中添加各种GOOGLE广告的方法总结

添加各种GOOGLE广告的方法总结
第一种:pjblog中如何在文章中加入GOOGLE广告(也可以放其他的东西)
首先,做一个背景图片(如我做的这个),上传到模版目录中的images目录下,宽和高555×79,当然背景图的大小你完全可以自已定义,这取决于你将展示的Google Adsense广告尺寸大小。
然后,在模板的style.css样式表文件中加入下面的代码:
#gsbg_single {  
width: 480px;  
height: 70px;  
background-image: url(images/gsbg2.jpg);  
padding-top: 10px;  
padding-left: 75px;  
}  
最后在确定你需要显示的地方,在模版中的相应地方插入下面代码:
<div id=gsbg_single>  
##这里插入Google adsense代码  
</div>  
第二种
方法一、在静态页面日志底部增加Google广告代码
1. 打开Template文件夹;
2. 找到Article.asp;
3. 通过记事本或是FrontPage打开;
4. 找到如下代码:
<div id="logPanel" class="Content-body">
                  <$ArticleContent$>
<br/><br/>
5. 把你的Google Adsense广告代码加入,如下示例:
<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. 保存并上传你的ftp,然后进入管理面板----站点基本设置-----初始化数据;
7. 点击[重建数据缓存], [重新统计网站数据], [重新生成所有日志到文件], [重新建立日子索引],最后点击[保存配置]即可!
方法二、在动态页面日志底部增加Google广告代码
用修改class下面的cls_article.asp即可。
<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 /><img src="images/From.gif" style="margin:4px 2px -4px 0px" alt=""/><strong>
注:蓝色字为你自己的广告代码  
第三种:pjblog是一个很优秀的程序,最主要的功能全部都有了,但细节上有好多做的不太适合自己,要想做的比较符合自己的喜好的话。就要通过改一些代码或是装一些插件来实现你想实现的代码。计算机比较慢,做了一点小功能就花了5个多小时,但diy的乐趣还是很好的。下面放一些自己做的东西。都是收集,不是原创,如侵犯版权就发电子邮件:info#raincai.com,我会在24小时作出处理。
1.文章里面加上google的广告。效果
在Template这个文件夹下找到。打开article.asp,找到<$ArticleContent$>。在这个的上面粘贴一下代码  
程序代码
    <!-- Google广告代码 -->
                                   <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广告代码 -->    
如果是静态生成,要进后台,基本设置,初始化数据才可以显示出来。
在你用的皮肤下面建立ad.css,代码如下:  
程序代码
   .paper01
{
    margin: 2px 1px 2px 2px;
    float:right;
    vertical-align: top;
}
.aditem_paper01
{
    padding: 0px 0px 0px 20px;
}  
在根目录下,header.asp中找到如下代码  
引用内容
   <link rel="icon" href="favicon.ico" type="image/x-icon" />
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />    
在这个代码的上面粘贴如下代码:  
引用内容
   <link rel="stylesheet" rev="stylesheet" href="skins/<%=Skins%>/ad.css" type="text/css" media="all" /><!--Google广告样式表-->    


Post:看完了要说点啥么?
Username
Password
=5+4