{{indexmenu_n>250}}
====== Foreign content of other phpwcms ======
Selective adoption of content from a phpwcms-installation. Condition is internal access //(own account)// to the other phpwcms installation.
----
V1.0 02.03.2011
Docu: -- \\
Google code r351: [[http://code.google.com/p/phpwcms/source/detail?r=351|Add output actions to renderer]] \\
Forum: [[http://forum.phpwcms.org/viewtopic.php?p=120275|... Elemente einer anderen Website zurückliefern lassen [DE]]] \\
Forum: [[http://forum.phpwcms.org/viewtopic.php?p=125825|News auf zwei Seiten verfügbar machen [DE]]] \\
Forum: [[http://forum.phpwcms.org/viewtopic.php?p=133806#p133806|Navigation dynamisch in einen externen Blog übernehmen [DE]]] \\
**Author:** O. Georgi (slakero) http://phpwcms.de \\
**CMS Version:** >= 1.42 r351\\
**Version:** \\
Tag: -- \\
Filename: -- \\
Folder: -- \\
**Condtion:** --
----
----
\\
==== Description ====
The notation:
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.
Function are 1 parameter functions and allowed functions must be defined in
(array)$phpwcms['output_function_filter']. Only functions defined in that config
will be usable: $phpwcms['output_function_filter'] = array('trim',
'strip_tags');
* split by function - value: **%%F-function1|function2|function3%%**
* split by section - value: **%%S-SECT1|SECT2|SECT3%%**
The processing is done by the pipe | separated sequence.
\\
==== Procedure for the use of the sections: ====
**News of phpwcms installation will be shown on another page:**
* For example, the calling page set up a command at the place from where you want to display the content of the page called: \\ ##%%{URL:http://example.com/index.php?ALIAS&phpwcms_output_action=S-NEWS01}%%## \\
Where "ALIAS" is an category/article of the called page "example.com".\\
The call is working with id=[catergory ID] and aid=[article ID] too instead of ALIAS!\\
Advantage of id and aid compared to ALIAS: If the alias of the page or structure level is changing later on (e.g. by SEO- adjustments), the link will still keep on working!
* In the called side, the sections can be called are limited with the TAGs ##%%%%## ...... ##%%%%##. \\ Similarly, with **%%...&phpwcms_output_action=S-NEWS02%%** the TAGs **%%%%** ...... **%%%%** etc.
\\
**The menu of phpwcms installation will be shown on another page:**
* In the template, the area is to be displayed surrounded with
* In the calling side this part is integrated with http://www.example.com/index.php?mypage&phpwcms_output_action=S-MENU
\\
The contents of a phpwcms installation can also be picked up and displayed from other installation ore sides . An admin access to the phpwcms installation is necessary to set the TAGs ##%% ... %%##.
\\
The variant "F-function" is explained later.
\\
--- //[[flip-flop@myrealbox.com|Knut Heermann (flip-flop)]] 2011/03/01 22:19//
==== More Possibilities ====
$phpwcms['output_function_filter'] = array('trim', 'utf8_encode');
or
To UTF-8 phpwcms_output_action=F-utf8_encode--S-EVENTS
From UTF-8 phpwcms_output_action=F-utf8_decode--S-EVENTS
==== Load the appropriate CSS from another Server: ====
By OG: Forum: [[http://forum.phpwcms.org/viewtopic.php?p=135105#p135105|remote CSS in den HEAD-Bereich injizieren]] \\
if(typeof load_remote_css == "undefined" || load_remote_css == true) {
var css_link = document.createElement('link');
css_link.type = "text/css";
css_link.rel = "stylesheet";
css_link.href = "http://www.example.com/my.css";
document.getElementsByTagName('head')[0].appendChild(css_link);
var load_remote_css = false;
}
==== Load the appropriate JS from another Server: ====
Von OG: Forum: [[http://forum.phpwcms.org/viewtopic.php?f=28&t=22654&start=15#p141854|remote CSS in den HEAD-Bereich injizieren]] \\
if(typeof load_remote_js == "undefined" || load_remote_js == true) {
var js_script = document.createElement('script');
//js_script.async = 1;
js_script.src = "http://www.example.com/my.js";
document.getElementsByTagName('head')[0].appendChild(js_script);
var load_remote_js = false;
}