- thinelectrons.com - http://thinelectrons.com/blog -
Exec-PHP and Mime plugins
Posted By Patricia Ritsema van Eck On 11th September 2006 @ 19:21 In Thin Electrons | 1 Comment
One of the recommende plugins in the Action Sheets is [1] Exec-PHP - a plugin which allows you to execute scripts in your posts/pages (though only at the admin level!)
I activated this one to allow an include page command written in PHP that comes from my [2] Word Site Builder word cloud script. New problem…
Even though I turned off the default rich editor in WordPress, the page displayed all wrong. The reason for this is because WordPress uses a filter which wraps paragraph tags around lines that are separated by an empty line. (This is executed by the filter_functions.php file in the wp-includes folder.)
So when the page included by the php script has empty lines in its source code, you are faced with a sudden new lay-out. In this case a word cloud with all of the words on their own line…
The solution to this problem is to install the [3] Mime plugin, which will tell the filter to mind its own business and leave all your post/page coding as is.
The documentation for this plugin is very minimal. You need to copy the php code from the site and create your own file (which I named mime.php myself, but that doesn’t seem to make that much difference). Upload this to wp-content/plugins folder and activate it from the plugin tab in your admin panel. Most people manage to figure out this part by themselves. The confusion starts with how to use the plugin…
Basically it seems to require 2 steps:
Turn off the rich text editor first. You can do this from within your user profile.
When you write a post which needs to be taken literally, just put all your code in like you normally would. Then scroll down to where it says ‘Custom Fields’ (click the + sign to unfold it if necessary). The first time you use the plugin, enter a new key field named mime_type and give it the value text/html. (The second time you use the plugin you can select the key name from the dropdown menu.)
After installing the mime.php plugin in addition to exec.php my word clouds are displaying beautifully!
Article printed from thinelectrons.com: http://thinelectrons.com/blog
URL to article: http://thinelectrons.com/blog/wp-blog-installation-action-sheets/exec-php-and-mime-plugins/
URLs in this post:
[1] Exec-PHP: http://bluesome.net/post/2005/08/18/50/
[2] Word Site Builder: http://www.thinelectrons.com/recommends/wordsitebuilder
[3] Mime plugin: http://www.uberdose.com/journal/archives/2004/07/17/mime-wordpress-plugin
[4] : http://del.icio.us/post?url=http://thinelectrons.com/blog/wp-blog-installation-a
ction-sheets/exec-php-and-mime-plugins/&title=Exec-PHP and Mime plugins
[5] : http://furl.net/storeIt.jsp?t=Exec-PHP and Mime plugins&u=http://thinelectro
ns.com/blog/wp-blog-installation-action-sheets/exec-php-and-mime-plugins/
[6] : http://user.my-tuts.com/tag-tutorial/?url=http://thinelectrons.com/blog/wp-blog-
installation-action-sheets/exec-php-and-mime-plugins/&title=Exec-PHP and Mime plugins
[7] : http://feedmelinks.com/categorize?from=toolbar&op=submit&name=Exec-PHP and Mime
plugins&url=http://thinelectrons.com/blog/wp-blog-installation-action-sheets/exec-php-and-mime-plugins/&version=0.7
Click here to print.