人生倒计时
- 今日已经过去小时
- 这周已经过去天
- 本月已经过去天
- 今年已经过去个月
情况是这样的,假如你发布了很多文章,然后这个时候需要在每篇文章下面添加指定同样内容,那么就可以挂载下面接口。
首先第一步,在include.php的ActivePlugin函数里面挂载下面接口
Add_Filter_Plugin('Filter_Plugin_ViewPost_Template', 'ID_xxx');
然后第二步:新建一个方法,如下:
这里是小程序测试代码
p { color: red }
-----结束----
...这里是代码... ...这里是代码... ...这里是代码...
--------
header('Content-Type: image/png'); $img_one = glob(__DIR__ . "/resour/image/one/*.jpg",GLOB_BRACE); $img1 = array_rand($img_one); $img_two = glob(__DIR__ . "/resour/image/two/*.png",GLOB_BRACE); $img2 = array_rand($img_two); $img_three = glob(__DIR__ . "/resour/image/three/*.png",GLOB_BRACE); $img3 = array_rand($img_three); $font = __DIR__ . '/resour/font/font.ttf'; $height = $width / 3 * 2; $im = imagecreatetruecolor($width, $height); $bg = imagecreatefromjpeg($img_one[$img1]); imagecopyresized($im,$bg,0,0,0,0,$width,$height,500,340); imagecopyresized($im,imagecreatefrompng($img_two[$img2]),0,0,0,0,$width,$height,350,230); imagecopyresized($im,imagecreatefrompng($img_three[$img3]),0,0,0,0,$width,$height,350,230); if($zbp->Config('Cat_img')->aicolor){ $color = imagecolorallocate( $im, rand( 0, 255 ), rand( 0, 255 ), rand( 0, 255 ) ); } else { $color = imagecolorallocate( $im, 255, 255, 255 ); }
-------
<div class="111"></div>
-------
function ID_xxx(&$template) { global $zbp; $article = $template->GetTags('article'); $article->Content = '前面内容'. $article->Content . '后面内容'; }
然后保存就OK啦,清除一下模板缓存。
相关推荐
评论列表(12)
-
-
哈哈哈哈哈哈
-
-
我又来了,不错哦
-
-
hhhh
-
-
的是非得失
-
-
不知道这么远
-
-
盖茨比破POP娜哦哦婆婆哦哦哦我母女装优雅 我的zoom哦哦哦哦破娜我嘛痛呢哦哦娜我嘛木木末末肉娜娜娜娜偷摸头娜找我嘛哦哦娜哦。我要 嘛嘛木木末头娜娜偷娜姆POP娜木木一生一世呜呜呜祖母摩托娜root娜哦婆婆说做头娜找w
-
-
一个评论而已,没什么
-
-
zeafhs
-
-
什么贵啊啊啊啊啊啊啊
-
-
点赞,不错
-
-
@测试号 谢谢你的评论,你好棒棒啊
-
‹‹
1
2
›
››