NAVIGATION
RT to create your own output of the date, independently of the system-TAGs. Date TAGs.
E.g. a solution to set the current copyright date (year) automatically.
The output format of the date is set directly in the script.
Used for the output the standard php-date rules, see PHP: date - Manual
rt_date_enhancedX V1.0 09.08.2011
Docu: –
Forum: –
Author: K.Heermann (flip-flop) http://planmatrix.de
CMS Version: >= 1.3
Version: V1.0
TAG: {DATEX_xxx}, e.g. {DATEX_YEAR}
Filename: rt_date_enhancedX.php
Folder: template/inc_script/frontend_render/
Condition: → /config/phpwcms/conf.inc.php
This example shows the TAGs for the output of the current-year, month and day.
Settings in the replacer lines:
You can install separate TAGs with other substitutions.
Filename: rt_date_enhancedX.php
Folder: template/inc_script/frontend_render/
<?php // ---------------------------------------------------------------- // simple date replacement: e.g. only actual year or month or day or what you like // TAG {DATEX_xxxx} // KH (flip-flop): 09.08.2011 // ---------------------------------------------------------------- // ---------------------------------------------------------------- // obligate check for phpwcms constants if (!defined('PHPWCMS_ROOT')) {die("You Cannot Access This Script Directly, Have a Nice Day.");} // ---------------------------------------------------------------- if( ! (strpos($content["all"],'{DATEX_')== false)) { $content["all"] = str_replace('{DATEX_YEAR}', international_date_format($template_default["date"]["language"], 'Y'), $content["all"]); $content["all"] = str_replace('{DATEX_MONTH}', international_date_format($template_default["date"]["language"], 'm'), $content["all"]); $content["all"] = str_replace('{DATEX_DAY}', international_date_format($template_default["date"]["language"], 'd'), $content["all"]); } ?>