From e33c245d910e55b8cab407a03e669470509a705d Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Fri, 10 Mar 2017 21:46:12 +0100 Subject: Several changes have been made in this commit, which together with the previous commits result in version 1.1: + The rules for the Apache and nginx configuration have been changed and redirects now all requests to the index.php. + A router class has been added which now handles all requests that arrives at the application on the index.php. + Short-hand functions "PAGE", "POST" and "USER" for use in templates added to get specific item data by ID. + More language variables have been added to the core language. --- template/standard/html/feed/main.php | 10 ++++++---- template/standard/html/main.php | 32 ++++++++++++++++++++------------ template/standard/lang/de.php | 6 ------ template/standard/lang/en.php | 6 ------ 4 files changed, 26 insertions(+), 28 deletions(-) (limited to 'template') diff --git a/template/standard/html/feed/main.php b/template/standard/html/feed/main.php index 174a841..c8dcc3c 100644 --- a/template/standard/html/feed/main.php +++ b/template/standard/html/feed/main.php @@ -7,17 +7,19 @@ # # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# +$BLOGMETA_NAME = escapeHTML($BLOGMETA['NAME']); + switch($FEED['TYPE']) { case 'post': - $title = escapeHTML($BLOGMETA['NAME']).' ['.$Language->template('feed_only_posts').']'; + $title = $Language->text('feed_name_posts', $BLOGMETA_NAME); $self = Application::getURL('feed/post/'); break; case 'page': - $title = escapeHTML($BLOGMETA['NAME']).' ['.$Language->template('feed_only_pages').']'; + $title = $Language->text('feed_name_pages', $BLOGMETA_NAME); $self = Application::getURL('feed/page/'); break; default: - $title = escapeHTML($BLOGMETA['NAME']); + $title = $Language->text('feed_name_items', $BLOGMETA_NAME); $self = Application::getURL('feed/'); } ?> @@ -32,7 +34,7 @@ switch($FEED['TYPE']) { - <?=escapeHTML($BLOGMETA['NAME'])?> + <?=$BLOGMETA_NAME?> diff --git a/template/standard/html/main.php b/template/standard/html/main.php index 19d3b29..e6c0e10 100644 --- a/template/standard/html/main.php +++ b/template/standard/html/main.php @@ -6,6 +6,14 @@ # [see documentation] # # # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# + +#=============================================================================== +# Escape parameters which are used several times here to reduce escapeHTML calls +#=============================================================================== +$HEAD_NAME = isset($HEAD['NAME']) ? escapeHTML($HEAD['NAME']) : NULL; +$HEAD_DESC = isset($HEAD['DESC']) ? escapeHTML($HEAD['DESC']) : NULL; +$BLOGMETA_NAME = escapeHTML($BLOGMETA['NAME']); +$BLOGMETA_DESC = escapeHTML($BLOGMETA['DESC']); ?> @@ -14,16 +22,16 @@ - - + + - - + + @@ -35,18 +43,18 @@ - - - + + + - <?=escapeHTML("{$HEAD['NAME']} | {$BLOGMETA['NAME']} {$BLOGMETA['DESC']}")?> + <?="{$HEAD_NAME} | {$BLOGMETA_NAME} {$BLOGMETA_DESC}"?>
- "> - + "> +
diff --git a/template/standard/lang/de.php b/template/standard/lang/de.php index 9a59847..d2b094c 100644 --- a/template/standard/lang/de.php +++ b/template/standard/lang/de.php @@ -13,12 +13,6 @@ #=============================================================================== $LANGUAGE['date_format'] = '[D].[M].[Y] [H]:[I]'; -#=============================================================================== -# Specific item only feed -#=============================================================================== -$LANGUAGE['feed_only_posts'] = 'nur Beiträge'; -$LANGUAGE['feed_only_pages'] = 'nur Seiten'; - #=============================================================================== # Main navigation strings #=============================================================================== diff --git a/template/standard/lang/en.php b/template/standard/lang/en.php index 416574f..c00ec36 100644 --- a/template/standard/lang/en.php +++ b/template/standard/lang/en.php @@ -13,12 +13,6 @@ #=============================================================================== $LANGUAGE['date_format'] = '[Y]-[M]-[D] [H]:[I]'; -#=============================================================================== -# Specific item only feed -#=============================================================================== -$LANGUAGE['feed_only_posts'] = 'only posts'; -$LANGUAGE['feed_only_pages'] = 'only pages'; - #=============================================================================== # Main navigation strings #=============================================================================== -- cgit v1.2.3