會員頭部
<div id="_userlogin">
<div class="userlogin">
<ul>
<li><a href="/member/reg_new.php">免費註冊</a></li>
<li><span>|</span></li>
<li><a href="/member/login.php">登錄</a></li>
<li><span>|</span></li></ul>
</div>
</div>
ajax_loginsta.php
頂部調用Js
<script language="javascript" type="text/javascript" src="{dede:global.cfg_cmsurl/}/include/dedeajax2.js"></script>
<script language="javascript" type="text/javascript">
function CheckLogin(){
var taget_obj = document.getElementById('_userlogin');
myajax = new DedeAjax(taget_obj,false,false,'','','');
myajax.SendGet2("{dede:global.cfg_cmspath/}/member/ajax_loginsta.php");
DedeXHTTP = null;
}
</script>
點擊欄目直接跳轉到第一篇文章
<meta http-equiv="refresh" content="0; url={dede:arclist typeid='' row='1' }[field:arcurl/]{/dede:arclist}" />
摘要數字增加
改數據庫
alter table dede_archives alter column description varchar(600)
改後臺系統參數 其他選項
改dede/article_edit.php 裏面的250改數字
文章頁
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{dede:field.title/}_{dede:global.cfg_webname/}</title>
<meta name="keywords" content="{dede:field name='keywords'/}" />
<meta name="description" content="{dede:field name='description' function='html2text(@me)'/}" />
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_templets_skin/}/css/css.css"/>
</head>
<body>
{dede:include filename="head.html"/}
欄目名稱 {dede:field.typename/}
欄目位置 {dede:field name='position'/}
欄目鏈接 {dede:field.typelink/}
文章標題 {dede:field.title/}
文章日期 {dede:field.pubdate function="MyDate('Y-m-d H:i',@me)"/}
{dede:field.senddate function="MyDate('Y-m-d H:i',@me)"/}
文章縮略圖<img src="{dede:field name='litpic'/}" >
文章內容 {dede:field.body/}
文章分頁 {dede:pagebreak/}
文章關鍵字 {dede:field.keywords /}
文章簡介 {dede:field.description function='html2text(@me)'/}
文章來源 {dede:field name='source'/}
文章作者 {dede:field.writer/}
文章tag {dede:tag type='current'/}
文章點擊 <script src="{dede:field name='phpurl'/}/count.php?aid={dede:field name='ID'/}&mid={dede:field name='memberid'/}&view=yes" language="javascript"></script>
<script src="{dede:field name='phpurl'/}/count.php?view=yes&aid={dede:field name='id'/}&mid={dede:field name='mid'/}" type='text/javascript' language="javascript"></script>
能用欄目的縮略圖
<img src="{dede:field name='typeid' runphp='yes'}
$id=@me;
global $dsql;
$sql="select seotitle from dede_arctype where id=$id";
$row=$dsql->getOne($sql);
@me=$row["seotitle"];
{/dede:field}
" height="38">
{dede:field name='typeid' runphp='yes'}
$id=@me;
global $dsql;
$sql="select content from dede_arctype where id=$id";
$row=$dsql->getOne($sql);
@me=$row["content"];
{/dede:field}
上一篇 {dede:prenext get='pre'/}
下一篇 {dede:prenext get='next'/}
相關文檔
{dede:likearticle row='4' titlelen='24' mytypeid=3 eregtype=all|tag|keyword}
[field:title/]
{/dede:likearticle}
{dede:likeart titlelen='24' row='10'}
[field:title/]
{/dede:likearticle}
圖片滑過變色
<img class="imgborder" width="358" height="248" src="{dede:field.seotitle /}" border="0" style="filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)" οnmοuseοver="this.style.filter='progid:DXImageTransform.Microsoft.BasicImage(grayscale=0)'" οnmοuseοut="this.style.filter='progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)'"/>
</body>
</html>
頭部
<a href="#" class="hrefs" οnclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.baidu.com');">設爲首頁</a>
<a href="javascript:window.external.AddFavorite('http://www.baidu.com', '百度')">加入收藏</a>
所有欄目(網站地圖可以用)
{dede:channelartlist typeid='top'}
<li><a href="{dede:field name='typeurl'/}"><strong>{dede:field name='typename'/}</strong></a></li>
{dede:channel type='son' noself='yes'}
<li><a href="[field:typelink/]">[field:typename/]</a></li>
{/dede:channel}{/dede:channelartlist}
頂級欄目
<ul>
<li{dede:field name=typeid runphp="yes"}(@me=="")? @me=" id='this'":@me="";{/dede:field}><a href="/"><span>首頁</span></a></li>
{dede:channel type='top' row='10' currentstyle="<li id='this'><a href='~typelink~' ><span>~typename~</span></a></li>"}
<li><a href='[field:typeurl/]'><span>[field:typename/]</span></a></li>
{/dede:channel}
</ul>
調用指定欄目鏈接
{dede:type typeid='6'} <a href='[field:typelink /]' target="_blank" >更多</a> {/dede:type}
某個欄目的二級欄目
{dede:channelartlist typeid='2,2'}
{dede:channel type='son' noself='yes'}
<a href="[field:typelink/]">[field:typename/]</a>
{/dede:channel}{/dede:channelartlist}
調用某個欄目下的二級欄目名字
{dede:channel type='son' typeid='3' row='16'}
<a href='[field:typelink/]'>[field:typename/]</a><br />
{/dede:channel}
子欄目調用標籤:
{dede:channel type=son typeid=6 noself=yes}
[field:typename/]
{/dede:channel}
一級導航
{dede:channel type='top' row='10' }
<a href='[field:typeurl/]' [field:rel/]>[field:typename/]</a>
{/dede:channel}
指定欄目的二級導航
{dede:channelartlist typeid='1,1'}
{dede:channel type='son' noself='yes'}
<a href="[field:typelink/]">[field:typename/]</a>
{/dede:channel}
{/dede:channelartlist}
導航條:
{dede:channel type='top' row='10′>~typename~"} [field:typename/] {/dede:channel}
德天數碼的
{dede:channelartlist typeid='2'}
<li class="nydalei"><a href="{dede:field name='typeurl'/}">{dede:field name='typename'/}</a></li>
{dede:channel type='son' noself='yes'}
<li class="nyxiaolei"><a href="[field:typelink/]">[field:typename/]</a></li>
{/dede:channel}{/dede:channelartlist}
每個欄目就每個的二級欄目
{dede:channel type='son' typeid='' row='16' currentstyle="<li class='thisleft'><a href='~typelink~' ~rel~><span>~typename~</span></a></li>"}
<li><a href='[field:typelink/]'><span>[field:typename/]</span></a></li>
{/dede:channel}
{dede:channel type='son' typeid='' row='16' currentstyle="<li><a href='~typelink~' id='thisleft'>~typename~</a></li>"}
<li><a href='[field:typelink/]'>[field:typename/]</a></li>
{/dede:channel}
{dede:channelartlist row=6}
<a href='{dede:field name='typeurl'/}'>{dede:field name='typename'/}</a>
{dede:channel type='son' row='10' currentstyle="<li class='hover'><a href='~typelink~' ~rel~><span>~typename~</span></a></li>"}
<a href='[field:typeurl/]' [field:rel/]>[field:typename/]</a>
{/dede:channel}
{/dede:channelartlist}
欄目導航調用標籤: <a href="/">首頁</a></li>
{dede:channel type='top' row='8' currentstyle="<li class='thisclass'><a href='~typelink~'>~typename~</a> </li>"}
<li><a href='[field:typelink/]' target="_blank">[field:typename/]</a> </li>
{/dede:channel}
頻道欄目調用標籤: {dede:channel type='self'}<li><a href='[field:typelink/]'>[field:typename/]</a></li>{/dede:channel}
某個欄目下的二級欄目列表 還有數字
{dede:channelartlist typeid='4,4' row='4'}
{dede:channel type='son' noself='yes'}
<DIV class=hota_on id=fhnew[field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global] οnmοuseοver="show_intro('yulenew','fhnew',4,[field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global],'hota')" style="FLOAT: left; MARGIN-LEFT: 1px"><DIV class=touch-tab><H3><A href="[field:typelink/]" >[field:typename/] </A></H3></DIV></DIV>
{/dede:channel}{/dede:channelartlist}
</TD>
<TD class=R width=3></TD></TR><TR><TD class=middle width=760 colSpan=3 height=126>
某個欄目下的二級欄目的文章列表 還有數字還有判斷
{dede:channelartlist typeid=4}
<DIV id=yulenew{dede:global.itemindex/}{dede:global.itemindex runphp='yes'}
if(@me == 1)
{
@me = '';
}
else{
@me = ' style="DISPLAY: none"';
}
{/dede:global.itemindex} align=left>
{dede:arclist row=5 titlelen=20 orderby=pubdate }
<div class=product><div class=productpic>
<a href=[field:arcurl/]><img src=[field:picname/] width="130" height="100" ></a></div>
<div class=producttext><a href=[field:arcurl/]>[field:title/]</a></div></div>
{/dede:arclist}
</DIV>
{/dede:channelartlist}
arclist 標籤下使用 [field:global.autoindex/] 默認從1開始
channel 標籤下使用 [field:global.autoindex/] 默認從0開始
channelartlist 標籤下使用 {dede:global.itemindex/} 默認從1開始
arclist 從0開始 [field:global name=autoindex runphp="yes"]@me=@me-1;[/field:global]
channel 從1開始 [field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global]
channelartlist 從0開始 {dede:global name=itemindex runphp='yes'}@me=@me-1;{/dede:global}
<form name="formsearch" action="/plus/search.php">
<input type="hidden" name="kwtype" value="0" />
<input type="text" class="kuang" value="請輸入關鍵字..." name="q" onClick="this.value=''">
<input name="imageField" type="image" src="/templets/hxls/images/searchzi.gif" width="87" height="33" border="0">
</form>
<strong>熱門關鍵詞</strong>:{dede:hotwords num='7' subday='100' maxlength='32'/}
高級搜索鏈接
/plus/heightsearch.php
<iframe src="sybanner.html" scrolling="no" frameborder="0" width=100% height=402 allowTransparency="true" ></iframe>
舊版flash代碼
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="169" height="141">
<param name="movie" value="/templets/sanmenx/images/flash/r{dede:global.itemindex/}.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<embed src="/templets/sanmenx/images/flash/r{dede:global.itemindex/}.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="169" height="141"></embed>
</object>
搜索頁
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{dede:global name='keyword' function='RemoveXSS(@me)'/}_{dede:global.cfg_webname/}</title>
<meta name="keywords" content=" {dede:global name='keyword' function='RemoveXSS(@me)'/}" />
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_templets_skin/}/css/css.css"/>
<meta name="description" content=" {dede:global name='keyword' function='RemoveXSS(@me)'/}" />
</head>
<body>
{dede:include filename="head.html"/}
位置 搜索{dede:global name='keyword' function='RemoveXSS(@me)'/}的結果
{dede:list pagesize=10 }
標題 <a href='[field:arcurl/]' target="_blank">[field:title/]</a>
日期 [field:stime/]
點擊 [field:click/]
簡介 [field:description/]...
[field:description function='cn_substr(@me,310)'/]
[field:title/] [field:pubdate function="GetDateMK(@me)"/] [field:description/]…
{/dede:list}
分頁
{dede:pagelist listitem="info,index,end,pre,next,pageno,option" listsize="5"/}
</body>
</html>
首頁
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{dede:global.cfg_webname/}</title>
<meta name="keywords" content="{dede:global.cfg_keywords/}" />
<meta name="description" content="{dede:global.cfg_description/}" />
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_templets_skin/}/css/css.css"/>
<script type="text/javascript" src="css/js.js"></script>
</head>
<body>
{dede:include filename="head.htm"/}
{dede:include filename="lunhuan.htm"/}
{dede:include filename="../../a/newfile1.html"/}
<img src="/templets/ydjj/images/gyyd.gif" width="110" height="46">
普通列表
{dede:arclist typeid=2 row=8 titlelen=60 orderby=pubdate }
<img src="[field:picname/]" > [field:litpic/]
<a href="[field:arcurl/]" >[field:title/]</a>
<a href='[field:arcurl/]' title='[field:fulltitle/]'>[field:title/]</a>
[field:pubdate function="GetDateMK(@me)"/]
[field:description function='cn_substr(@me,310)'/]
[field:senddate function="GetDateMK(@me)"/]
{/dede:arclist}
{dede:arclist typeid=10 row=11 titlelen=60 orderby=weight }
所有參數的列表
{dede:arclist flag='h' typeid='' row='' col='' titlelen='' infolen='' imgwidth='' imgheight='' listtype='' orderby='click' orderway='asc' keyword='' limit='0,1'}
<a href='[field:arcurl/]' title='[field:fulltitle/]'>[field:title/]</a>
{/dede:arclist}
參數 推薦 flag='c' 不推薦 noflag='c'
頭條[h]推薦[c]幻燈[f]特薦[a]滾動[s]加粗[b]圖片[p]跳轉[j]
col 分多少列
有附加表的值時
{dede:arclist row='8' addfields='filetype,language,softtype' channelid='3'}
[field:textlink /] - [field:softtype /]
{/dede:arclist}
單頁的
{dede:sql sql='Select content from dede_arctype where id=1'}
[field:content function=cn_substr(html2text(@me),400) /]
[field:content/]
{/dede:sql}
第一條和其他條不一樣的
{dede:arclist typeid=8 limit='0,1' titlelen=40 orderby='pubdate'}
<a href="[field:arcurl/]" >[field:title/]</a>
{/dede:arclist}
{dede:arclist typeid=8 limit='1,5' titlelen=50 orderby='pubdate'}
<a href="[field:arcurl/]" >[field:title/]</a>
{/dede:arclist}
自定義表單列表
{dede:loop table='dede_diyform1' row='10' }
<li><a href='/plus/diy.php?action=list&diyid=1' >[field:biaoti/]</a></li>
{/dede:loop}
友情鏈接
{dede:flink type='image' row='16'}
[field:link /]
{/dede:flink}
{dede:flink type='text' typeid='1' row='100'}
[field:link /]
{/dede:flink}
{dede:flink row='4' type='text' titlelen='50' typeid='0'}
[field:link /]
{/dede:flink}
{dede:flink type='textall' row='24'}
[field:link /]
{/dede:flink}
友情鏈接改樣式在\include\taglib\flink.lib.php 裏
網站底部
技術支持:<a href="http://www.e0311.net" target="_blank">聚思網絡</a>
{dede:global.cfg_powerby/}
tag 調用:
{dede:tag row=8 getall=1 sort='month'} [field:tag /] {/dede:tag}
評論調用
{dede:feedback row='5' titlelen='24' infolen='80'}
評論的人 <a href="#" class="username">[field:username function="(@me=='guest' ? '遊客' : @me)"/]</a>
評論的文章標題 <a href="[field:global.cfg_phpurl/]/feedback.php?aid=[field:aid/]" class="title">[field:title/]</a>
評論的內容 [field:msg/]
{/dede:feedback}
arclist 標籤下使用 [field:global.autoindex/] 默認從1開始
channel 標籤下使用 [field:global.autoindex/] 默認從0開始
channelartlist 標籤下使用 {dede:global.itemindex/} 默認從1開始
arclist 從0開始 [field:global name=autoindex runphp="yes"]@me=@me-1;[/field:global]
channel 從1開始 [field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global][field:typename/]
channelartlist 從0開始 {dede:global name=itemindex runphp='yes'}@me=@me-1;{/dede:global}
</body>
</html>
列表頁
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{dede:field.title/}_{dede:global.cfg_webname/}</title>
<meta name="keywords" content="{dede:field name='keywords'/}" />
<meta name="description" content="{dede:field name='description' function='html2text(@me)'/}" />
<link rel="stylesheet" href="{dede:global.cfg_templets_skin/}/css/css.css" />
</head>
<body>
{dede:include filename="head.htm"/}
欄目名稱 {dede:field.title/} {dede:field.typename/}
欄目內容 {dede:field.content/}
所在位置 {dede:field name='position'/}
列表
{dede:list pagesize='10' titlelen='30'}
標題 <a href="[field:arcurl/]" >[field:title/]</a>
<a href='[field:arcurl/]' title='[field:fulltitle/]'>[field:title/]</a>
圖片 <img src="[field:picname/]">
日期 [field:pubdate function="GetDateMK(@me)"/]
[field:pubdate function='strftime("%y-%m-%d",@me)'/]
[field:pubdate function='strftime("%Y-%m-%d %H:%M:%S",@me)'/]
描述 [field:description/]…
[field:description function='cn_substr(@me,310)'/]
作者 [field:writer/]
數字排列 [field:global name=autoindex /]
內容 [field:id runphp='yes'] $aid = @me; $row = $GLOBALS['dsql']->GetOne("Select body From `dede_addonarticle` where aid='$aid' "); @me = "{$row['body']}";[/field:id]
{/dede:list}
分頁 {dede:pagelist listitem="info,index,end,pre,next,pageno,option" listsize="5"/}
當天的有new
[field:pubdate runphp='yes']
$aa=strftime('%m-%d',@me);
$ntime = time();
$tagtime = @me;
$day3 = 3600 * 24;
if($tagtime > $ntime-$day3) @me = "<img src='/images/new.gif' />";
else @me = '';
[/field:pubdate]
列表分行的
{dede:list pagesize="20" titlelen="60" orderby="pubdate" typeid=""}
[field:global runphp='yes' name=autoindex]
$a="<div id='a'>";
$b="<div id='b'>";
if ((@me%2)==0) @me=$a;
else @me=$b;
[/field:global]
<a href='[field:arcurl/]'>[field:title/]</a>
</div>
{/dede:list}
列表有自定義字段時
{dede:list pagesize="20" titlelen="60" orderby="pubdate" addfields='xsxz,kksj,skdd,fujian' channelid='1' }
</body>
</html>
單頁
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{dede:field.typename/}_{dede:global.cfg_webname/}</title>
<title>{dede:field.title/}_{dede:global.cfg_webname/}</title>
<meta name="keywords" content="{dede:field name='keywords'/}" />
<meta name="description" content="{dede:field name='description' function='html2text(@me)'/}" />
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_templets_skin/}/css/css.css"/>
<img src="/templets/ydjj/images/gyyd.gif" width="110" height="46">
</head>
<body>
{dede:include filename="head.htm"/}
欄目名稱 {dede:field.typename/}
欄目名稱有大分類的 {dede:field.title/}
欄目位置 {dede:field name='position'/}
欄目內容 {dede:field.content/}
</body>
</html>
不少朋友需要在DedeCms的問答系統、留言本、會員空間導航裏調用系統標籤,但默認是不支持系統標籤調用的,需要對系統文件進行簡單的修改。
第一步:打開”/include/common.func.php”,該文件5.6版本默認存在,5.5的不存在自己建一個。
然後在該文件中加入一個函數,代碼如下:
function pasterTempletDiy($path)
{
require_once(DEDEINC.”/arc.partview.class.php”);
global $cfg_basedir,$cfg_templets_dir;
$tmpfile = $cfg_basedir.$cfg_templets_dir.”/”.$path;//模版文件的路徑
$dtp = new PartView();
$dtp->SetTemplet($tmpfile);
$dtp->Display();
}
第二步,打開留言本的模版文件,默認的是/templets/plus/guestbook.htm
用以下代碼替換原因的調用頭部代碼<?php
pasterTempletDiy(“default/head.htm”);
?>
DedeCms的問答及會員空間導航,按上邊的方法即可。
sql語句
替換
update pwn_shop_con set body = replace(body, 'shengbaolong360', 'panzhentang')
update 表名 set 字段名=replace(cast(與前面一樣的字段名 as varchar(8000)) ,'原本內容','想要替換成什麼')
update [表名] set 字段名 = replace(與前面一樣的字段名,'原本內容','想要替換成什麼')
改標題字數多一點(這個設置完 還要在後臺系統管理裏設置下字數)
alter table dede_archives alter column title char(120)
alter table dede_archives alter column title char(120)
defaultname
欄目名稱 字數多一點
alter table dede_arctype modify column typename char(255)
alter table dede_arctype modify column typedir char(255)
文章摘要多一點字
alter table dede_archives alter column description varchar(600)
網站地圖_{dede:global.cfg_webname/}
{dede:global name='maplist'/}
singlepage.html
{dede:field name='body'/}
lunhuan.html
<script language='javascript'>
linkarr = new Array();
picarr = new Array();
textarr = new Array();
var swf_width=322;
var swf_height=255;
//文字顏色|文字位置|文字背景顏色|文字背景透明度|按鍵文字顏色|按鍵默認顏色|按鍵當前顏色|自動播放時間|圖片過渡效果|是否顯示按鈕|打開方式
var configtg='0xf5f5f5|1|0x80622c|5|0xffffff|0xC5DDBC|0xf98030|5|2|1|_blank';
var files = "";
var links = "";
var texts = "";
//這裏設置調用標記
{dede:arclist typeid=14 row=4 titlelen=40 orderby='pubdate' flag='f' }
linkarr[[field:global.autoindex/]] = "[field:arcurl/]";
picarr[[field:global.autoindex/]] = "[field:litpic/]";
textarr[[field:global.autoindex/]] = "[field:title function='html2text(@me)'/]";
{/dede:arclist}
for(i=1;i<picarr.length;i++){
if(files=="") files = picarr[i];
else files += "|"+picarr[i];
}
for(i=1;i<linkarr.length;i++){
if(links=="") links = linkarr[i];
else links += "|"+linkarr[i];
}
for(i=1;i<textarr.length;i++){
if(texts=="") texts = textarr[i];
else texts += "|"+textarr[i];
}
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
document.write('<param name="movie" value="{dede:global.cfg_templeturl /}/default/images/bcastr3.swf"><param name="quality" value="high">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'&bcastr_config='+configtg+'">');
document.write('<embed src="{dede:global.cfg_templeturl /}/default/images/bcastr3.swf" wmode="opaque" FlashVars="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_config='+configtg+'&menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>');
</script>
圖片列表{dede:list pagesize='6'}
<li>
<table width="931" height="112" border="0" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="3" valign="top" class="list_pic"><a href="[field:arcurl/]" ><img src="[field:picname/]" width="179" height="108" border="0"></a></td>
<td class="list_title"><a href="[field:arcurl/]" >[field:title/]</a></td>
<td class="list_riqi" >[field:pubdate function="GetDateMK(@me)"/]</td>
</tr>
<tr>
<td colspan="2" class="list_con">[field:description function='cn_substr(@me,310)'/]</td>
</tr>
<tr>
<td> </td>
<td class="list_more"><a href="[field:arcurl/]" >more</a></td>
</tr>
</table>
</li>
{/dede:list}
內頁側邊欄
<div class="nyleft">
<div class="nyl_ban">{dede:field.title runphp='yes'}list($toptype,$sontype)=split('/',@me);@me=$toptype;{/dede:field.title}</div>
<div class="nyl_con">
<ul>
{dede:channel type='son' typeid='' row='16' currentstyle="<li id='thisleft'><a href='~typelink~' ~rel~><span>~typename~</span></a></li>"}
<li><a href='[field:typelink/]'><span>[field:typename/]</span></a></li>
{/dede:channel}
</ul>
</div>
</div>
dede自定義表單添加驗證碼
織夢dedecms網站給自定義表單加dede模板自帶驗證碼的方法。
有時候,我們因爲需要給dede網站的自定義表單添加驗證碼,防止惡意填寫表單提交。
我們可以用以下的方法來實現:
首先,我們要找到 /plus/diy.php 這個文件
在頭部引入文件:
require_once(DEDEINC.'/membermodel.cls.php');
然後找到
elseif($do == 2)
{ 在這個地方加入代碼塊
//驗證碼驗證
$svali = GetCkVdValue();
if(preg_match("/1/",$safe_gdopen)){
if(strtolower($vdcode)!=$svali || $svali=='')
{
ResetVdValue();
ShowMsg('驗證碼錯誤!', '-1');
exit();
}
}
修改好後保存一下文件。
第二步:在使用驗證碼的自定義表單靜態頁面中插入代碼塊
<input type="text" class="intxt w200 code" style="width: 50px; text-transform: uppercase;" id="vdcode" name="vdcode"/>
<img id="vdimgck" align="absmiddle" οnclick="this.src=this.src+'?'" style="cursor: pointer;" alt="看不清?點擊更換" src="/include/vdimgck.php"/> 看不清? <a href="javascript:void(0)" οnclick="changeAuthCode();">點擊更換</a>
在這個靜態頁面裏還得引用JQuery
再加入 JS代碼塊
<script type="text/javascript">
$ = jQuery;
function changeAuthCode() {
var num = new Date().getTime();
var rand = Math.round(Math.random() * 10000);
num = num + rand;
$('#ver_code').css('visibility','visible');
if ($("#vdimgck")[0]) {
$("#vdimgck")[0].src = "../include/vdimgck.php?tag=" + num;
}
return false;
}
</script>
好了,現在試一試,是不是可以實現驗證碼的提交了?一個簡單的dedecms自定義表單dede模板自帶驗證碼的功能就實現了。
關於自定義表單怎麼在模板頁中使用這裏就不多說了哦!
admin加密
admin 16位 32位加密結果
admin 的MD5加密代碼:
16位加密:7a57a5a743894a0e
32位加密:21232f297a57a5a743894a0e4a801fc3
dede 20位加密:f297a57a5a743894a0e4
admin888的MD5加密碼
16位:469e80d32c0559f8
32位:7fef6171469e80d32c0559f88b377245