Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: rah_external_output
A new version, 0.3, released. Changelog:
- Fixed error caused by non-set
$pretext. - Set
$pretextindexes to empty: we are not on page template.
colak wrote:
What I would like to hear is an example on how other content types could be incorporated.
Content-type is a content type. Mime. Media type. Thing that allows your code to generate different kind of files for different situations. For example text/xml is content type for xml file and so on…
The Arrange content-types interface is used to create a predefined list of content-types, to help the author to set them for the snippets. By creating the list of content-types, the content-type field in the snippet creation page will turn into a select field.
By default, if you don’t create or set content types to snippets, it defaults to text/html with utf-8 encoding (the default that txp sets).
Last edited by Gocom (2009-05-10 08:17:55)
Offline
Re: rah_external_output
Your latest fix did it! I really think that this plugin should be part of the core as it might soon become an indispensable addition to many installs.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: rah_external_output
Does anybody know how to exclude the external output from slimstat using wet’s plugin
I added http:\/\/www.domain.tld\/\?rah_external_output=my-output but the hits still show. Am I missing something?
>Edit: Maybe I should have posted this in wet’s thread.
Last edited by colak (2009-05-12 05:52:09)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: rah_external_output
colak wrote:
I added
http:\/\/www.domain.tld\/\?=my-outputbut the hits still show. Am I missing something?
Just missusing regular expressions. Examples:
|rah_external_ouput||\?rah_external_output||^\/\?rah_external_output=|
[…]
Last edited by Gocom (2009-05-12 06:53:34)
Offline
Re: rah_external_output
thanks Jukka. your examples worked just fine.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: rah_external_output
FireFusion wrote:
Great this is very useful.
Am using it to output my iCal feed and slideshow XML (rather then using up more sections).
FireFusion, I would love to know more about this if you have the time. I am trying to output content from a Google calendar into this page: www.beerrun.com/test. Used an rss feed program, but that only outputs events that already happened, not future events.
Offline
Re: rah_external_output
A new version 0.4 of rah_external_output released. Update comes with a bug fix. Changelog:
- Fixed forgotten insert query escaping.
Change is as big as one word, doSlash. Somehow code missed it. I strongly recommend updating before using saving any output with the plugin’s editor.
Offline
#23 2009-07-05 17:48:32
- FireFusion
- Member

- Registered: 2005-05-10
- Posts: 698
Re: rah_external_output
Hi Gocom,
I can’t get this working with adi_gps no matter where i put it in the load order. Am trying to assign a category for my slideshow through get variable.
<txp:smd_gallery category='<txp:adi_gps name="image_cat" />' limit="9999" sort="date">
{grouptagstart}
<image source="{id}{ext}" thumbnail="{id}t{ext}" title="{name}" description="{caption}" link="{alt}" />
{grouptagend}
</txp:smd_gallery>
</contents>
</album>
Offline
#24 2009-07-05 17:51:23
- FireFusion
- Member

- Registered: 2005-05-10
- Posts: 698
Re: rah_external_output
molly wrote:
FireFusion wrote:
Great this is very useful.
Am using it to output my iCal feed and slideshow XML (rather then using up more sections).
FireFusion, I would love to know more about this if you have the time. I am trying to output content from a Google calendar into this page: www.beerrun.com/test. Used an rss feed program, but that only outputs events that already happened, not future events.
I use this plus smd_calendar
BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:<txp:site_name /> Calendar
PRODID:-//Apple Computer, Inc//iCal 1.5//EN
METHOD:PUBLISH
X-WR-TIMEZONE:Europe/London
<txp:smd_article_event time="future" limit="1000" section="courses" stepfield="custom_1" skipfield="custom_2" extrafield="custom_3">
BEGIN:VEVENT
DTSTART:<txp:posted format="%Y%m%dT%H%M%S" />
DTEND:<txp:posted format="%Y%m%d" /><txp:expires format="T%H%M%S" />
SUMMARY:<txp:title />
END:VEVENT
</txp:smd_article_event>
END:VCALENDAR
Offline
Re: rah_external_output
FireFusion wrote:
I can’t get this working with adi_gps no matter where i put it in the load order. Am trying to assign a category for my slideshow through get variable.
- Make sure that the GET variable is assigned into the slideshow script (and into the
rah_external_output’s url). - Make sure that adi_gps is loaded before rah_external_output kills (load order is higher).
- Make sure that adi_gps doesn’t use
$pretextor etc. TXP’s global arrays. We are not on section page, so those aren’t set. Plugins are loaded before TXP’s$pretextglobal.
Last edited by Gocom (2009-07-05 19:02:39)
Offline
#26 2009-07-05 20:01:52
- FireFusion
- Member

