InScript

a rainy afternoon, 3 years 7 months ago | Tags: , , , , , | Written by John

download

Download: inscript.zip
Version: 1.7.3
Updated: September 18, 2007
Size: 151.97 KB

Support This Plugin!

While this software is being provided free to use, it takes considerable time to develop and support. If you do find it particularly useful or want to request a feature then consider donating money as an incentive for me to carry on developing it.

Thanks!

I have other plugins too!

InScript is an extensible scripting framework that provides the capability to insert and modify data without needing to modify any WordPress files.

At the simplest level, it is a generic pattern matcher – it searches for specific patterns, or tags, and replaces them with something else. However, instead of replacing these patterns with static text, you can replace them with variables, functions, and even PHP code.

Some of the features that InScript provides are:

  • Dynamic variables, which can be used in many places and are automatically updated (the version and last updated details above are dynamic variables)
  • Disable WordPress texturize functions across the whole blog, individual posts, or even individual words
  • Conversely, enable texturize, textile, markdown, or any formatting on individual posts or words
  • Embed well-defined scripts inside posts and any other part of WordPress, without modifying the theme

The embedded scripts are very powerful, and allow you to do things like:

  • Insert post & author information
  • Add HTTP meta-values and make them post-specific
  • Customise the appearance of words, paragraphs, or posts
  • Change date formats on individual sections
  • Insert highlighted code
  • Insert custom PHP code
  • Add custom stylesheets for specific posts

Because of the extensible nature of the plugin, you can add ‘scriptlets’ (mini-plugins) that provide extra features and yet use the same InScript framework.

Here are the current scriptlets:

  • rss-link-list.zip - embed RSS feeds in conjunction with the rssLinkList plugin (which must be installed and enabled)
  • pinyin-converter.zip - Pinyin converter allows Chinese pinyin to be inserted in the form zhong1guo2 and converted to the correct tonal version of zhōngguó

Note: install scriptlets into the /wp-content/plugins/inscript/scripts directory.

No really, what does it do?

The best way to explain what InScript does is by providing examples. Note that these examples are provided 'live' by InScript.

Example 1 – Code highlighting

Often you want to highlight some code within a post. This creates several problems:

  • Code uses special characters that interfere with HTML
  • WordPress mangles a lot of the characters
  • It’s a chore to color the code by hand

We can insert an InScript tag to do all this for us.

%%format_highlight [file=/wp-feed.php] [wp=off]%%

And this produces:

<?php
/**
 * Redirects to the RSS2 feed
 * This file is deprecated and only exists for backwards compatibility
 *
 * @package WordPress
 */

require( './wp-load.php' );
wp_redirectget_bloginfo'rss2_url' ), 301 );

?>

Example 2 – Blog title & description

Notice anything special about the title of this page? No? Okay, go and look at it again. Yes, that's right, it's different from the rest of the blog. This is because of these two custom fields:

inscript_option_blogdescription = Now with added plugin goodness!
inscript_option_blogname = SuburbanGiraffe

More fun

Of course, all of these are simplistic examples. Separate plugins already exist to achieve many of the functions described here. The point is that InScript gives you the ability to perform these functions anywhere in your blog, using just one syntax and one plugin. Additionally, you can customise the output exactly as you want, using a wider range of functions. You can cook up all sorts of madness – now, who’s for colour-highlighted code in their title?

Before I finish, here are some more live functions:

  • Word shuffle - dsmaf neirldsedf tmn unih syala sgoamaei k
  • Reverse - nigulp ym ot emoclew dna dlrow olleh
  • Rot13 - uryyb jbeyq naq jrypbzr gb zl cyhtva
  • Leet - h3ll0 w0rld 4nd w3lc0m3 70 my plug1n
  • Email obsfucator - test dot email at example dot com
  • System info - Linux 2.6.18-xen #1 SMP Tue Feb 12 06:40:50 UTC 2008 x86_64
  • Time since - this page was created 3 years 7 months ago (as opposed to 2005-06-05 11:29:09)
  • PHP version - 5.2.6-2ubuntu4
  • HTTP agent - your browser is CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
  • WordPress version - 2.7

And here's the WordPress calendar function embedded into a post:

January 2009
M T W T F S S
« Oct    
 1234
567891011
12131415161718
19202122232425
262728293031  

This article has 950 words (and this is updated live)
Share This

Comments (page 3 of 3)

  1. joetke :

    Jun 29, 2007 7:23 pm | Reply

    A complaint from a fan
    I upgrade to the latest version of inscript 1.7.3. Bad idea ! I caught this wordpress 2.1 plugin management message:
    Fatal error: Cannot redeclare escape_string() (previously declared in /var/www/wordpress/wp-content/plugins/inscript.php:70) in /var/www/wordpress/wp-content/plugins/inscript/inscript.php on line 73
    Any help will be appreciated. Sounds like a code typo ;) .Got no time to fix it on my own.

  2. John (author) :

    Jul 1, 2007 1:25 am | Reply

    Hi Joetke, it looks like you've got two versions of InScript installed. One is at plugins/inscript.php, and the other is at plugins/inscript/inscript.php. The correct version is the last.

  3. Dominic :

    Sep 10, 2007 1:58 pm | Reply

    Hi John, I'm trying to use your plugin InScript, but I can't find the documentation file "inscript.pdf". I do not see it on the plugin page or in the zip file. Please help!

  4. Andy :

    Dec 4, 2007 8:36 am | Reply

    Hi

    I can across this plugin whilst looking at your redirection plugin.

    Where is the documentation, it is not in the zip file?

    Does this plugin allow me to put javascript in a post or widget?

    Thanks in advance

  5. John (author) :

    Dec 9, 2007 11:44 pm | Reply

    Andy, Dominic, you're better off using Sniplets.

  6. stube :

    Jun 12, 2008 3:19 pm | Reply

    In oneˇs my web is it OK byut on another web is it not to good, it make a false....I must more learn - but thanks for all. Petr

  7. PinaraNet :

    Aug 19, 2008 11:07 am | Reply

    Dear John,

    How to implement php code on post or on page, like , i was try and not worked
    there manual to use this script?

    Thank you

  8. 2718 :

    Oct 10, 2008 3:40 pm | Reply

    I'd been using InScript on one of my sites for a long time and somewhere very recently, it seems to have started causing problems--with the "the_content" filter checked, the whole contents of every page and post just vanishes. I know InScript had been working for a long time and I'm not sure what changed (possibly WP2.6.x?).

  9. John (author) :

    Oct 12, 2008 3:16 am | Reply

    I'm no longer supporting InScript so I would suggest you move over to Sniplets.

  10. Stewart :

    Dec 15, 2008 2:01 am | Reply

    John stopped supporting this script? thats sad to hear... Its a good plugin. Ive just got it installed and working so Ill keep it just for now...

Pings & Trackbacks

bloggingpro.com, pruebas.flumo.com, phoenixrealm.com, nowsell.com, blog.huichen.org, garinungkadol.com, garinungkadol.com, starry.blogdns.org, p-cn1.io8.org, happy-blogging.de, puppetism.com, download.lacaterinca.com,

Leave a Reply

Home | Software | Terms & Conditions | Sitemap | John Godley © 2008
Close
E-mail It