aboutsummaryrefslogtreecommitdiffstats
path: root/template/standard
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-08-11 03:24:07 +0200
committerThomas Lange <code@nerdmind.de>2017-08-11 03:24:07 +0200
commita9684792106e4de3aa622d33a0ed7780cbd67ad0 (patch)
tree4051a0a99e2b4388bd919d3c90444d6b612a0400 /template/standard
parent6c550895ef0f27bf84b8a5d7917eeee3e3122f67 (diff)
downloadblog-a9684792106e4de3aa622d33a0ed7780cbd67ad0.tar.gz
blog-a9684792106e4de3aa622d33a0ed7780cbd67ad0.tar.xz
blog-a9684792106e4de3aa622d33a0ed7780cbd67ad0.zip
Several changes have been made in this commit, which together with the previous commits result in version 2.3:v2.3
+ Optimization: Originally, the core and template languages were completely separated in the logic of the Language class and you had to use "$Language->text()" to get a core language string and "$Language->template()" to get a template language string. Since this commit, the core and template language strings are still located in different files, but you now have to use "$Language->text()" for core and template language strings both. Thus, you can now even overwrite a core language string from the language file of a template if the core language string does not satisfy you. + Deprecated: The method "$Language->template()" was marked as deprecated and will be removed in further versions (currently, it's just an alias for "$Language->text()"). Template upgrade to version 2.3 (only for customized templates): SEARCH: $Language->template REPLACE: $Language->text
Diffstat (limited to 'template/standard')
-rw-r--r--template/standard/html/403.php4
-rw-r--r--template/standard/html/404.php4
-rw-r--r--template/standard/html/home.php4
-rw-r--r--template/standard/html/main.php8
-rw-r--r--template/standard/html/page/item.php2
-rw-r--r--template/standard/html/page/list.php2
-rw-r--r--template/standard/html/page/main.php4
-rw-r--r--template/standard/html/post/item.php2
-rw-r--r--template/standard/html/post/list.php2
-rw-r--r--template/standard/html/post/main.php4
-rw-r--r--template/standard/html/search/main.php6
-rw-r--r--template/standard/html/search/result.php6
-rw-r--r--template/standard/html/user/list.php2
-rw-r--r--template/standard/html/user/main.php2
-rw-r--r--template/standard/lang/de.php2
-rw-r--r--template/standard/lang/en.php2
16 files changed, 28 insertions, 28 deletions
diff --git a/template/standard/html/403.php b/template/standard/html/403.php
index 5039678..092988e 100644
--- a/template/standard/html/403.php
+++ b/template/standard/html/403.php
@@ -7,5 +7,5 @@
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
?>
-<h1><i class="fa fa-exclamation-triangle"></i><?=$Language->template('403_heading_text')?></h1>
-<p><?=$Language->template('403_heading_desc')?></p> \ No newline at end of file
+<h1><i class="fa fa-exclamation-triangle"></i><?=$Language->text('403_heading_text')?></h1>
+<p><?=$Language->text('403_heading_desc')?></p> \ No newline at end of file
diff --git a/template/standard/html/404.php b/template/standard/html/404.php
index acb7ab9..a45eecc 100644
--- a/template/standard/html/404.php
+++ b/template/standard/html/404.php
@@ -7,5 +7,5 @@
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
?>
-<h1><i class="fa fa-exclamation-triangle"></i><?=$Language->template('404_heading_text')?></h1>
-<p><?=$Language->template('404_heading_desc')?></p> \ No newline at end of file
+<h1><i class="fa fa-exclamation-triangle"></i><?=$Language->text('404_heading_text')?></h1>
+<p><?=$Language->text('404_heading_desc')?></p> \ No newline at end of file
diff --git a/template/standard/html/home.php b/template/standard/html/home.php
index 64206e9..e516204 100644
--- a/template/standard/html/home.php
+++ b/template/standard/html/home.php
@@ -7,8 +7,8 @@
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
?>
-<h1><i class="fa fa-home"></i><?=$Language->template('home_heading_text', escapeHTML(Application::get('BLOGMETA.NAME')))?><span class="head-link brackets"><i class="fa fa-rss"></i><a href="<?=Application::getURL('feed/')?>" title="<?=$Language->text('feed_name_items', escapeHTML($BLOGMETA['NAME']))?>">Feed</a></span></h1>
-<p><?=$Language->template('home_heading_desc', Application::get('POST.LIST_SIZE'))?></p>
+<h1><i class="fa fa-home"></i><?=$Language->text('home_heading_text', escapeHTML(Application::get('BLOGMETA.NAME')))?><span class="head-link brackets"><i class="fa fa-rss"></i><a href="<?=Application::getURL('feed/')?>" title="<?=$Language->text('feed_name_items', escapeHTML($BLOGMETA['NAME']))?>">Feed</a></span></h1>
+<p><?=$Language->text('home_heading_desc', Application::get('POST.LIST_SIZE'))?></p>
<ul class="item-list post">
<?php foreach($LIST['POSTS'] as $post): ?>
diff --git a/template/standard/html/main.php b/template/standard/html/main.php
index 4572422..12364e5 100644
--- a/template/standard/html/main.php
+++ b/template/standard/html/main.php
@@ -64,8 +64,8 @@ $BLOGMETA_DESC = escapeHTML($BLOGMETA['DESC']);
<input type="checkbox" id="toogle-nav" />
<ul>
<li>
- <a href="<?=Application::getURL()?>" title="<?=$Language->template('navigation_home_desc', $BLOGMETA_NAME)?>">
- <i class="fa fa-home"></i><?=$Language->template('navigation_home_text')?>
+ <a href="<?=Application::getURL()?>" title="<?=$Language->text('navigation_home_desc', $BLOGMETA_NAME)?>">
+ <i class="fa fa-home"></i><?=$Language->text('navigation_home_text')?>
</a>
</li>
<li>
@@ -84,8 +84,8 @@ $BLOGMETA_DESC = escapeHTML($BLOGMETA['DESC']);
</a>
</li>
<li>
- <a href="<?=Application::getURL('search/')?>" title="<?=$Language->template('navigation_search_desc')?>">
- <i class="fa fa-search"></i><?=$Language->template('navigation_search_text')?>
+ <a href="<?=Application::getURL('search/')?>" title="<?=$Language->text('navigation_search_desc')?>">
+ <i class="fa fa-search"></i><?=$Language->text('navigation_search_text')?>
</a>
</li>
</ul>
diff --git a/template/standard/html/page/item.php b/template/standard/html/page/item.php
index 6065354..3199a39 100644
--- a/template/standard/html/page/item.php
+++ b/template/standard/html/page/item.php
@@ -11,7 +11,7 @@
<header>
<h2>
<a href="<?=$PAGE['URL']?>"><?=escapeHTML($PAGE['ATTR']['NAME'])?></a>
- <time class="brackets info" datetime="<?=$PAGE['ATTR']['TIME_INSERT']?>"><?=parseDatetime($PAGE['ATTR']['TIME_INSERT'], $Language->template('date_format'))?></time>
+ <time class="brackets info" datetime="<?=$PAGE['ATTR']['TIME_INSERT']?>"><?=parseDatetime($PAGE['ATTR']['TIME_INSERT'], $Language->text('date_format'))?></time>
</h2>
</header>
<blockquote cite="<?=$PAGE['URL']?>">
diff --git a/template/standard/html/page/list.php b/template/standard/html/page/list.php
index 2bc71a4..da75330 100644
--- a/template/standard/html/page/list.php
+++ b/template/standard/html/page/list.php
@@ -8,7 +8,7 @@
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
?>
<h1><i class="fa fa-file-text-o"></i><?=$Language->text('page_overview')?><span class="head-link brackets"><i class="fa fa-rss"></i><a href="<?=Application::getURL('feed/page/')?>" title="<?=$Language->text('feed_name_pages', escapeHTML($BLOGMETA['NAME']))?>">Feed</a></span></h1>
-<p><?=$Language->template('page_overview_heading_desc', $PAGINATION['THIS'])?></p>
+<p><?=$Language->text('page_overview_heading_desc', $PAGINATION['THIS'])?></p>
<ul class="item-list page">
<?php foreach($LIST['PAGES'] as $page): ?>
diff --git a/template/standard/html/page/main.php b/template/standard/html/page/main.php
index 3b62571..cfe26fd 100644
--- a/template/standard/html/page/main.php
+++ b/template/standard/html/page/main.php
@@ -8,10 +8,10 @@
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
$user = "<a href=\"{$USER['URL']}\" title=\"alias »{$USER['ATTR']['USERNAME']}«\">{$USER['ATTR']['FULLNAME']}</a>";
-$time = "<time datetime=\"{$PAGE['ATTR']['TIME_INSERT']}\" title=\"".parseDatetime($PAGE['ATTR']['TIME_INSERT'], '[W]')."\">".parseDatetime($PAGE['ATTR']['TIME_INSERT'], $Language->template('date_format'))."</time>";
+$time = "<time datetime=\"{$PAGE['ATTR']['TIME_INSERT']}\" title=\"".parseDatetime($PAGE['ATTR']['TIME_INSERT'], '[W]')."\">".parseDatetime($PAGE['ATTR']['TIME_INSERT'], $Language->text('date_format'))."</time>";
?>
<h1><i class="fa fa-file-text-o"></i><?=escapeHTML($PAGE['ATTR']['NAME'])?></h1>
-<p><?=$Language->template('page_main_heading_desc', [$user, $time])?></p>
+<p><?=$Language->text('page_main_heading_desc', [$user, $time])?></p>
<section id="content" class="page">
<?=$PAGE['BODY']['HTML']()?>
diff --git a/template/standard/html/post/item.php b/template/standard/html/post/item.php
index 19ff3f9..f606840 100644
--- a/template/standard/html/post/item.php
+++ b/template/standard/html/post/item.php
@@ -11,7 +11,7 @@
<header>
<h2>
<a href="<?=$POST['URL']?>"><?=escapeHTML($POST['ATTR']['NAME'])?></a>
- <time class="brackets info" datetime="<?=$POST['ATTR']['TIME_INSERT']?>"><?=parseDatetime($POST['ATTR']['TIME_INSERT'], $Language->template('date_format'))?></time>
+ <time class="brackets info" datetime="<?=$POST['ATTR']['TIME_INSERT']?>"><?=parseDatetime($POST['ATTR']['TIME_INSERT'], $Language->text('date_format'))?></time>
</h2>
</header>
<blockquote cite="<?=$POST['URL']?>">
diff --git a/template/standard/html/post/list.php b/template/standard/html/post/list.php
index 24e4020..adb4fd6 100644
--- a/template/standard/html/post/list.php
+++ b/template/standard/html/post/list.php
@@ -8,7 +8,7 @@
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
?>
<h1><i class="fa fa-newspaper-o"></i><?=$Language->text('post_overview')?><span class="head-link brackets"><i class="fa fa-rss"></i><a href="<?=Application::getURL('feed/post/')?>" title="<?=$Language->text('feed_name_posts', escapeHTML($BLOGMETA['NAME']))?>">Feed</a></span></h1>
-<p><?=$Language->template('post_overview_heading_desc', $PAGINATION['THIS'])?></p>
+<p><?=$Language->text('post_overview_heading_desc', $PAGINATION['THIS'])?></p>
<ul class="item-list post">
<?php foreach($LIST['POSTS'] as $post): ?>
diff --git a/template/standard/html/post/main.php b/template/standard/html/post/main.php
index 22974dc..709e719 100644
--- a/template/standard/html/post/main.php
+++ b/template/standard/html/post/main.php
@@ -8,10 +8,10 @@
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
$user = "<a href=\"{$USER['URL']}\" title=\"alias »{$USER['ATTR']['USERNAME']}«\">{$USER['ATTR']['FULLNAME']}</a>";
-$time = "<time datetime=\"{$POST['ATTR']['TIME_INSERT']}\" title=\"".parseDatetime($POST['ATTR']['TIME_INSERT'], '[W]')."\">".parseDatetime($POST['ATTR']['TIME_INSERT'], $Language->template('date_format'))."</time>";
+$time = "<time datetime=\"{$POST['ATTR']['TIME_INSERT']}\" title=\"".parseDatetime($POST['ATTR']['TIME_INSERT'], '[W]')."\">".parseDatetime($POST['ATTR']['TIME_INSERT'], $Language->text('date_format'))."</time>";
?>
<h1><i class="fa fa-newspaper-o"></i><?=escapeHTML($POST['ATTR']['NAME'])?></h1>
-<p><?=$Language->template('post_main_heading_desc', [$user, $time])?></p>
+<p><?=$Language->text('post_main_heading_desc', [$user, $time])?></p>
<section id="content" class="post">
<?=$POST['BODY']['HTML']()?>
diff --git a/template/standard/html/search/main.php b/template/standard/html/search/main.php
index 39d251d..61bd6a5 100644
--- a/template/standard/html/search/main.php
+++ b/template/standard/html/search/main.php
@@ -1,12 +1,12 @@
-<h1><i class="fa fa-search"></i><?=$Language->template('search_base_heading_text')?></h1>
-<p><?=$Language->template('search_base_heading_desc')?></p>
+<h1><i class="fa fa-search"></i><?=$Language->text('search_base_heading_text')?></h1>
+<p><?=$Language->text('search_base_heading_desc')?></p>
<?php if($SEARCH['INFO']): ?>
<div class="red"><?=$SEARCH['INFO']?></div>
<?php endif; ?>
<form action="" method="GET">
- <input autofocus type="search" name="q" placeholder="<?=$Language->template('search_form_placeholder')?>" value="<?=escapeHTML($SEARCH['TEXT'])?>" />
+ <input autofocus type="search" name="q" placeholder="<?=$Language->text('search_form_placeholder')?>" value="<?=escapeHTML($SEARCH['TEXT'])?>" />
<select name="d">
<option value=""><?=$Language->text('date_d')?></option>
diff --git a/template/standard/html/search/result.php b/template/standard/html/search/result.php
index c07dec9..1558c3c 100644
--- a/template/standard/html/search/result.php
+++ b/template/standard/html/search/result.php
@@ -1,8 +1,8 @@
-<h1><?=$Language->template('search_result_heading_text', escapeHTML($SEARCH['TEXT']))?></h1>
-<p><?=$Language->template('search_result_heading_desc')?></p>
+<h1><?=$Language->text('search_result_heading_text', escapeHTML($SEARCH['TEXT']))?></h1>
+<p><?=$Language->text('search_result_heading_desc')?></p>
<form action="" method="GET">
- <input autofocus type="search" name="q" placeholder="<?=$Language->template('search_form_placeholder')?>" value="<?=escapeHTML($SEARCH['TEXT'])?>" />
+ <input autofocus type="search" name="q" placeholder="<?=$Language->text('search_form_placeholder')?>" value="<?=escapeHTML($SEARCH['TEXT'])?>" />
<select name="d">
<option value=""><?=$Language->text('date_d')?></option>
diff --git a/template/standard/html/user/list.php b/template/standard/html/user/list.php
index 5c8f6a6..d95bd0c 100644
--- a/template/standard/html/user/list.php
+++ b/template/standard/html/user/list.php
@@ -8,7 +8,7 @@
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
?>
<h1><i class="fa fa-user"></i><?=$Language->text('user_overview')?></h1>
-<p><?=$Language->template('user_overview_heading_desc', $PAGINATION['THIS'])?></p>
+<p><?=$Language->text('user_overview_heading_desc', $PAGINATION['THIS'])?></p>
<ul class="item-list user">
<?php foreach($LIST['USERS'] as $user): ?>
diff --git a/template/standard/html/user/main.php b/template/standard/html/user/main.php
index 473b00b..2a195a4 100644
--- a/template/standard/html/user/main.php
+++ b/template/standard/html/user/main.php
@@ -8,7 +8,7 @@
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
?>
<h1><i class="fa fa-user"></i><?=escapeHTML($USER['ATTR']['FULLNAME'])?></h1>
-<p><em><?=$Language->template('user_main_heading_desc', [escapeHTML($USER['ATTR']['USERNAME']), $COUNT['POST'], $COUNT['PAGE']])?></em></p>
+<p><em><?=$Language->text('user_main_heading_desc', [escapeHTML($USER['ATTR']['USERNAME']), $COUNT['POST'], $COUNT['PAGE']])?></em></p>
<section id="content" class="user">
<?=$USER['BODY']['HTML']()?>
diff --git a/template/standard/lang/de.php b/template/standard/lang/de.php
index fa8544f..2c5008e 100644
--- a/template/standard/lang/de.php
+++ b/template/standard/lang/de.php
@@ -4,7 +4,7 @@
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# This file contains template internationalization strings for the DE language #
-# and is completely independent from the core internationalization strings. #
+# and can also overwrite the existing core internationalization strings. #
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
diff --git a/template/standard/lang/en.php b/template/standard/lang/en.php
index 6afef98..3d42fe0 100644
--- a/template/standard/lang/en.php
+++ b/template/standard/lang/en.php
@@ -4,7 +4,7 @@
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# This file contains template internationalization strings for the EN language #
-# and is completely independent from the core internationalization strings. #
+# and can also overwrite the existing core internationalization strings. #
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#