output actions to renderer

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

output actions to renderer

Post by Jensensen »

http://code.google.com/p/phpwcms/source/detail?r=351
http://forum.phpwcms.org/viewtopic.php?p=119490#p119490
Wiki ToDo http://www.phpwcms-howto.de/wiki/doku.php/

Add output actions to renderer - allows to return specific sections of the page:
index.php?alias&phpwcms_output_action=F-function1|function2--S-SECT1|SECT2.


What the hell?
Sounds interesting. How can we use it? Are there any samples?
Anybody out here? Who already using it?

think there's something to learn about...
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: output actions to renderer

Post by flip-flop »

>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: output actions to renderer

Post by Jensensen »

&phpwcms_output_action=F-trim--S-AJAX
working fine.

Oh Whatever Content this is...


but what about is:
&phpwcms_output_action=F-function1|function2--S-SECT1|SECT2

F-
function1
function2
S-
SECT1
SECT2

what could it be?
for me it's too high in order to understand it.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Re: output actions to renderer

Post by marcus@localhorst »

da wirst du wohl verschiedene parts abholen können und durch diverse funktionen laufen lassen... ?! ist doch eindeutig?!
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: output actions to renderer

Post by Oliver Georgi »

Remember: you have to register any custom function which should be usable this way in var:

Code: Select all

$phpwcms['output_function_filter']
If no custom function is defined only default functions are accessible this way:

Code: Select all

$phpwcms['output_function_filter'] = array('trim', 'strip_tags');
You see - here only trim and strip_tags would be usable.

Filter functions will accept first parameter only.

Code: Select all

function my_output_filter($content='') { return $content; }
So you have to define function - maybe put it in frontend_init:

Code: Select all

<?php
function replaceme($content='') {
    return trim(str_replace('****', 'love', $content));
}
$phpwcms['output_function_filter'] = array('replaceme', 'trim', 'strip_tags');
?>
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: output actions to renderer

Post by Oliver Georgi »

Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply