Your Ad Here

Process Tags plugin

One of the questions often seen on the Movable Type support forums is related to the usage of MT tags inside your entry text. Typically someone tried to use an MT tag inside their entry body and found that it didn’t process the tag. And someone recently asked me why they couldn’t use the MTAmazon plugin inside an entry.

The reason why this doesn’t work is that Movable Type just doesn’t look inside your entry text when it creates your pages. But now it can.

Process Tags is a new plugin from Kalsey Consulting Group that creates a new global tag attribute called process_tags. A global tag attribute is a MT tag attribute that can be used on any tag. You’ve probably seen and used the built-in global attributes like encode_html and dirify.

By using the process_tags attribute, you tell Movable Type to process all the MT tags that are contained in whatever tag you use it on. So for example, if you have included MT template tags in your entry body, you can use <MTEntryBody process_tags="1"> to make sure that those tags get used when the entry is built.

Download

Process Tags 1.0

Installation

Copy processtags.pl into a directory called plugins inside your Movable Type directory. If you don’t already have a plugins directory, create it first. Copy postproc.pm into a directory called bradchoate inside your extlib directory. If you don’t already have a bradchoate directory, create it first.

Your installation should now look like this:
mtdirectory/plugins/processtags.pl
mtdirectory/extlib/bradchoate/postproc.pm

Usage

Once you’ve installed Process Plugins, you’ll have a new global tag attribute that can be used on any non-container tag. Keep in mind, though, that just because you can use the attribute on any tag, using it on things like date tags doesn’t make much sense.

  • process_tags
    When set to 1, processes the results of any MT tag for more MT tags. For example, if you use this on your MTEntryMore tag, any MT tags inside your extended entries would be processed.

Example

<MTCategoryDescription process_tags="1">

Acknowledgements

This plugin relies upon Brad Choate’s post processing plugin, postproc.pm. Brad even updated his plugin to better support this plugin.

License

Like our other freeware, this plugin is released under the open-source MIT License. In plain English, that means you can do whatever you want with the software, including modifying it, selling it, or eating it, but we’re not responsible for anything that goes wrong.

Revision History

1.0 - August 5, 2002
Initial release.

Adam Kalsey
November 22, 2004 11:14 PM

Perl plugins don’t work with the dynamic archives. Any plugins that create things that go in templates (tags and global attributes) need to be re-written in PHP. This means creating and supporting each plugin twice, in two different programming languages.

zro@redtv
March 1, 2005 4:30 AM

awesome plugin… would love to use it. have installed correctally i believe…

but it does not work. no error on rebuild or anything. its as if i have done nothing.

the tags i use just end up in the mark-up…

any ideas? soooooooo.…. frusterating.

Trackback from blog.acorri.de
July 20, 2005 5:58 AM

bastelstunde

Excerpt: dank plugins kann man den funktionsumfang von movabletype schön aufbohren. mt-photogallery erstellt bildergalerien. process tags sorgt dafür, dass mt-tags auch in einträgen verarbeitet werden. damit das plug-in funktioniert, muss die datei "postproc...

hsz
November 30, 2005 2:15 AM

Hello. I used this plugin Process Tags to use MTGoogleMaps plugin at MT 3.2-Release2. But, the error message were displayed during I rebuilt all stuff in MT.

Undefined subroutine &MT::Plugin::GoogleMaps::GoogleMaps called at lib/MT/Builder.pm line 159.

Stuation ——————- I edited index.html(Main index) template. Before :

After :

MT System Menu : GoogleMaps plugin settings My Google Maps API key and URL have been set. “Path to the template file” text field is “/var/www/html/mt/plugins/MTGoogleMaps/”

Direstory Structure : /var/www/html/mt/extlib/bradchoate/macros.pm /var/www/html/mt/extlib/bradchoate/postproc.pm /var/www/html/mt/lib/MT/Builder.pm

GoogleMaps plugin directory /var/www/html/mt/plugins/MTGoogleMaps/.DS_Store /var/www/html/mt/plugins/MTGoogleMaps/GoogleMaps.pl /var/www/html/mt/plugins/MTGoogleMaps/map.tmpl

Other plugins : /var/www/html/mt/plugins/Blacklist/ /var/www/html/mt/plugins/nofollow/ /var/www/html/mt/plugins/spamlookup/ /var/www/html/mt/plugins/TemplateRefresh/ /var/www/html/mt/plugins/amazon.pl /var/www/html/mt/plugins/blogtimes.pl /var/www/html/mt/plugins/macros.pl /var/www/html/mt/plugins/MTIncludePlus.pl /var/www/html/mt/plugins/mt-isbn.pl /var/www/html/mt/plugins/MTPaginate.pl /var/www/html/mt/plugins/processtags.pl

OS : Fedora Core 4 Environment : Perl v5.8.6 PHP 5.0.4 MovableType version 3.2 Release-2 mtpostproc.pm version 1.3 processtags.pl version 1.0

Please teach the problem that this MT cannot be restructured(rebuild?).

As you see, my English is poor English. I will make an effort to forge an English ability every day. English that I use might be incomprehensible because of poor English. I rely on the translation engine only these sentences.

Jamie
February 6, 2006 11:11 AM

