inline-js —— wordpress plugin

Table of content

Description

本插件可在文章或页面中插入javascript的内容。

Plugin Name: Inline Javascript Plugin
Plugin URI: http://www.ooso.net/inline-js
Feed URI: http://feed.ooso.net
Description: Plugin that insert inline javascript in Posts/Pages
Version: 0.6
Author: Volcano
Author URI: http://www.ooso.net

Usage

English version:

  • Unzip
  • Copy inline-js.php to direcotry wp-contents/plugin and activate the plugin.
  • Setup
    • Disable tag balancing ‘WordPress should correct invalidly nested XHTML automatically’ through the ‘Options / Write’ menu in WordPress
    • Disable the WYSIWYG rich editor in the user’s settings through the ‘Users / Your Profile’ menu
    • Assign the ‘unfiltered_html’ capability to the user. Assigning capabilities to roles or users is out of the scope of this plugin. Because WordPress has no built-in configuration menu in the admin menu to assign roles/capabilities, you need to install the role/capability manager plugins role-manager.
  • Use [inline] and [/inline] tag around the javascript,and post it
  • Ok

中文版本:

  • 解压
  • 复制inline-js.php到wp-contents/plugin目录并激活插件.
  • 设置
    • 在设置 / 撰写中关闭这个选项”WordPress 应当自动修正无效的 XHTML 嵌套”(‘WordPress should correct invalidly nested XHTML automatically)
    • 在用户 / 您的个人资料中关闭Use the visual editor when writing
    • 给你的帐号添加 ‘unfiltered_html’ 权限. 可以通过安装role-manager插件来搞定。
  • 在写博客的时候使用[inline],[/inline]包住javascript,并发表

Example


[inline]

[/inline]

ChangeLog

0.6 [download]

  • work with excerpt box
  • fix minor bug

0.5 [download]

  • fix && operator