- Registered: 2005-05-10
- Posts: 698
Re: rah_external_output
1. Done
2. Done
3. Nope
/*
adi_gps - Extract GET & POST variables
Written by Adi Gilbert
Released under the GNU General Public License
Version history:
0.1 - initial release
*/
function adi_gps($atts) {
extract(lAtts(array(
'name' => '', // a single GET/POST var
'new' => '', // new variable name
'txpvar' => '1', // set as a TXP variable or not
'post' => '0', // extract POST vars or not
'quiet' => '0', // return value or not
'global' => '1', // make vars global or not
'escape' => '', // escape HTML entities or not
'decode' => '0', // perform a urldecode or not
'list' => '0', // list variable names and values
'debug' => '0',
), $atts));
if ($name == '') { // no single var specified, so all vars extracted
$quiet = 1; // force quiet mode
$new = ''; // disable var rename
$get_list = array_keys($_GET);
$post ?
$post_list = array_keys($_POST) : $post_list = array();
$name_list = array_merge($get_list,$post_list);
}
else
$name_list[] = $name;
$debug_list = 'adi_gps variables';
foreach ($name_list as $index => $name) {
$value = gps($name); // extract value
if ($decode) // convert %chars
$value = urldecode($value);
if ($escape == 'html') // encode chars (e.g. ampersand becomes &)
$value = htmlentities($value);
if ($new) // rename var (single var mode only)
$name = $new;
if ($txpvar) // create TXP variable
parse('<txp:variable name="'.$name.'" value="'.$value.'"/>');
if ($global) // make the variable global
$GLOBALS[$name] = $value;
if ($list)
$debug_list .= ":$name=$value";
}
if ($debug) {
echo 'SUPPLIED ATTRIBUTES:<br/>';
dmp($atts);
echo "GET VARS:<br/>";
dmp($_GET);
echo "POST VARS:<br/>";
dmp($_POST);
echo "ADI_GPS VAR LIST:<br/>";
dmp($name_list);
echo "ALL TXP VARS:<br/>";
dmp($GLOBALS['variable']);
}
if ($list)
return $debug_list.'<br/>';
else
if ($quiet) // don't report value
return '';
else // return value
return $value;
}
:)
Last edited by FireFusion (2009-07-05 20:02:16)
Offline
Re: rah_external_output
This is an awesome plugin. One warning: External output doesn’t work if your site’s production status is set to “Debugging”. I just spent 45 minutes trying to chase down a non-existent js bug or plugin collision with the site in “Debugging”— when I switched it to “Testing” or “Live” it worked perfectly again (this occurred in Textpattern 4.0.8).
Offline
Re: rah_external_output
johnstephens wrote:
This is an awesome plugin. One warning: External output doesn’t work if your site’s production status is set to “Debugging”. I just spent 45 minutes trying to chase down a non-existent js bug or plugin collision with the site in “Debugging”— when I switched it to “Testing” or “Live” it worked perfectly again (this occurred in Textpattern 4.0.8).
If you use the plugin, you might get some “errors” specially in the Debugging mode. This is caused by the fact that the plugin outputs the content in a non section/any context. All plugins/code/tags that hook or do something that requires section or something similiar, might cause problems.
What is the error message?
Last edited by Gocom (2009-08-07 23:13:15)
Offline
#29 2010-02-11 19:21:53
- lovetheg
- New Member
- Registered: 2010-02-11
- Posts: 5
Re: rah_external_output
Hi,
I’d like to use this plugin to display the dynamic navigation bar I use in my textpattern pages on external (static) php pages elsewhere in the same domain. So I’ve copied the form code and made an external snippet, which then looks OK through URL given via the ‘view’ link in the plugin.
My question is, how do I then pull that code into my php file, I tried…
<?php include($DOCUMENT_ROOT . "http://my-txp-site.tld/?rah_external_output=nav-form"); ?>
…as suggested previously in this thread but it did seem not work. and also…
<?php include("http://my-txp-site.tld/?rah_external_output=template1"); ?>
…still no joy? Can you give me some help as I’m completely stuck!
Thanks,
Dan
Offline
#30 2010-02-14 16:44:21
- lovetheg
- New Member
- Registered: 2010-02-11
- Posts: 5
Re: rah_external_output
Bump! Can anyway help with my previous post? Would really like to use this.
Thanks muchly.
Offline