[织梦CMS教程] 织梦模板下载Dedecms时间日期标签 pubdate 总结教程

[复制链接]
查看2355 | 回复15 | 2019-12-15 20:36:07 | 显示全部楼层 |阅读模式
模板制作过程中常遇到需要调用的时间标签,在这里简单列出部分织梦CMS模板的时间标签代码
首页dedecms可以用的时间标签:
第一、12-27 (12月27日)样式
([field:pubdate function='strftime("%m-%d",@me)'/])
第二、May 15, 2009 样式
([field:pubdate function='strftime("%b %d, %Y",@me)'/])
提示:可修改后代码再运行!
 
列表页dedecms可用时间标签:
第一、2009-12-27 18:30:02 样式
[field:pubdate function="GetDateTimeMK(@me)"/]
第二、2009-12-27 样式
[field:pubdate function="GetDateMK(@me)"/]
内容页dedecms可用时间标签:
第一、2009-12-27 样式
{dede:field name='pubdate' function='GetDateMk(@me)'/}
第二、May 15, 2009 样式
{dede:field name='pubdate' function='strftime("%b %d, %Y",@me)'/}
 
24小时内的时间显示红色:
[field:pubdate runphp='yes']
$a="";";
$b="
$c=strftime("%Y年%m月%d日 %H:%M:%S","@me");
$ntime = time();
$oneday = 3600 * 24;
if(($ntime - @me)<$oneday) @me = $a.$c.$b;
else @me =$c;
[/field:pubdate]
最后更新时间
{dede:tagname runphp='yes'}@me = date("Y-m-d H:i:s", time());{/dede:tagname}
XX天前
[field:pubdate runphp='yes']
$today = Floor(time()/(3600 * 24));
$senday= Floor(@me/(3600 * 24));
回复

使用道具 举报

几器那午 | 2020-10-29 14:44:44 | 显示全部楼层
站长真良心,这么大的资源站都是免费下载
回复

使用道具 举报

静美人2017 | 2020-12-4 10:36:03 | 显示全部楼层
我是来白嫖悟空源码的积分的!!!!!
回复

使用道具 举报

芊芊551 | 2020-12-29 01:51:33 | 显示全部楼层
谢谢楼主发布的资源下载,帮助我不少
回复

使用道具 举报

chwbn765 | 2021-1-18 10:17:22 | 显示全部楼层
厉害了悟空源码,这么多资源
回复

使用道具 举报

极忘投 | 2021-2-17 21:49:47 | 显示全部楼层
有情怀的站啊,爱了
回复

使用道具 举报

寒川 | 2021-12-30 17:44:27 | 显示全部楼层
我是来白嫖悟空源码的积分的!!!!!
回复

使用道具 举报

快乐宝贝567 | 2022-1-20 10:18:16 | 显示全部楼层
很不错的资源站
回复

使用道具 举报

陈嘉凯 | 2022-6-1 06:10:06 | 显示全部楼层
资源太多了,准备办个会员
回复

使用道具 举报

A01祥天科技 | 2022-6-3 19:19:48 | 显示全部楼层
祝愿悟空源码越办越好!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则