发新话题
打印

[共享] 共享一个帮助中心代码,喜欢拿去

共享一个帮助中心代码,喜欢拿去

EC的帮助中心网站底部,点击打开后只当文章看,没有专门的帮助中心,这样显示不专业,也不美观,我稍微改了一下,做了个帮助中心栏目,不知道大家喜不喜欢,喜欢的就自己动手改一下,我发个代码给大家,适用于EC2.51 joyo模版

1、建新一个help2.lbi,内容以下
复制内容到剪贴板
代码:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div class="title-01">
<!--{if $helps}-->
  <div class="title-01-title">帮助中心</div>
</div>
<div id="help-tree">
  <!-- {foreach from=$helps item=help_cat} -->
      <h3><span>{$help_cat.cat_name}</span></h3>
   <div class="yiji"></div>
   <ul class="erji">
        <!-- {foreach from=$help_cat.article item=item} -->
        <li><a href="{$item.url}" title="{$item.title|escape:html}">{$item.short_title}</a></li>
        <!-- {/foreach} -->
      </ul>
   <!-- {/foreach} -->
</div>
<!--{/if}-->
2、在article.dwt里约第90行
复制内容到剪贴板
代码:
<!-- #BeginLibraryItem "/Library/category_tree.lbi" -->
改为
复制内容到剪贴板
代码:
<!-- #BeginLibraryItem "/Library/help2.lbi" -->
3、在style.css里的
复制内容到剪贴板
代码:
#category-tree .erji li {
padding-left:30px;
padding-top:2px;
padding-bottom:3px;
border-bottom:1px #F3F6EB solid;
margin-bottom:3px;
background-image:url(images/erji.gif);
background-repeat: no-repeat;
background-position: 15px 4px;
}
下面增加
复制内容到剪贴板
代码:
#help-tree {
width:175px;
border-left:1px #6CB8C5 solid;
border-right:1px #6CB8C5 solid;
border-bottom:1px #6cb8c5 solid;
background-color:#fff;
margin-bottom:8px;
}
#help-tree ul {
list-style-type:none;
}
#help-tree h3 {
padding:6px 0 5px 27px;
margin-bottom:3px;
border-bottom:1px #E9ECE0 solid;
border-top:1px #E9ECE0 solid;
background-color:#F3F6EB;
background-image: url(images/menu_minus.gif);
background-repeat: no-repeat;
background-position: 12px center;
}
#help-tree .yiji {
float:right;
margin:-22px 10px 0 0;
width:20px;
height:20px;
background: url() no-repeat right top;
cursor:n-resize;
}
#help-tree .yiji2 {
float:right;
margin:-22px 10px 0 0;
width:40px;
height:20px;
background: url(images/menu_minus.gif) no-repeat right top;
cursor:hand;
}
#help-tree .erji li {
padding-left:30px;
padding-top:2px;
padding-bottom:3px;
border-bottom:1px #F3F6EB solid;
margin-bottom:3px;
background-image:url(images/erji.gif);
background-repeat: no-repeat;
background-position: 15px 4px;
}
效果看看图片

代码我自己用了好长时间都没问题,不知道对不对,喜欢就顶一下,不喜欢的不要说我 ,有什么地方不对的,请告诉我,谢谢

[ 本帖最后由 cnave 于 2008-8-3 17:13 编辑 ]

附件

1.jpg (70.66 KB)

2008-8-3 17:13

1.jpg

哈哈,我来了!

TOP

很好 很强大

TOP

非常好
希望官方关注加进下个版本中

TOP

非常好,官方的确要改进啊。

TOP

沙发!!!!!!!!!!

TOP

2.60 utf8行不行?

TOP

回复 #6 Bajunma 的帖子

自己对应好加进去,应该没问题,自己试试!我没用过2.6
哈哈,我来了!

TOP

不错,非常非常的好.

TOP

gbk的心行不??

TOP

既然只有这一个地方使用到,没必要再加一个help2.lbi。

TOP

引用:
原帖由 roovy 于 2008-8-8 06:40 发表
既然只有这一个地方使用到,没必要再加一个help2.lbi。
help2.lbi与help.lbi的格式是不一样的,help2.lbi帮助中心的分类是在左面,而help.lbi是在底部,两种格式是完全不一样的,如果你不加help2.lbi的而是直接修改help.lbi使用的,那你底部显示的帮助中心内容就不能再使用
哈哈,我来了!

TOP

感谢楼主的分享。

TOP

我用的是2.6 默认模板不知如何修改,楼主能否赐教?

TOP

发新话题