文章管理 - 定制XOOPS评论系统风格 imag1
文章管理 :: Xoops Theme :: Theme制作

定制XOOPS评论系统风格


http://www.xoops.org/modules/news/article.php?storyid=4354
Open in new window



实例: Click here

下载: download



安装步骤
========
1. 复制代码到 XOOPS_URL/themes/YOUR_THEME/style.css


XOOPS_URL/themes/YOUR_THEME/style.css


/* xoops comment style by young */
.ncomment {
    
padding-top20px;
    
padding-right20px;
    
padding-bottom40px;
    
padding-left20px;
    
background-imageurl(images/com_bl.png);
    
background-positionleft bottom;
    
background-repeatno-repeat;
}

.
ncomment_l {
    
background-image:url(images/com_l.png);
    
background-positionleft;
    
background-repeat:repeat-y;
    
background-color:#dae5e2;
    
}
.
ncomment_r {
    
background-image:url(images/com_r.png);
    
background-positionright;
    
background-repeat:repeat-y;
    }
.
ncomment_t {
    
background-image:url(images/com_t.png);
    
background-positiontop;
    
background-repeat:repeat-x;
    }
.
ncomment_b {
    
background-image:url(images/com_b.png);
    
background-positionbottom;
    
background-repeat:repeat-x;
    }
.
ncomment_tl {
    
background-image:url(images/com_tl.png);
    
background-positionleft top;
    
background-repeat:no-repeat;
    }
.
ncomment_tr {
    
background-image:url(images/com_tr.png);
    
background-positionright top;
    
background-repeat:no-repeat;
    }
.
ncomment_br {
    
background-image:url(images/com_br.png);
    
background-positionright bottom;
    
background-repeat:no-repeat;
    }
.
ncomment_user {
padding-left:15px;
padding-bottom:20px;
}


2.复制图像文件到 XOOPS_URL/themes/YOUR_THEME/images/

3. 修改模板文件
下载图像文件: download


system_comment.html

<div>
<
div class="ncomment_l">
<
div class="ncomment_t">
<
div class="ncomment_r">
<
div class="ncomment_b">
<
div class="ncomment_tr">
<
div class="ncomment_br">
<
div class="ncomment_tl">
<
div class="ncomment">

<
a id="comment<{$comment.id}>"></a>

<
div class="comTitle"><{$comment.image}><{$comment.title}></div><div 

class="comText"><{$comment.text}></div>


          <{if 
$xoops_iscommentadmin == true}>
          <
a href="<{$editcomment_link}>&com_id=<{$comment.id}>"><img 

src
="<{$xoops_url}>/images/icons/edit.gif" alt="<{$lang_edit}>" /></a><a href="<

{$deletecomment_link}>&com_id=<{$comment.id}>"
><img src="<

{$xoops_url}>/images/icons/delete.gif" 
alt="<{$lang_delete}>" /></a><a href="<

{$replycomment_link}>&com_id=<{$comment.id}>"
><img src="<

{$xoops_url}>/images/icons/reply.gif" 
alt="<{$lang_reply}>" /></a>

          <{elseif 
$xoops_isuser == true && $xoops_userid == $comment.poster.id}>

            <
a href="<{$editcomment_link}>&com_id=<{$comment.id}>"><img 

src
="<{$xoops_url}>/images/icons/edit.gif" alt="<{$lang_edit}>" /></a><a href="<

{$replycomment_link}>&com_id=<{$comment.id}>"
><img src="<

{$xoops_url}>/images/icons/reply.gif" 
alt="<{$lang_reply}>" /></a>

          <{elseif 
$xoops_isuser == true || $anon_canpost == true}>

            <
a href="<{$replycomment_link}>&com_id=<{$comment.id}>"><img 

src
="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" /></a>
        <{else}>
          <{/if}>
          </
div>
          </
div>
          </
div>
          </
div>
          </
div>
          </
div>
          </
div>
          </
div>
          
          
          <
div class="ncomment_user"><img align="absmiddle" 

class="comUserImg" src="<{$xoops_upload_url}>/<{$comment.poster.avatar}>" 

alt="" width="35" height="35"/> <{$comment.poster.uname}>
&
nbsp; &nbsp; <span class="comDateCaption"><{$lang_posted}>:</span> <

{
$comment.date_posted}>&nbsp;&nbsp;<span class="comDateCaption"><

{
$lang_updated}>:</span> <{$comment.date_modified}></div>
</
div>



system_comments_flat.html


<{foreach item=comment from=$comments}>
    <{include 
file="db:system_comment.html" comment=$comment}>
  <{/foreach}>




system_comment_thread.html


<{section name=i loop=$comments}>
<
br />

  <{include 
file="db:system_comment.html" comment=$comments[i]}>


<{if 
$show_threadnav == true}>
<
div style="text-align:left; margin:3px; padding: 5px;">
<
a href="<{$comment_url}>"><{$lang_top}></a> | <a href="<{$comment_url}

>&com_id=<{$comments[i].pid}>&com_rootid=<{$comments[i].rootid}

>#newscomment<{$comments[i].pid}>"
><{$lang_parent}></a>
</
div>
<{/if}>

<{if 
$comments[i].show_replies == true}>
<!-- 
start comment tree -->
<
br />
<
table cellspacing="1" class="outer">
  <
tr>
    <
th width="50%"><{$lang_subject}></th>
    <
th width="20%" align="center"><{$lang_poster}></th>
    <
th align="right"><{$lang_posted}></th>
  </
tr>
  <{foreach 
item=reply from=$comments[i].replies}>
  <
tr>
    <
td class="even"><{$reply.prefix}> <a href="<{$comment_url}>&com_id=<

{$reply.id}>&com_rootid=<{$reply.root_id}>"
><{$reply.title}></a></td>
    <
td class="odd" align="center"><{$reply.poster.uname}></td>
    <
td class="even" align="right"><{$reply.date_posted}></td>
  </
tr>
  <{/foreach}>
</
table>
<!-- 
end comment tree -->
<{/if}>

<{/
section}>








system_comments_nest.html

<{section name=i loop=$comments}>
<
br />

  <{include 
file="db:system_comment.html" comment=$comments[i]}>


<!-- 
start comment replies -->
<{foreach 
item=reply from=$comments[i].replies}>
<
br />
<
table cellspacing="0" border="0">
  <
tr>
    <
td width="<{$reply.prefix}>"></td>
    <
td>

        <{include 
file="db:system_comment.html" comment=$reply}>
      
    </
td>
  </
tr>
</
table>
<{/foreach}>
<!-- 
end comment tree -->
<{/
section}>
<< 让News模块的makepdf支持多字节字符,例如UTF-8编码
跟踪网址
  • 文章地址: http://xoops.org.cn/modules/article/view.article.php/c12/92
  • 跟踪地址: http://xoops.org.cn/modules/article/trackback.php/92
API: 工具箱 短消息 Email PDF 书签 打印 | RSS | RDF | ATOM
Copyright© ezsky & XOOPS CHINA
网友个人意见,不代表本站立场。对于发言内容,由发表者自负责任。
发表者 树状展开