关闭

自定义论坛模版--修改forumindex.htm模版

标签: classdivborderheadermenutable
592人阅读 评论(0) 收藏 举报
分类:

 

语法说明:

 

<%template  _xxx%> 用于引入 forum/template/default/_xxx.htm模版文件

 

<%csharp%> .... <%/csharp%> 用于写C#代码,其中声明的变量,可以在 <% ... %>中使用

 

//循环的语法

<%loop (DataRow) dr   dt.Rows%>                        
      <%set {aspxrewriteurl} = this.ShowForumAspxRewrite({dr[fid]},0)%>               
      <li><a href="{forumurl}{aspxrewriteurl}" target="_blank">{dr[name]}</a></li>
<%/loop%>

 

 

 

 

 

 

--------- 修改 forumindex.html 模版 ----------

<%template _header%>

<div class="wrap cl pageinfo">
     <div id="nav">
        ...
     </div>
</div>

<!-- 聚合信息:规则帮助、和推荐帖子 -->
<div class="wrap" style="margin-bottom:10px;">
<div style="overflow:visible;">
<table id="tblTopicInfo" border="0" cellpadding="5" cellspacing="0" >
   <tr>

      <td>

            <h2>XX栏目最新10条</h2>

           <ul><script type="text/javascript" src="/forum/tools/showtopics.aspx?count=10&fid=2&template=1"></script></ul> &nbsp;

      </td>

  </tr>
</table>
</div>
</div>


<script type="text/javascript">
var postminchars = parseInt({config.minpostsize});
var postmaxchars = parseInt({config.maxpostsize});
var disablepostctrl = parseInt({disablepostctrl});
</script>


<div class="wrap cl forum" style="position:relative;">

<!-- LayContent -->
    <div class="layContent" style="margin-left:160px; ">

        <!-- 侧边栏 -->                                                                                                                       
         <div class="sideBar" style="width:150px; height:300px; position:absolute; top:15px; left:0; background:#FFF7DE; border:1px solid #FFDF9C; border-top:0; border-left:0;">
                  <ul>                                                                       
                         <li><a href="#">aaaaaaaaa</a></li>                 
                         <li><a href="#">bbbbbbbbb</a></li>              
                         <li><a href="#">ccccccccccc</a></li>             
                  </ul>                                                                             
        </div>                                                                                       
        <!-- 侧边栏:end -->                                                                      

 

<%template _pagewordadlist%>

<div class="announcement cl">


......

 

 

 

<%/if%>
</div>
</div>
    </div>                                                 
<!-- LayContent:end -->          

              

<%if {config.stylejump}==1%>
<%if {userid}!=-1 || {config.guestcachepagetimeout}<=0%>
 <div id="styleswitcherhome_menu" class="popupmenu_popup cl skin" style="display: none;">
  <ul>
  {templatelistboxoptionsforforumindex}
  </ul>
 </div>
<%/if%>
<%/if%>
<%if {config.forumjump}==1%>
 {navhomemenu}
<%/if%>
<%template _copyright%>
<%template _adlist%>
{mediaad}
{inforumad}
<%template _footer%>

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:258156次
    • 积分:3936
    • 等级:
    • 排名:第8025名
    • 原创:115篇
    • 转载:112篇
    • 译文:0篇
    • 评论:25条
    最新评论
    财经
    学习小组
    学习资源