jianshan 发表于 2020-5-22 18:30:59

discuz论坛logo右侧添加广告位的方法教程

打开\template\default\common中的header.htm文件


搜索以下代码
<h2><!--{if !isset($_G['setting']['navlogos'][$mnid])}--><a href="./" title="$_G['setting']['bbname']">{$_G['style']['boardlogo']}</a><!--{else}-->$_G['setting']['navlogos'][$mnid]<!--{/if}--></h2>在这代码代码下面加入:


      <!--中部广告-->            
<style type="text/css">

#warpper{ position: relative; margin:0;padding:0; z-index:1000000; top:0;left:10px; float:left; }
.block{ display:block;}
.none{ display:none;}
      .tfm001 { width: 550px; }
                .tfm001 caption, .tfm001 th, .tfm001 td { vertical-align: top; padding: 7px 0; }
                        .tfm001 caption h2 { font-size: 16px; }
                        .vt th, .vt td { vertical-align: top; }
                .tfm001 th { padding-top: 9px; padding-right: 5px; width: 130px; }
                        .tfm001 th .rq { float: right; font-size: 14px; }
                        .tfm001 .pt, .tfm001 .px { margin-right: 3px; width: 330px; }
                .tfm001 .c, .tfm001 .tedt, .m_c .tfm001 .tedt { width: 338px; }
                .tfm001 .d { clear: both; margin: 5px 0; color: {LIGHTTEXT}; }
                        .tfm001 .d em { margin-left: 5px; color: red; }
                        .tfm001 .d strong { margin-left: 5px; }
                        .tfm001 .d a { color: {HIGHLIGHTLINK}; }
                .tfm001 .p { text-align: right; }
                .tfm001 .pcl label { display: block; padding: 0 2px 5px; }
                        .tfm001 .pcl .pc { margin-right: 5px; padding: 0; }
                .tfm001 .l th, .tfm001 .l td { padding-top: 0; padding-bottom: 0; }
          .tfm001 caption, .bn .tfm001 th, .bn .tfm001 td { padding-top: 5px; padding-bottom: 5px; }
</style><div id="warpper">
<!-- 推广连接 -->
<table cellspacing="0" cellpadding="0" class="tfm001">
<caption>
<font color=red>将下面链接发布到QQ群、QQ好友、博客、论坛等网络上,当别人点击的时候您的贡献值就会增加:</font>
</caption>
<tr>
<th>推广链接1</th>
<td class="pns">
<input type="text" class="px vm" value="$_G?fromuid=$_G" size="50" />
<button type="submit" class="pn vm" type="submit"><em>复制</em></button>
</td>
</tr>
<tr>
<th>推广链接2</th>
<td class="pns">
<input type="text" class="px vm" value="$_G?fromuser={echo rawurlencode($_G)}" size="50" />
<button type="submit" class="pn vm"><em>复制</em></button>
</td>
</tr>
</table>

<!-- 推广连接 -->
</div>               <!--中部广告-->

如果是只需要添加广告,如图片广告,文字链接广告,则加入:
      <!--中部广告-->                              

<style type="text/css">

#warpper{ position: relative; margin:0;padding:0; z-index:1000000; top:0;left:10px; float:left; }
.block{ display:block;}
.none{ display:none;}

</style>

<div id="warpper">
这里放你的广告代码
</div>               

页: [1]
查看完整版本: discuz论坛logo右侧添加广告位的方法教程