....
....
....
....
\\
Nach dem Scriptdurchlauf:
....
....
....
....
Das erste ''%%%%'' wird durch die Anweisung in ''$_prefix'' im Script ersetzt.
Das letzte ''%%%%'' wird durch die Anweisung in ''$_suffix'' im Script ersetzt.
\\
===== PHP: =====
In den beiden Variablen $_prefix und $_suffix werden die umschließenden Anweisungen eingetragen.
$_prefix = ''; // before articles-list
$_suffix = ''; // behind articles-list
\\
**Datei:** template/inc_script/frontend_render/rt_article_list_wrap.php
*
* article list template
*
*
* ----------------------------------
*
* Filename: rt_article_list_wrapper.php
* Folder: /template/inc_script/frontend_render/
* Switch: $phpwcms['allow_ext_render'] = 1; (/config/phpwcms/conf.inc.php)
*
* Forum: http://forum.phpwcms.org/viewtopic.php?p=110038#p110038
*******************************************************************/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day."); }
// ----------------------------------------------------------------
// Article list wrapper
// ================================================================
// Is there the right article list?
if( ! (strpos($content["all"],'') === false)) {
// -----CUSTOM------------------------------------
$_prefix = ''; // before articles-list
$_suffix = ''; // behind articles-list
$_a_entry = '';
$_a_end = '';
// -----------------------------------------------
// reverting for faster replace
$_a_end = strrev($_a_end);
$_suffix = strrev($_suffix);
// make a regex like pattern
$_a_entry = preg_quote($_a_entry, '/');
$_a_end = preg_quote($_a_end, '/');
// Only the first entry
// ----------------------------------
$content["all"] = preg_replace('/'.$_a_entry.'/',$_prefix.LF,$content["all"],1);
// Only the last entry (reverting is much faster as REGEX (last))
// ----------------------------------
$content["all"] = strrev($content["all"]);
$content["all"] = preg_replace('/'.$_a_end.'/',$_suffix.LF,$content["all"],1);
$content["all"] = strrev($content["all"]);
}
?>