今天忽然想给自己的blog增加一些有用的功能,最快速的方法当然就是安装插件。从http://www.berryon.com/plugin借鉴了一些插件,哈哈。

但是装Popularity Contest碰到了些问题,出现了“Plugin could not be activated because it triggered a fatal error.”
google之,发现一些解决方法,Open popularity-contest.php and scroll down to line 59. Replace require(’../../wp-blog-header.php’); with require(’../wp-blog-header.php’);
按照这个方法做了,还是一样的错误,真晕啊~

于是乎,继续google,发现有朋友说新安装的WP要把

if (isset($_GET['activate']) && $_GET['activate'] ==true) {
换成
if (isset($_GET['action']) && $_GET['action'] == ‘activate’) {

这次成功了,不过active后发现首页显示有重复,这次google半天也没找到解决方法,或者是我找的方法不对。所以只能自己动手分析下代码了。先把AKPC_SHOWPOPAKPC_SHOWHELP 2 个开关全部关了,发现没任何显示了。

ok,既然AKPC_SHOWPOP是控制内容的,那么就在代码里搜索AKPC_SHOWPOP,找到

if (AKPC_SHOWPOP == 1) {
add_action('the_content', 'akpc_content_pop');
add_action('the_excerpt', 'akpc_content_pop');
}

不太熟悉WP插件的编写,不过写程序的思想多数是相通的,既然要实现插件,那么就肯定要hook event的,试着把add_action(‘the_excerpt’, ‘akpc_content_pop’);注释掉。

ok,问题解决,明天继续研究下这个东西。

Popularity: 1% [?]

8 Responses to “安装 WordPress 插件”

  1. 感兴趣,但是不太懂这方面地东西

    Reply

  2. Henhaoa

    Reply

  3. 这个theme看得头晕

    Reply

  4. 网站没必要弄得这么华而不实,关键看内容。

    Reply

    bbdev Reply:

    很喜欢这个Theme,所以就折腾了一下

    Reply

  5. 我装这个的时候还是比较顺利的,但是我恢复数据的时候就因为这个插件有了大麻烦,不过这个插件很好很强大。

    Reply

    bbdev Reply:

    哦?要注意些什么可能发生的问题?

    Reply

  6. 太专业的东西我不懂。。。。。我是来支持的~~

    Reply

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

© 2010 黑莓风暴 Suffusion theme by Sayontan Sinha