InScript

a rainy afternoon, 3 years 3 months ago | Tags: inscript, php, plugin, rss, theme, wordpress | 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
/**
 * Outputs the RSS2 feed XML format. This file is a shortcut or compatibility
 * layer for easily finding the RSS feed for the site. It loads WordPress using
 * the wp-blog-header.php file and running do_feed() function.
 *
 * @see do_feed() Used to display the RSS2 feed
 *
 * This file is no longer used in WordPress and while it is not deprecated now.
 * This file will most likely be deprecated or removed in a later version.
 *
 * The link for the rss2 feed is /index.php?feed=rss2 with permalinks off.
 *
 * @package WordPress
 */

if (empty($doing_rss)) {
    
$doing_rss 1;
    require(
dirname(__FILE__) . '/wp-blog-header.php');
}

do_feed();

?>

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 - smdhinfamnnola gues f el tr i diaysmaekd as 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 3 months ago (as opposed to 2005-06-05 11:29:09) PHP version - 5.2.3-1ubuntu6.3 HTTP agent - your browser is Opera/9.52 (Windows NT 5.1; U; en) WordPress version - 2.6.1

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

September 2008
M T W T F S S
« Feb    
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30  

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

Comments (page 11 of 11)

author
PinaraNet :

Aug 19, 2008 11:07 am

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

author
stube :

Jun 12, 2008 3:19 pm

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

author
John (author) :

Dec 9, 2007 11:44 pm

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

author
Andy :

Dec 4, 2007 8:36 am

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

author
Dominic :

Sep 10, 2007 1:58 pm

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!

author
John (author) :

Jul 1, 2007 1:25 am

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.

author
joetke :

Jun 29, 2007 7:23 pm

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.

Pings & Trackbacks

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

Leave a comment


XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

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


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser