sdcms 1.3.1 常用代码

竹清松瘦 目录 工作笔记
0

href=”css/

href=”{sdcms:root}skins/pine/css/

src=”js/
src=”{sdcms:root}skins/pine/js/

src=”images/

css 引用
.info_next{color:#999;margin:6px 20px 6px 0px;}
.info_next a{font-family:verdana;}
/*分页部分*/
.List_page{text-align:center;margin-bottom:10px;}
.List_page a{background:#fff;margin:0px 1px;padding:4px 6px;border:1px solid #4B7EBC;color:#A0A0A0;}
.List_page span{background:#999;color:#000;margin:0px 1px;padding:4px 6px;border:1px solid #4B7EBC;}
/*内容分页部分*/
.content_page{}
.content_page a{background:#fff;margin:1px;padding:4px 6px;border:1px solid #AECD9E;color:#A0A0A0;display:inline-block;}
.content_page a.on{background:#AECD9E;color:#fff;margin:1px;padding:4px 6px;border:1px solid #AECD9E;display:inline-block;}
.content_page input{position:absolute;margin:-5px 0 0 1px;*margin:0 0 0 1px;padding:1px 0 2px 0;*padding:0;background:#fff;border:1px solid #AECD9E;color:#A0A0A0;width:30px;height:22px;line-height:22px;text-align:center;}
.content_page button{position:absolute;margin:-5px 0 0 35px;*margin:0 0 0 35px;padding:0;background:#fff;border:1px solid #AECD9E;color:#A0A0A0;width:40px;height:24px;line-height:24px;text-align:center;font-size:12px;}
.content_url{font-size:14px;font-family:arial;color:#06f;margin:20px;}
.content_url span{color:#666;}
.content_url input{background:#50B20E;color:#fff;width:40px;border:0;height:24px;}
.content_url #this_url{border:1px solid #ccc;width:464px;font-family:arial;color:#000;height:20px;line-height:20px;background:#fff;}
.info_title{margin:10px 0;font:100 18px Microsoft Yahei;text-align:center;}
.info_other{text-align:center;color:#999;margin:4px 0;}
.info_jj{border:1px solid #FDCC97;background:#FEFCFA;padding:10px;margin:10px 20px;color:#666;line-height:20px;word-wrap:break-word;overflow:hidden;}
.info_jj a{font-family:verdana;color:#00f;}
.info_jj a:hover{color:#f30;}
.info_jj span{font-weight:bold;color:#000;}
.info_content{word-wrap:break-word;word-break:break-all;overflow:hidden;line-height:24px;font-size:13px;}
.info_content img{max-width:690px;}
.other_content{word-wrap:break-word;word-break:break-all;overflow:hidden;line-height:24px;}
.other_content img{max-width:690px;}
导航
单页分类
{sdcms:loop table=”sd_other” where=”followid=1″ order=”ordnum desc”}
<p><a href=”{link}”>{title}</a></p>{/sdcms:loop}
信息分类
{sdcms:loop table=”sd_class” where=”followid=1″ order=”ordnum asc”}
<p><a href=”{link}”>{title}</a></p>{/sdcms:loop}
广告代码

{sdcms:loop table=”Sd_Ad” where=”FollowID=1 and ispass=1″ order=”id asc”}
<a href=”{url}”><img src=”{Pic}”/></a>
{/sdcms:loop}

只调用广告图片
{sdcms:loop table=”Sd_Ad” where=”ID=9 and ispass=1″}{Pic}{/sdcms:loop}

单页调用

{sdcms:loop table=”sd_other” where=”id=1″}
{content len=”120″ function=”nohtml”}
{/sdcms:loop}<a href=”{sdcms:root}Page/?id=1″ class=”more”>[详细介绍]</a>
新闻调用

{sdcms:loop table=”Sd_Info” top=”1″ where=”ispass=1 and classid=2 and Ispic=1″}
{eof}<img src=”{sdcms:root}skins/pine/images/Nophoto.jpg”/>{/eof}
<a href=”{link}”><img src=”{pic}”></a>
{/sdcms:loop}

{sdcms:loop table=”Sd_Info” top=”4″ where=”ispass=1 and classid=2″}
{eof}<li>没有资料</li>{/eof}
<li><a href=”{link}” [if {isurl}=1]target=”_blank”[end if] title=”{title}” {style}>{title len=”48″}</a></li>
{/sdcms:loop}

{sdcms:loop table=”Sd_Info” top=”6″ where=”ispass=1 and classid in (3,4)” }
<li><em [if {adddate date=”yyyymmdd”}={date()}] class=”red”[end if]>{adddate date=”yy-mm-dd”}</em><a href=”{link}” title=”{title}” [if {isurl}=1]target=”_blank”[end if]>{title len=”42″}</a></li>
{/sdcms:loop}
友情连接
{sdcms:loop top=”0″ table=”sd_link” where=”ispic=0 and ispass=1″ order=”ordnum asc,id desc”}
{eof}<option>没有链接</option>{/eof}
<option value=”{url}”>{title}</option>
{/sdcms:loop}
分类循环
首页
{@sdcms:loop top=”10″ table=”sd_class” where=”followid=0″ order=”ordnum,id”}
<a href=”{@link}”>{@title}</a>
{sdcms:loop table=”sd_class” where=”followid={@id}” order=”ordnum desc”}
<a href=”{link}”>{title}</a>
{/sdcms:loop}
{/@sdcms:loop}

{@sdcms:loop field=”pagedir,htmlname,title,id” table=”sd_other” where=”followid=0″ top=”6″ order=”ordnum,id”}
{@title}
{sdcms:loop table=”sd_other” where=”followid={@id}” order=”ordnum desc”}
{title}
{/sdcms:loop}
{/@sdcms:loop}
自动增加高度代码
<script>
$(function(){
var abcd=function (){
var newH=$(“#pagecontent”).height()+120;
$(“#content”).css(“height”,newH)
}
setTimeout(abcd, 2000)
})

</script>

« 上一篇: :下一篇 »

发表评论