Hi - I installed Process Tags and MTGoogleMaps. I receive the following error from the cron job:

Found = in conditional, should be == at cgi-bin/mt/plugins/GoogleMap.pl line 249. Subroutine MT::Template::Context::addglobalfilter redefined at cgi-bin/mt/extlib/bradchoate/postproc.pm line 22. Subroutine MT::Template::Context::postprocesshandler redefined at cgi-bin/mt/extlib/bradchoate/postproc.pm line 41.

Any suggestions? Thanks in advance.

Geoban
March 19, 2006 9:38 PM

Wow,

That was easy. Great plugin. Exactly what I was looking for.

Thanks.

Rew Rixom
April 25, 2006 7:00 PM

That was just what I needed! Thank You! Thank You!

Eric
July 7, 2006 5:33 PM

Where does this go?

Thanks

Eric
July 7, 2006 5:34 PM

MTCategoryDescription process_tags=”1”

voids
July 13, 2006 6:32 AM

Hi~

I think it is a great plugin that I wanted.

But is it available to use this plugin in MT 3.2?

Actually I failed to use this in my weblogs.

(Every tags with this parameter meet an error messages which notifies the out-of-contexte using of template tags)

his
July 16, 2006 2:34 AM

Thank you very good plugin!

Process Tags plugin needed small hack to work with MT3.2.

But with MT3.31, original code works fine for me.

Regards, Hisaaki Shibata

Gregory
February 3, 2007 4:36 AM

I can confirm that commenting out “use bradchoate::postproc;” allows process_tags to work with MT 3.3 without requiring the postproc extension (which was disrupting Notifier on my installation).

additionally, by comment out the said line, the MT Plugins interface allows you to see the processtags ‘resources’; ie, the processtags attribute.

thank you for the plugin. I can now refer to entries by id from within entries without fear of urls gone wrong:

regards, Gregory

JR Geoffrion
February 7, 2008 11:11 AM

Has anyone been able to make the process_tag work with MT4.1? I’m having trouble and can’t figure out which lines to change to make it work.

Thanks in advance for your assistance — I’ll be happy to provide details as requested.

Gregory
April 8, 2008 8:02 AM

ProcessTags is working with 4.1 ;-)

I downloaded v1.0, commented out the “use bradchoate::postproc;” line and uploaded it to my MT4 server. I did NOT upload the postproc.pm file.

at first, I thought it wasn’t working and then I realised that I had reverted the template sets to an MT set and needed to reinsert the process_tags=”1” attribute in each and every instance of , and . once I had done that and republished the files, everything worked fine.

note that attributes are processed in the order that they are specified in the tag (new in MT4?). therefore, and are very different.

Paul
April 24, 2008 2:34 AM

Thanks Gregory, been trying to get this to work for ages, tried the same method as you and it worked!

These are the last 15 comments. Read all 31 comments here.


Your comments:

Text only, no HTML. URLs will automatically be converted to links. Your email address is required, but it will not be displayed on the site.

Name:

Email: (not displayed)

If you don't feel comfortable giving me your real email address, don't expect me to feel comfortable publishing your comment.

Website (optional):

Lijit Search

Best Of

  • Debunking predictions Read/Write Web's authors have some goofy predictions.
  • Writing Realistic Job Descriptions Publish a job listing like this one and you are virtually guaranteeing that you won't get qualified applicants for the position.
  • Newly Digital Newly Digital is an experimental writing project. I've asked 11 people to write about their early experiences with computing technology and post their essays on their weblogs. So go read, enjoy, and then contribute. This collection is open to you. Write up your own story, and then let the world know about it.
  • Comment Spam Manifesto Spammers are hereby put on notice. Your comments are not welcome. If the purpose behind your comment is to advertise yourself, your Web site, or a product that you are affiliated with, that comment is spam and will not be tolerated. We will hit you where it hurts by attacking your source of income.
  • The importance of being good Starbucks is pulling CD burning stations from their stores. That says something interesting about their brand.
  • More of the best »

Recently Read

Get More

Subscribe | Archives

Recently

Sprout Test (May 7)
A test post for Sprout widgets.
Product Leadership (May 3)
An anthology of product leadership writing.
Fighting Monster patent claims (Apr 16)
The patent bully picked on the wrong little guy.
Peavy's pine tar (Apr 6)
Jake Peavy's cheating
Bush and Morgan on inner city baseball (Mar 30)
Morgan and Bush discuss the role of baseball in the inner cities.
Not a fork (Mar 27)
We have no intention of forking Drupal. That would be nuts. So what are we doing then?
Eating our dogfood in the sausage factory (Mar 26)
Recursive development for the new Drupal powered community platform.

Subscribe to this site's feed.

Elsewhere

Feed Crier
Get alerted by IM when your favorite web sites and feeds are updated.
SacStarts
The Sacramento technology startup community.
Pinewood Freak
Pinewood Derby tips and tricks
Del.icio.us
My tagstream at del.icio.us.
Waddlespot
My son's Club Penguin community. News, blogs, tips, and tricks.

Contact

Adam Kalsey

Mobile: 916.600.2497

Email: adam AT kalsey.com

AIM or Skype: akalsey

Resume

PGP Key

©1999-2008 Adam Kalsey.
Content management by Movable Type.