Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-10-13 18:57:55
- jpeacock
- New Member
- Registered: 2008-08-26
- Posts: 7
article plugin with a "wrapper" plugin?
I was curious if someone could point me the right direction with this perhaps. I posted this on an old thread about the etz_pg plugin for pagination. Since it’s technically wrapping a whole article in a plugin, how would a plugin WITHIN the article work? (since it wouldn’t be a txp tag anymore, but just read as text by the wrapper plugin).
For reference, here’s my post and the thread it belongs to:
“I know I’m digging up an old school thread here, but I installed the plugin and it works great for pagination. The problem that I’m having is that I’m also using Mary’s upm_image plugin to display images in each article, but since it’s a technically a “plugin within a plugin”, it’s not parsing the upm_image tag correctly. Any ideas on how to get this to work? I know php pretty well, but the only solution I though of was to use preg_match in the etz_pg plugin and parse out the upm_image tags/parameters and edit the etz_pg_body tag to grab the proper images and put the result in a new body variable when I output it to the page. I have the upm_image tags in about 2000 articles so I don’t really want to go back in and change them to just regular image tags. Any ideas?”
http://forum.textpattern.com/viewtopic.php?pid=194947#p194947
Offline
Re: article plugin with a "wrapper" plugin?
If you use etz_pg_body, or any other sort of container/replacer plugin, you need to parse the used content to make TXP tags within it to work. If I remember right, etz_pg_body does not run parse()
for $thisarticle['body']
, so TXP tags in the article won’t be converted into function calls.
There are also never plugins out there which you might want to consider. Including a happy little baby smd_pagicle.
Offline
#3 2009-10-23 15:39:49
- jpeacock
- New Member
- Registered: 2008-08-26
- Posts: 7
Re: article plugin with a "wrapper" plugin?
Thanks Gocom. That helps a bunch. I might edit the etz plug-in for that functionality since it would help with SEO on my project rather than a jquery option (although it’s handy from the look of it). Thanks!
Edit: btw, in case anyone else runs across it, I just edited this in the etz_page_body function:
$thisarticle[‘body’]
to
parse($thisarticle[‘body’])
Last edited by jpeacock (2009-10-23 21:44:31)
Offline