Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-06 18:15:27

chariscomp
Member
Registered: 2006-03-02
Posts: 14

Can I use the output of one plugin in the input of another?

Hello, I am fairly new to textpattern. I am trying to use the output of one plugin in the input of another. i.e.
<pre>
< txp:chh_article_custom limit=99999 form=“event_single” listform=“event_main” section=“events” month=”<txp:mem_get name=‘mymonth’ />” time=“any” />
(ignore space between < and txp. punBB messing it up)
where mymonth=something like 2006-04.
</pre>

The output I am getting is something like this: “ time=“any” />

It appears to me that somehow the parsing engine is stopping when it sees the first /> and not going on to the end. Is there any way around this?

Thanks for any help anyone can give.

Last edited by chariscomp (2006-03-06 18:20:20)

Offline

#2 2006-03-06 18:51:22

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Can I use the output of one plugin in the input of another?

Usually this doesn’t work. If you know php there are ways around this, if you don’t like many of us, you have to wait for the PHP gods to rain down their wisdom on us lesser beings.


Offline

#3 2006-03-06 19:09:24

chariscomp
Member
Registered: 2006-03-02
Posts: 14

Re: Can I use the output of one plugin in the input of another?

yes, I figured out how to do it with php.
<pre>
< txp:php>
$vars=array();
$vars=$GLOBALS[“_GET”];
$month=$vars[“m”];
$year=$vars[“y”];
if (strlen($month)==1) {
$month=“0”.$month;
}
echo “< txp:chh_article_custom limit=99999 form=‘event_single’ listform=‘event_main’ section=‘events’ month=’$year-$month’ time=‘any’ />”;
< /txp:php>
</pre>
(note: remove spaces between < and txp. this is due to punBB formatting issues)

I am using this with the mdp_calendar plugin to create an events page that has the calendar at the top and the events listed underneath. See http://sobc.info/events (site is still under construction).

Offline

#4 2006-03-06 19:55:58

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Can I use the output of one plugin in the input of another?

chariscomp, you can show code by wrapping it in < code > < /code > tags, without the spaces of course ;)
See also this FAQ or the Textile link that you see below the message area when posting.

Offline

#5 2006-03-07 01:50:15

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: Can I use the output of one plugin in the input of another?

You may want to post this info in the thread for Greenrift’s calender plugin. I am sure others may find it useful and they won’t find here.

Offline

Board footer

Powered by FluxBB