output actions to renderer

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

output actions to renderer

Postby Jensensen » Fri 11. Dec 2009, 04:38

http://code.google.com/p/phpwcms/source/detail?r=351
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

Postby flip-flop » Fri 11. Dec 2009, 07:32

Please have a look: viewtopic.php?p=119491#p119491
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )

User avatar
Jensensen
Posts: 2986
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: output actions to renderer

Postby Jensensen » Sat 12. Dec 2009, 00:30

&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

Postby marcus@localhorst » Sat 12. Dec 2009, 13:22

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: 9385
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau
Contact:

Re: output actions to renderer

Postby Oliver Georgi » Sun 13. Dec 2009, 10:48

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: 9385
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau
Contact:

Re: output actions to renderer

Postby Oliver Georgi » Tue 29. Jul 2014, 13:22

Oliver Georgi | phpwcms Developer | GitHub | LinkedIn


Return to “phpwcms Support English”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest