Z-Blog主页
Z-Wiki
应用中心
菠萝阁
ZBlogger
Z5加密
跳至内容
Z-Blog Wiki
Z-Blog官方文库
用户工具
登录
站点工具
搜索
工具
显示页面
修订记录
最近更改
媒体管理器
网站地图
登录
>
最近更改
媒体管理器
网站地图
您在这里:
Z-Blog & Z-BlogPHP
»
Z-BlogPHP
»
应用开发指南
»
plugins
»
MIP主题开发指南
zblogphp:development:plugins:mip
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
====== MIP主题开发指南 ====== 您的主题首先必须依赖 mip插件,要在您的主题内启用MIP,请按照以下方法操作: 1. 在您的主题内部的 ActivePlugin_主题ID 函数,插入 <code php> mip_active(); </code> 2. 在您的主题内部的header.php,插入 <code html> <meta name="bloghost" content="{$host}"> </code> 3. 如果您的主题没有<style mip-custom>,则在header.php插入 <code html> <style mip-custom>{$mipstyle}</style> </code> 如果有<style mip-custom>,则请把{$mipstyle}插入到</style>之前。 4. 此时,您可以使用MIP插件提供的功能了。 ===== 评论 ===== 1. 将主题内的 {template:comments} 替换成 <code html> <mip-zblogphp-comment post-id="{$article.ID}"></mip-zblogphp-comment> </code> 2. 在主题的 footer.php 插入 <code html> <script src="https://c.mipcdn.com/static/v1/mip-zblogphp-comment/mip-zblogphp-comment.js"></script> </code> 3. (可选)将mip插件内的components/comment/mip-comment.php复制到自己的主题内部,进行开发。 ===== 访问量 ===== 1. 将文章列表的``{$article.ViewNums}``换成 <code html> <mip-zblogphp-article-viewnum post-id="{$article.ID}" default="{$article.ViewNums}" update="0" ></mip-zblogphp-article-viewnum> </code> 2. 将文章页的``{$article.ViewNums}``换成 <code html> <mip-zblogphp-article-viewnum post-id="{$article.ID}" default="{$article.CommNums}" update="1"></mip-zblogphp-article-viewnum> </code> 3. 在主题的 footer.php 插入 <code html> <script src="https://c.mipcdn.com/static/v1/mip-zblogphp-article-viewnum/mip-zblogphp-article-viewnum.js"></script> </code>
zblogphp/development/plugins/mip.1522813065.txt
· 最后更改: 2018/04/04 11:37 由
zsx
页面工具
显示页面
修订记录
页面重命名
回到顶部