广告联盟网

 找回密码
 注册
查看: 382|回复: 5
打印 上一主题 下一主题

Google广告与DZ论坛完美结合教程

[复制链接]
跳转到指定楼层
1#
发表于 2007-4-26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
新人,秀一下糟烂的水平:P<br /><br /><br /><font color="#0000ff">Google广告与论坛完美结合教程</font><br /><br /><br /><br />5.5的广告位置很多了,可是放google广告还是觉得不爽<img src="images/smilies/cry.gif" smilieid="11" border="0" alt="" /> <br /><br /><br />只好自己琢磨代码。方法很简单<img src="images/smilies/shocked.gif" smilieid="7" border="0" alt="" /> <br /><br /><br />演示:首页 <font color="#154ba0">http://www.xxxx.com/bbs</font><br /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;内页 <font color="#154ba0">http://www.xxxx.com/bbs/viewthread.php?tid=1106&amp;extra=page%3D1</font>&nbsp; &nbsp;&nbsp; &nbsp;这个我还是放在最后了,兄弟们可以放在前面:)<br /><br /><br />首页修改方法:<br /><br />1.进后台——论坛管理——模版编辑<br />2.你正在使用哪个模版就点击它右边的“详情”<br />3.找到discuz(如果没有,就去默认模版里面找),点后面的“编辑” (如果不能编辑,先去ftp修改文件属性)<br />4.在你认为合适的位置加入下文提供的代码格式,我的是这样的:找到<br><br><div class="msgbody"><div class="msgheader"><div class="right"><a href="###" class="smalltxt" onclick="copycode($('code0'));">[Copy to clipboard]</a> <a class="smalltxt" href="###" onclick="toggle_collapse('code0');">[ <span id="code0_symbol">-</span> ]</a></div>CODE:</div><div class="msgborder" id="code0">&lt;!--{if $whosonlinestatus}--&gt;</div></div><br>在前面加入<br><br><div class="msgbody"><div class="msgheader"><div class="right"><a href="###" class="smalltxt" onclick="copycode($('code1'));">[Copy to clipboard]</a> <a class="smalltxt" href="###" onclick="toggle_collapse('code1');">[ <span id="code1_symbol">-</span> ]</a></div>CODE:</div><div class="msgborder" id="code1">&lt;tbody&gt;<br />&lt;tr&gt;<br />&lt;td colspan=&quot;3&quot; class=&quot;header&quot;&gt;&lt;span class=&quot;bold&quot;&gt;赞助商链接&lt;/span&gt;<br />&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;<br />&lt;tbody&gt;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &lt;tr class=&quot;row&quot; onMouseOver=&quot;this.style.backgroundColor='{ALTBG1}'&quot; onMouseOut=&quot;this.style.backgroundColor='{ALTBG2}'&quot;&gt;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &lt;td width=&quot;5%&quot; align=&quot;center&quot; valign=&quot;middle&quot;&gt;&lt;img src=&quot;{IMGDIR}/supe_updateusers.gif&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;<br />&lt;td width=&quot;95%&quot; colspan=&quot;2&quot; valign=&quot;middle&quot; style=&quot;word-break: keep-all&quot;&gt;<br />&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--<br />google_ad_client = &quot;pub-xxxx&quot;;<br />google_ad_width = 728;<br />google_ad_height = 90;<br />google_ad_format = &quot;728x90_as&quot;;<br />google_ad_type = &quot;text_image&quot;;<br />//2007-04-25: sample<br />google_ad_channel = &quot;1605672121&quot;;<br />google_color_border = &quot;FFFFFF&quot;;<br />google_color_bg = &quot;FFFFFF&quot;;<br />google_color_link = &quot;0000FF&quot;;<br />google_color_text = &quot;000000&quot;;<br />google_color_url = &quot;008000&quot;;<br />//--&gt;<br />&lt;/script&gt;<br />&lt;script type=&quot;text/javascript&quot;<br />&nbsp;&nbsp;src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;<br />&lt;/script&gt;<br />&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--<br />google_ad_client = &quot;pub-xxxx&quot;;<br />google_ad_width = 180;<br />google_ad_height = 90;<br />google_ad_format = &quot;180x90_0ads_al_s&quot;;<br />//2007-04-25: sample<br />google_ad_channel = &quot;1605672121&quot;;<br />google_color_border = &quot;FFFFFF&quot;;<br />google_color_bg = &quot;FFFFFF&quot;;<br />google_color_link = &quot;000000&quot;;<br />google_color_text = &quot;000000&quot;;<br />google_color_url = &quot;008000&quot;;<br />//--&gt;<br />&lt;/script&gt;<br />&lt;script type=&quot;text/javascript&quot;<br />&nbsp;&nbsp;src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;<br />&lt;/script&gt;<br />&lt;/td&gt;&lt;/tr&gt;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &lt;/tbody&gt;</div></div><br>5.更新缓存,搞定<br /><br /><br /><br /><br /><br /><br />内页修改方法:<br /><br />1.进后台——论坛管理——模版编辑<br />2.你正在使用哪个模版就点击它右边的“详情”<br />3.找到forumdisplay和viewthread(如果没有,就去默认模版里面找),点后面的“编辑” (如果不能编辑,先去ftp修改文件属性)<br />4.在你认为合适的位置加入下文提供的代码格式<br><br><div class="msgbody"><div class="msgheader"><div class="right"><a href="###" class="smalltxt" onclick="copycode($('code2'));">[Copy to clipboard]</a> <a class="smalltxt" href="###" onclick="toggle_collapse('code2');">[ <span id="code2_symbol">-</span> ]</a></div>CODE:</div><div class="msgborder" id="code2">&lt;div class=&quot;maintable&quot;&gt;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;div class=&quot;spaceborder&quot; style=&quot;width: {TABLEWIDTH}&quot;&gt;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;table cellspacing=&quot;{INNERBORDERWIDTH}&quot; cellpadding=&quot;{TABLESPACE}&quot; width=&quot;100%&quot; align=&quot;center&quot;&gt;<br />&lt;tr&gt;<br />&lt;td colspan=&quot;3&quot; class=&quot;header&quot;&gt;&lt;span class=&quot;bold&quot;&gt;赞助商链接&lt;/span&gt;<br />&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;<br />&lt;tbody&gt;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &lt;tr class=&quot;row&quot; onMouseOver=&quot;this.style.backgroundColor='{ALTBG1}'&quot; onMouseOut=&quot;this.style.backgroundColor='{ALTBG2}'&quot;&gt;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &lt;td width=&quot;5%&quot; align=&quot;center&quot; valign=&quot;middle&quot;&gt;&lt;img src=&quot;{IMGDIR}/supe_updateusers.gif&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;<br />&lt;td width=&quot;95%&quot; colspan=&quot;2&quot; valign=&quot;middle&quot; style=&quot;word-break: keep-all&quot;&gt;<br />&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--<br />google_ad_client = &quot;pub-xxxx&quot;;<br />google_ad_width = 728;<br />google_ad_height = 90;<br />google_ad_format = &quot;728x90_as&quot;;<br />google_ad_type = &quot;text_image&quot;;<br />//2007-04-25: sample<br />google_ad_channel = &quot;1605672121&quot;;<br />google_color_border = &quot;FFFFFF&quot;;<br />google_color_bg = &quot;FFFFFF&quot;;<br />google_color_link = &quot;0000FF&quot;;<br />google_color_text = &quot;000000&quot;;<br />google_color_url = &quot;008000&quot;;<br />//--&gt;<br />&lt;/script&gt;<br />&lt;script type=&quot;text/javascript&quot;<br />&nbsp;&nbsp;src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;<br />&lt;/script&gt;<br />&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--<br />google_ad_client = &quot;pub-xxxx&quot;;<br />google_ad_width = 180;<br />google_ad_height = 90;<br />google_ad_format = &quot;180x90_0ads_al_s&quot;;<br />//2007-04-25: sample<br />google_ad_channel = &quot;1605672121&quot;;<br />google_color_border = &quot;FFFFFF&quot;;<br />google_color_bg = &quot;FFFFFF&quot;;<br />google_color_link = &quot;000000&quot;;<br />google_color_text = &quot;000000&quot;;<br />google_color_url = &quot;008000&quot;;<br />//--&gt;<br />&lt;/script&gt;<br />&lt;script type=&quot;text/javascript&quot;<br />&nbsp;&nbsp;src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;<br />&lt;/script&gt;<br />&lt;/td&gt;&lt;/tr&gt;<br />&lt;/table&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;</div></div><br>5.更新缓存,搞定!<img src="images/smilies/lol.gif" smilieid="12" border="0" alt="" />
2#
发表于 2007-4-26 | 只看该作者
不错学习一下!
3#
 楼主| 发表于 2007-4-26 | 只看该作者
哪里不妥或者有待完善,还请各位前辈多指教:)
4#
发表于 2007-4-26 | 只看该作者
DZ论坛就是好啊
5#
发表于 2007-4-26 | 只看该作者
一个728+128的可能结果是一个显示,一个不显示,所以未必完美
6#
发表于 2007-4-26 | 只看该作者
截图上来吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|广告联盟网  

GMT, 2024-11-20 , Processed in 0.067628 second(s), 19 queries .

Powered by Discuz! X3.2

© 2005-2021 www.ggads.com GGADS 广告联盟网

快速回复 返回顶部 返回列表