inline-js —— wordpress plugin

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

Join the Conversation

80 Comments

  1. 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.

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

  3. How about insert Javascript code like this

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

    }

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

  4. 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:

  5. 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.

  6. 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?

  7. 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

  8. 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

  9. 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();

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

  10. 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.

Leave a comment

Your email address will not be published.