NAVIGATION
This shows you the differences between two versions of the page.
deutsch:ersetzer_rts:frontend_render:datum-letztes-update [2018/11/14 07:58] Uwe Tholey |
deutsch:ersetzer_rts:frontend_render:datum-letztes-update [2020/03/23 11:05] (current) Uwe Tholey |
||
---|---|---|---|
Line 204: | Line 204: | ||
Dateiname: **last_update.php**\\ | Dateiname: **last_update.php**\\ | ||
Verzeichnis: ** template/inc_script/frontend_render/ **\\ | Verzeichnis: ** template/inc_script/frontend_render/ **\\ | ||
+ | phpwcms Version: ab 1.9 (PHP 7)\\ | ||
Bedingung: -> [[http://www.phpwcms-docu.de/config_dateien.phtml|include/config/phpwcms/conf.inc.php]] \\ | Bedingung: -> [[http://www.phpwcms-docu.de/config_dateien.phtml|include/config/phpwcms/conf.inc.php]] \\ | ||
Line 213: | Line 214: | ||
===== Beschreibung und Verwendung: ===== | ===== Beschreibung und Verwendung: ===== | ||
- Script in das Verzeichnis template/inc_script/frontend_render/ kopieren \\ | - Script in das Verzeichnis template/inc_script/frontend_render/ kopieren \\ | ||
- | - TAG **{DATE_UPDATE:d.m.Y H:i}** bzw. **{DATE_UPDATE:d.m.Y}** an der gewünschten Stelle im Template, wo die Ausgabe erfolgen soll, einbauen.\\ | + | - TAG **{DATE_UPDATE:d.m.Y H:i}** bzw. **{DATE_UPDATE:d.m.Y}** an der gewünschten Stelle im Template, wo die Ausgabe erfolgen soll, platzieren.\\ |
\\ | \\ | ||
- | Im Script kann nicht mehr eingestellt werden welche Ausgabe erfolgen soll. Es wird das Datum der letzten Aktualisierung ausgegeben, unabhängig davon ob Inhalte öffentlich oder nicht öffentlich sind.\\ | + | :!: Im Script kann nicht mehr eingestellt werden wie die Ausgabe erfolgen soll. Es wird das Datum der letzten Aktualisierung ausgegeben, unabhängig davon ob Inhalte öffentlich oder nicht öffentlich sind.\\ |
+ | :!: In lokalen Serverumgebungen, z.B. xampp unter Windows, ist es möglich daß die Ausgabe fehlerhaft ist. Siehe hierzu im Forum [[https://forum.phpwcms.org/viewtopic.php?p=148794#p148794]] | ||
\\ | \\ | ||
+ | |||
===== Script: ===== | ===== Script: ===== | ||
Line 232: | Line 235: | ||
if( ! (strpos($content["all"],'{DATE_UPDATE')===false)) { | if( ! (strpos($content["all"],'{DATE_UPDATE')===false)) { | ||
- | $sql = 'SELECT UNIX_TIMESTAMP(latest_ts) AS latest_ts FROM( | + | $sql = 'SELECT UNIX_TIMESTAMP(latest_ts) AS latest_ts FROM(( |
- | SELECT MAX(article_tstamp) AS latest_ts FROM '.DB_PREPEND.'phpwcms_article WHERE article_deleted=0 AND article_public=1 LIMIT 1 | + | SELECT MAX(article_tstamp) AS latest_ts FROM '.DB_PREPEND.'phpwcms_article WHERE article_deleted=0 AND article_public=1 LIMIT 1) |
UNION | UNION | ||
- | SELECT MAX(acat_tstamp) AS latest_ts FROM '.DB_PREPEND.'phpwcms_articlecat WHERE acat_trash=0 AND acat_aktiv=1 LIMIT 1 | + | (SELECT MAX(acat_tstamp) AS latest_ts FROM '.DB_PREPEND.'phpwcms_articlecat WHERE acat_trash=0 AND acat_aktiv=1 LIMIT 1) |
UNION | UNION | ||
- | SELECT MAX(acontent_tstamp) AS latest_ts FROM '.DB_PREPEND.'phpwcms_articlecontent WHERE acontent_visible=1 AND acontent_trash=0 LIMIT 1 | + | (SELECT MAX(acontent_tstamp) AS latest_ts FROM '.DB_PREPEND.'phpwcms_articlecontent WHERE acontent_visible=1 AND acontent_trash=0 LIMIT 1) |
) AS t1 LIMIT 1'; | ) AS t1 LIMIT 1'; | ||