80 条评论 »

  1. Time Synchronisation 于 2008-12-10 @ 19:21:03 留言

    This plugin is ace

  2. JC 于 2009-02-03 @ 00:10:34 留言

    Anyone test this with 2.7? If so, please respond.

  3. Volcano 于 2009-02-03 @ 10:08:20 留言

    It work great with 2.7

  4. marke 于 2009-03-02 @ 05:53:58 留言

    how do you assign the ‘unfiltered_html’ capability to the user?

  5. Alexwebmaster 于 2009-03-03 @ 18:39:18 留言

    Hello webmaster
    I would like to share with you a link to your site
    write me here preonrelt@mail.ru

  6. Volcano 于 2009-03-03 @ 20:42:21 留言

    Assign the ‘unfiltered_html’ capability to the user. Assigning capabilities to roles or users is out of the scope of this plugin. Because WordPress has no built-in configuration menu in the admin menu to assign roles/capabilities, you need to install the role/capability manager plugins role-manager.

  7. Nobuko 于 2009-07-01 @ 04:10:28 留言

    Hi. Is’s seem work on index page but it’s not working on archive page. I’m using WordPress 2.8.1.

  8. Claude @ Clickbank Profit System 于 2009-09-01 @ 05:15:13 留言

    Thank you for the pluging information.Its such a pain when links are open as we lose commisions. Now I can protect them better.

  9. Buntköchin 于 2009-10-09 @ 18:47:05 留言

    Thank you so much. Your plugin was a great help for me and it is really simple to let it work.

  10. Alex 于 2009-10-14 @ 04:37:10 留言

    How about insert Javascript code like this

    if (typeof a1==”string” && typeof a2==”string” )
    {

    }

    && was posted as && and script does n’t work!!!

  11. Monte 于 2009-12-08 @ 09:02:07 留言

    Hi. Great plugin.

    It appears that if the AND operator is used, it doesn’t work correctly:

    if (document.getElementById(“myImage”)) // THIS WORKS
    if (document.all && document.getElementById(“myImage”)) // THIS DOESN’T WORK

    The code (your code or WordPress) replaces one of the ampersands with its entity code &

    monte

    {x:

  12. Volcano 于 2009-12-10 @ 07:26:10 留言

    Hi Mnote & Alex

    I just updated the plugin, tested with 2.8.6.

    Please try it.

  13. Mark 于 2009-12-21 @ 14:55:12 留言

    Nice plugin thanks! Keep up the good work.

  14. Jan 于 2010-01-02 @ 17:01:08 留言

    Hi there, your plugin unfortunately messes up published source code in a post if the WordPress site uses a syntax highlighter plugin like Syntax Highlighter or Highlighter Evolved. Obviously, your plugin modifies content that is outside the inline tag which I think is a very bad idea.

  15. pantelis 于 2010-01-09 @ 22:42:28 留言

    Great plugin.Works with version 2.9.0

  16. Stephen 于 2010-03-16 @ 02:16:23 留言

    Wow, I can’t believe your plugin work wonderfully well with 2.9.
    Great work!

  17. Tom 于 2010-03-17 @ 09:57:27 留言

    Been looking for something like this all day. Got it working on one of my blog. Thanks for the plugin work perfectly.

  18. Roger 于 2010-03-20 @ 07:53:49 留言

    This plugin is amazing – small problem cannot get rid of seeing [inline] and [/inline] on my page and also not sure if related but seems to crach ie6? with kb927917 issue?

  19. fernand 于 2010-03-23 @ 04:03:44 留言

    hey great plugin, just installed and it works in the preview section of the post, but shows up as code in the published version. thoughts?

  20. sebbi83 于 2010-07-07 @ 17:09:07 留言

    Very nice plugin… It works perfect for me…

  21. Jason King 于 2010-08-12 @ 09:57:04 留言

    I followed the instructions above but used role scooper instead, then wrapped my js in the short code. No results though on WP 3.0

  22. zanes 于 2010-09-30 @ 04:45:00 留言

    I see the words [inline] and [/inline] appearing as test before and after the JS.
    WP 3.0.1
    How to fix this?

  23. Neil 于 2010-10-10 @ 22:31:05 留言

    Hi I cant get it to work, I have folowed all the steps, and inseted the tags, doesnt work for me. I am trying to play a pop over video across the fronmt of the pager, it’s javascript, th epage is :

    this ithe js:

    video(‘id1′,www.biztekwebvideo.com/wp-content/uploads/popover/deviant.mp4’,320,240);
    form(‘id2′,’http://www.biztekwebvideo.com/wp-content/uploads/popover/form.htm’,300,320);
    addFloating(‘id1’,100,-240);
    addFloating(‘id2’,550,-345);
    runFloating();

    </scr
    should the inline tags be stripped out when you vies the source?

    regsrds
    NM

  24. Neil 于 2010-10-10 @ 22:32:14 留言

    sorry the js didn’t format properly:

    &&&&&&&&&&&&&&&&&&&&&&&&&&&&

    video(‘id1′,www.biztekwebvideo.com/wp-content/uploads/popover/deviant.mp4’,320,240);
    form(‘id2′,’http://www.biztekwebvideo.com/wp-content/uploads/popover/form.htm’,300,320);
    addFloating(‘id1’,100,-240);
    addFloating(‘id2’,550,-345);
    runFloating();

    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

  25. peter 于 2010-12-14 @ 11:43:27 留言

    it seems to work fine in wordpres mu 3.03, leaving the sywwig on but not using it obviously , as it corrupts code as always.
    even without role manager.

    the only issue is that is seems to remove the new line to BR, so all th eformatign goes.

    I can’t see where in the pre replace it would do this.

    if it was possible to put that back in, that would be enourmous.

  26. Tuttoirlanda 于 2011-05-18 @ 00:02:44 留言

    Just to inform you that the plug in work fine with my website.

    It is excellent because it solved almost all my issues.

    Great plugin. Magic!!!!

    Thanks indeed
    Donald

  27. รองเท้าเพื่อสุขภาพ 于 2011-06-21 @ 11:24:35 留言

    the only issue is that is seems to remove the new line to BR, so all th eformatign goes.

  28. Cepj 于 2011-08-30 @ 16:21:16 留言

    The plugin does not work with wp 3.2.1. It did work before wp update.

  29. simK 于 2011-11-02 @ 01:45:33 留言

    Need updtate for WP 3.2.1, the plugin doesn’t work!!!

  30. Suresh 于 2012-05-08 @ 12:27:50 留言

    Nice Plugin. Thanks

RSS 为此帖反馈评论

留条评论