【 自有用處 】

Inline Tag Thing 简单修改

2012/02/09
修改后可使用,但是还是会出下下.因为不影响使用,我就这样修改了!
参考[Plugin: Inline Tag Thing] Permissions problem: can't edit tags
I was having the same issue with this plugin

I changed the beginning of Line 32 of InlineTagThing.php
from:

if (!current_user_can( 'edit_post', $postid))

to:

if (!current_user_can( 'administrator' ))

This allowed me to edit the tags. I get an error stating 'Error saving tag' every now and then, but it actually does save the tags.

原因不明,发现我无法使用!

参照WP plugin: アーカイブ表示等から連続軽快タグ付け – Inline Tag Thing
这个插件默认是在文章正文下,出现add和del.
因为基本上大多数 tag就是放在文章正文下面的,所以还看不出什么不足的地方.有时候如果把tag放在左栏或者右栏,这时候add和del还在正文下面,改起来或者说看上去有点不爽了~.所以最好是把他的修改放在tag下面.
在插件的 php
搜索到下面内容

if ($automagicEmbed) {
    add_action('the_content', 'ITT_EmbedWidget');
}

改为如下 即可

if ($automagicEmbed) {
    add_action('the_tags', 'ITT_EmbedWidget');
}

这样子自己看上去舒服多了.虽然别人是看不到到底是怎么回事的.

其实主要是自己的归档栏是只出现标题,日期,分类和标签的.没有正文部分.
所以这样设置之后,可以非常方便的来删减tags.如下图

一般情况下是这样 .当然有点难看.琢磨改下css?

改掉背景颜色就可以了~~ 改成如下

return "<div class=\"itt_tagBox\" style=\"padding:3px;\"><strong>Add</strong> <input type=\"text\" size=\"9\" id=\"soloAddTag-$postid\" /><input type=\"button\" value=\"+\" onClick=\"Things_AddTagToPost(document.getElementById('soloAddTag-$postid').value, '$postid')\" /> &nbsp; Del: <span id=\"assignedTags-$postid\">" . ITT_GetSimpleTagList($postid) . "</span><br />$existingTagsWidget</div>";
}

侧栏如下

更新日:2012/02/09 · 18:13


————本日志版权归花莫笑所有。
日志内的相关图文请勿转载。

Leave a Reply

Your email address will not be published.

[太开心] [二哈] [doge] [太阳] [允悲] more »
Support By henghost
©2006-2023 ファモシャオの声優レコード | WordPress Theme: Cosimo by CrestaProject.