2、登陆数据库,改数据库表dede_archives表里面的title字段,原默认是60,(这里改为200).
1、[field:global name=autoindex/] 生成顺序数字1,2,3,4,5...
例:{dede:field name='body' function='cn_substr(Html2text(@me),120)'/}
四、文章列表的推荐文章默认为加粗怎么去掉
在include里找到文件:arc.listview.class.php
查找并删除以下代码:
if(preg_match('/c/', $row['flag']))
{
$row['title'] = "<b>".$row['title']."</b>";
}
五、修改摘要长度
在/dede/article_edit.php页面,“$description = cn_substrR($description,250); ”,修改“250”为其他值;
在article_description_main.php页面,找到“if($dsize>250) $dsize = 250;”语句,把这里的“250”修改。
六、dede调用子栏目标签{dede:channel type='son'},无子栏目时不取同级栏目
打开:include\taglib\channel.lib.php文件。找到
if($type=='son' && $reid!=0 && $totalRow==0)
改成
if($type=='son' && $reid!=0 && $totalRow==0 && $noself=='')
然后调用中标签写法:
{dede:channel type='sun' noself=='yes'}
<a href="[field:typelink/]" title="">[field:typename/]</a>
{/dede:channel}
七、nofollow
1、将"nofollow"写在网页上的meta标签上,用来告诉搜索引擎不要抓取网页上的所有外部和包括内部链接。
<meta name="robots” content="nofollow” />
2、将"nofollow"放在超链接中,告诉搜索引擎不要抓取特定的链接。
<a rel="external nofollow" href="url"><span>内容</span></a>
<a href="URL" rel="nofollow" >灌水</a>
八、给当天发布的内容加上 (new) 标志
[field:senddate runphp='yes']
$ntime = time();
$oneday = 3600 * 24;
if(($ntime - @me)<$oneday) @me = "<font color='red'>(new)</font>"; else @me = "";
[/field:senddate]
九、自动跳转
1、PHP:
<?php
header("Location:http://lwt.zoosnet.net/LR/Chatpre.aspx?id=LWT66573484 ");
exit();
?>
2、Html:
<meta http-equiv="refresh" content="0.1;url=http://bft.zoosnet.net/LR/chatwin.aspx?id=BFT71612965">
<base target = "_blank">
十、DEDE搜索结果页 怎么控制搜索结果显示条数?
在\plus\search.php 查找代码:
$pagesize = (isset($pagesize) && is_numeric($pagesize)) ? $pagesize : 20;
这里的20 改为自己想要显示的数字。
十一、dede5.7 搜索不显示结果
1、配置sphinx服务器。
后台 -> 系统 -> 系统基本参数 -> 其它选项 -> "Sphinx服务器主机地址:"、"Sphinx服务器端口号:"。
2、关闭全文检索功能。
后台 -> 系统 -> 系统基本参数 -> 其它选项 -> "是否启用文章全文检索功能(需配置sphinx服务器):" -> 否。
十二、会员评论内容
{dede:feedback}
<ul>
<li class='fbtitle'>[field:username function="(@me=='guest' ? '游客' : @me)"/] 对 [field:title/] 的评论:</li>
<li class='fbmsg'> <a href="plus/feedback.php?aid=[field:aid/]" class='fbmsg'>[field:msg /]</a></li>
</ul>
{/dede:feedback}
参数说明:
row='12' 调用评论条数 titlelen='24' 标题长度 infolen='100' 评论长度
十三、鼠标滑过,图片变大
我的模板调用代码(别忘记调用样式class="MagicZoom"):
<a href="{dede:field.productspic2/}" title="" class="MagicZoom">
<img src='{dede:field.productspic1/}' width=""; height="" />
</a>
十四、友情链接:
{dede:flink row='24'/}
{dede:flink type='image' row='100' col='100'}{/dede:flink}图片链接
{dede:flink type='text' row='10' col='10'}{/dede:flink}文字链接
{dede:flink type='textimage row='10' col='10'}{/dede:flink}图文混合链接
友情链接图片大小修改:
友情链接以image显示时,默认大小是88*31的,要想修改其大小可在include/taglib
文件夹中的flink.lib.php文件中修改
十五、防止网站被挂黑链
每次用dedecms的时候,先删除member文件夹,然后后台设置所有会员相关的都禁止,
然后删除根目录下tags.php。
然后高级搜索页删除/plus/heightsearch.php
/data/admin/vet.txt文件删除