Pizza-Delivering-Service
Posted: Sat 17. Jan 2009, 18:08
---------------
The phpwcms support forum will help to find answers to your questions. The small but strong community is here since more than 10 years.
https://forum.phpwcms.org/
Code: Select all
<div class="mybreadcrumb" style="border:1px solid #000;">
{BREADCRUMB}
</div>
<div class="mycontent" style="border:1px solid #000;">
{CONTENT}
<div>
<div class="senormenulanumerouno" style="border:1px solid #000;">
{thecodeformenu1}
</div>
<div class="senormenulanumerodos" style="border:1px solid #000;">
{thecodeformenu2}
</div>Code: Select all
+ root
++ News
++ Über uns
++ Kontakt
++ ......
++ Speisekarte
++++ Nudelgerichte
++++ Mexikanische Gerichte
++++ Toast
++++ .....Code: Select all
+ root
++ News
++ Über uns
++ Kontakt
++ ......
++ ==== Hidden [x] hidden and sitemap, search ..... = off
++++ Speisekarte [ ] hidden (e.g. using the ID=19) (e.g. ID=29)
Code: Select all
++ ......
++ ==== Hidden [x] hidden and sitemap, search ..... = off
++++ Speisekarte [ ] hidden (e.g. using the ID=29)
++++ linke_navi [ ] hidden (e.g. using the ID=34)
Code: Select all
[PHP] // ==== Speisekarte: Permanente Ausgabe des CP mit ID=19 ====
echo '<div><div id="my_class">{SHOW_CONTENT:CP,19}</div></div>'.LF;
[/PHP]Code: Select all
$phpwcms['allow_cntPHP_rt'] = 1; // allow PHP replacement tags and includes in content partsCode: Select all
[PHP] // ==== Speisekarte: Permanente Ausgabe des CP mit ID=19 ====
echo '<div><div id="my_class">{SHOW_CONTENT:CP,3}</div></div>'.LF;
[/PHP]Code: Select all
{SHOW_CONTENT:CP,3}It's assumed and hoped for that you do so...FlashCrack wrote:... I hope I can contribute somehow after learning lots of stuff.
Code: Select all
[PHP] // ==== Speisekarte: Permanente Ausgabe des CP mit ID=19 ====
echo '<div><div id="my_class">{SHOW_CONTENT:CP,3}</div></div>'.LF;
[/PHP]Code: Select all
<div><div id="my_class">{SHOW_CONTENT:CP,3}</div></div>Code: Select all
[PHP] // ==== Buecherliste: Ausgabe bei ID unterhalb 2 ====
if (($GLOBALS['LEVEL_ID'][1]) == 2 && isset($GLOBALS['LEVEL_ID'][2])) {
echo '<div id="box01_top1"><div id="box01_top">{SHOW_CONTENT:CP,13}{BOX_01}</div></div>'.LF;
}
[/PHP]Code: Select all
<?php
/* ================================================================
dd.mm.yyyy Short descrition
Autor: My Name
TAG: {My_Tag}
Filename: my_tag_replacer.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=xxxxx
================================================================ */
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day."); }
// ----------------------------------------------------------------
if( ! (strpos($content["all"],'{My_Tag:')===false)) {
function func_my_specials ($spec1,$spec2) {
$my_spec_result = ' ['. $spec2 . ' + '. $spec1 . ']';
return $my_spec_result;
}
function func_my_tag_replacer ($var1, $var2, $var3 = "no parameter catched") {
// My_php_code/source;
// e.g.
$my_result = ' var1= '. $var1 . func_my_specials ($var3,$var2) . '<br /> var2= '. $var2 . '<br /> var3= '. $var3 . '<br />'. LF;
return $my_result;
}
// {My_Tag:,,} or {My_Tag:}
// -----------------------------------------------------
$content["all"] = str_replace('{My_Tag:}', func_my_tag_replacer("Werner","Ulla"), $content["all"]);
$content["all"] = preg_replace('/{My_Tag:(.*?),(.*?),(.*?)}/e', 'func_my_tag_replacer("$1","$2","$3")', $content["all"]);
// -----------------------------------------------------
}
// -----------[ CLOSE ]----------------
?> Code: Select all
{My_Tag:}
{My_Tag: erster toller Text, zweiter toller text, dritter toller Text}Knutvar1= Werner [Ulla + no parameter catched]
var2= Ulla
var3= no parameter catched
var1= erster toller Text [ zweiter toller text + dritter toller Text]
var2= zweiter toller text
var3= dritter toller Text