首页
直播
壁纸
免责声明
更多
统计
关于
Search
1
一款自动化渗透工具包 TscanPlus
225 阅读
2
获取一张美国虚拟信用卡
223 阅读
3
JS Document.evaluate()的使用
199 阅读
4
Git冲突:Please commit your changes or stash them before you merge
174 阅读
5
Python 31条 pip 命令全解析
164 阅读
默认分类
操作系统
Linux
管理面板
实用工具
开发语言
PHP
Web
python
typecho
ThinkPHP
layui
爬虫
文章分享
登录
Search
标签搜索
python
php
web
linux
Git
js
requests
自动化
宝塔
thinkphp
Centos
adb
html
typecho
layui
jquery
ubuntu
multipass
虚拟机
thikphp
YiYun
累计撰写
54
篇文章
累计收到
21
条评论
首页
栏目
默认分类
操作系统
Linux
管理面板
实用工具
开发语言
PHP
Web
python
typecho
ThinkPHP
layui
爬虫
文章分享
页面
直播
壁纸
免责声明
统计
关于
搜索到
6
篇与
的结果
2024-03-26
Typecho博客中常用的调用函数
一、站点相关站点名称:<?php $this->options->title(); ?>站点URL:<?php $this->options ->siteUrl(); ?>站点说明:<?php $this->options->description() ?>4.站点后台URL:<?php $this->options->adminUrl(); ?>站点RSS:<?php $this->options->feedUrl(); ?>站点首页判断:<?php if ($this->is('index')): ?>首页输出内容<?php else: ?>不是首页输出内容<?php endif; ?>整站数据统计输出:<;?php Typecho_Widget::widget('Widget_Stat')->to($stat); ?>文章总数:<;?php $stat->publishedPostsNum() ?> 篇分类总数:<?php $stat->categoriesNum() ?>个评论总数:<?php $stat->publishedCommentsNum() ?>条页面总数:<?php $stat->publishedPagesNum() ?>个当前作者的文章总数:<?php $stat->myPublishedPostsNum() ?>篇二、文章相关文章或页面的标题:<?php $this->title() ?>文章或页面的URL:<?php $this->permalink() ?>文章或页面的发表时间:<?php $this->date(); ?>文章或页面的访问次数:<?php Views_Plugin::theViews('被访问 ', '次'); ?>文章上一篇:<?php $this->theNext(); ?>文章下一篇:<?php $this->thePrev(); ?>文章分类名:<?php $categorys->name();?>截取文章摘要,200字数限制:<?php $this->excerpt(200, '.. .'); ?>作者:<?php $this->author(); ?>作者的邮箱地址:<?php $this->author->mail(); ?>文章作者URL:<?php $this->author->url(); ?>作者全部文章列表URL:<?php $this->author->permalink(); ?>最后更新:<?php echo date(_mt("Y 年 m 月 d 日 h : i A") , $this->modified + $this->options->timezone - idate("Z"));?>三、参数说明获取已发布的文章数目:publishedPostsNum获取待审核的文章数目:waitingPostsNum获取草稿文章数目:draftPostsNum获取当前用户已发布的文章数目:myPublishedPostsNum获取当前用户待审核文章数目:myWaitingPostsNum获取当前用户草稿文章数目:myDraftPostsNum获取当前用户已发布的文章数目:currentPublishedPostsNum获取当前用户待审核文章数目:currentWaitingPostsNum获取当前用户草稿文章数目:currentDraftPostsNum获取已发布页面数目:publishedPagesNum获取草稿页面数目:draftPagesNum获取当前显示的评论数目:publishedCommentsNum获取当前待审核的评论数目:waitingCommentsNum获取当前垃圾评论数目:spamCommentsNum获取当前用户显示的评论数目:myPublishedCommentsNum获取当前用户显示的评论数目:myWaitingCommentsNum获取当前用户显示的评论数目:mySpamCommentsNum获取当前文章的评论数目:currentCommentsNum获取当前文章显示的评论数目:currentPublishedCommentsNum获取当前文章显示的评论数目:currentWaitingCommentsNum获取当前文章显示的评论数目:currentSpamCommentsNum获取分类数目:categoriesNum四、其他页面标题 - 站点名称:<?php $this->archiveTitle('','',' - '); ?><?php $this->options->title(); ?>主题模板URL:<?php $this->options->themeUrl(); ?>PHP引用:<?php $this->need('*.php'); ?> 可以使用相对路径获取上级目录php文件调用自定义字段:<?php $this->fields->fieldName ?>当前登录用户:<?php $this->user->screenName(); ?>退出:<a href="<?php $this->options->logoutUrl(); ?>"> <?php _e('退出'); ?> </a>完整路径标题:<?php $this->archiveTitle(' » ', < span class="string">'', ' | '); ?><?php $this ->options->title(); ?>
2024年03月26日
158 阅读
4 评论
0 点赞
1
2