aboutsummaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-05-30 21:03:03 +0200
committerThomas Lange <code@nerdmind.de>2017-05-30 21:03:03 +0200
commitfd6af01e313f441189c4cd69668766d2ded7ced3 (patch)
tree0a0ae7cb2dd19c2a52b0799c37bb53b0e5e9e892 /template
parent1f1de386b09e48a02fccd62aa82ff319533969cc (diff)
downloadblog-fd6af01e313f441189c4cd69668766d2ded7ced3.tar.gz
blog-fd6af01e313f441189c4cd69668766d2ded7ced3.tar.xz
blog-fd6af01e313f441189c4cd69668766d2ded7ced3.zip
Several changes have been made in this commit, which together with the previous commits result in version 2.2 [changed template parameters]:v2.2
+ Implemented [core]: A new method called "getAll" has been added to the "Attribute" class which now returns all attributes as key->value array. The first parameter can be an array with attribute names which shall be excluded from returning. + Optimization [core]: The function "generateItemData" has been renamed to "generateItemTemplateData" and has been restructured to use the new implemented method "getAll" from the "Attribute" class. + Optimization [core]: The function "generateNaviTemplate" has been added and the functions "generatePageNaviTemplate", "generatePostNaviTemplate" and "generateUserNaviTemplate" have been restructured to make use of the new "generateNaviTemplate" function to reduce duplicate code. + Optimization [core]: Several files within the admin directory has been optimized to use the new "getAll" method of the "Attribute" class. + Optimization [core]: Several code optimizations have been made to the "HTTP" class. + Optimization [admin template]: All occurences of $PAGE['ID'], $POST['ID'] and $USER['ID'] have been replaced with $PAGE['ATTR']['ID'], $POST['ATTR']['ID'] and $USER['ATTR']['ID'] to make it more consistent. You now have to use ['ATTR']['ID'] instead of ['ID'] in your templates to get the ID of an item! Template upgrade to version 2.2 (only for customized templates): SEARCH: ['ID'] REPLACE: ['ATTR']['ID']
Diffstat (limited to 'template')
-rw-r--r--template/admin/html/page/item.php8
-rw-r--r--template/admin/html/post/item.php8
-rw-r--r--template/admin/html/user/item.php6
3 files changed, 11 insertions, 11 deletions
diff --git a/template/admin/html/page/item.php b/template/admin/html/page/item.php
index 599e942..8afeb15 100644
--- a/template/admin/html/page/item.php
+++ b/template/admin/html/page/item.php
@@ -1,8 +1,8 @@
<li class="item-list-li page">
<header>
- <h2><i class="fa fa-file-text-o"></i><?=escapeHTML($PAGE['ATTR']['NAME'])?><span>#<?=$PAGE['ID']?></span></h2>
+ <h2><i class="fa fa-file-text-o"></i><?=escapeHTML($PAGE['ATTR']['NAME'])?><span>#<?=$PAGE['ATTR']['ID']?></span></h2>
<div>
- <a class="brackets" href="<?=Application::getAdminURL("user/update.php?id={$USER['ID']}")?>"><?=escapeHTML($USER['ATTR']['FULLNAME'])?></a>
+ <a class="brackets" href="<?=Application::getAdminURL("user/update.php?id={$USER['ATTR']['ID']}")?>"><?=escapeHTML($USER['ATTR']['FULLNAME'])?></a>
<time class="brackets" datetime="<?=$PAGE['ATTR']['TIME_INSERT']?>"><?=parseDatetime($PAGE['ATTR']['TIME_INSERT'], $Language->template('date_format'))?></time>
</div>
</header>
@@ -21,8 +21,8 @@
<footer>
<ul>
<li><a href="<?=$PAGE['URL']?>" target="_blank" title="<?=$Language->text('select_page')?>"><i class="fa fa-external-link"></i></a></li>
- <li><a href="<?=Application::getAdminURL("page/update.php?id={$PAGE['ID']}")?>" title="<?=$Language->text('update_page')?>"><i class="fa fa-pencil-square-o"></i></a></li>
- <li><a href="<?=Application::getAdminURL("page/delete.php?id={$PAGE['ID']}")?>" title="<?=$Language->text('delete_page')?>"><i class="fa fa-trash-o"></i></a></li>
+ <li><a href="<?=Application::getAdminURL("page/update.php?id={$PAGE['ATTR']['ID']}")?>" title="<?=$Language->text('update_page')?>"><i class="fa fa-pencil-square-o"></i></a></li>
+ <li><a href="<?=Application::getAdminURL("page/delete.php?id={$PAGE['ATTR']['ID']}")?>" title="<?=$Language->text('delete_page')?>"><i class="fa fa-trash-o"></i></a></li>
</ul>
</footer>
</li> \ No newline at end of file
diff --git a/template/admin/html/post/item.php b/template/admin/html/post/item.php
index abc2b0f..a49e2a5 100644
--- a/template/admin/html/post/item.php
+++ b/template/admin/html/post/item.php
@@ -1,8 +1,8 @@
<li class="item-list-li post">
<header>
- <h2><i class="fa fa-newspaper-o"></i><?=escapeHTML($POST['ATTR']['NAME'])?><span>#<?=$POST['ID']?></span></h2>
+ <h2><i class="fa fa-newspaper-o"></i><?=escapeHTML($POST['ATTR']['NAME'])?><span>#<?=$POST['ATTR']['ID']?></span></h2>
<div>
- <a class="brackets" href="<?=Application::getAdminURL("user/update.php?id={$USER['ID']}")?>"><?=escapeHTML($USER['ATTR']['FULLNAME'])?></a>
+ <a class="brackets" href="<?=Application::getAdminURL("user/update.php?id={$USER['ATTR']['ID']}")?>"><?=escapeHTML($USER['ATTR']['FULLNAME'])?></a>
<time class="brackets" datetime="<?=$POST['ATTR']['TIME_INSERT']?>"><?=parseDatetime($POST['ATTR']['TIME_INSERT'], $Language->template('date_format'))?></time>
</div>
</header>
@@ -21,8 +21,8 @@
<footer>
<ul>
<li><a href="<?=$POST['URL']?>" target="_blank" title="<?=$Language->text('select_post')?>"><i class="fa fa-external-link"></i></a></li>
- <li><a href="<?=Application::getAdminURL("post/update.php?id={$POST['ID']}")?>" title="<?=$Language->text('update_post')?>"><i class="fa fa-pencil-square-o"></i></a></li>
- <li><a href="<?=Application::getAdminURL("post/delete.php?id={$POST['ID']}")?>" title="<?=$Language->text('delete_post')?>"><i class="fa fa-trash-o"></i></a></li>
+ <li><a href="<?=Application::getAdminURL("post/update.php?id={$POST['ATTR']['ID']}")?>" title="<?=$Language->text('update_post')?>"><i class="fa fa-pencil-square-o"></i></a></li>
+ <li><a href="<?=Application::getAdminURL("post/delete.php?id={$POST['ATTR']['ID']}")?>" title="<?=$Language->text('delete_post')?>"><i class="fa fa-trash-o"></i></a></li>
</ul>
</footer>
</li> \ No newline at end of file
diff --git a/template/admin/html/user/item.php b/template/admin/html/user/item.php
index 731f6b5..5efbae3 100644
--- a/template/admin/html/user/item.php
+++ b/template/admin/html/user/item.php
@@ -1,6 +1,6 @@
<li class="item-list-li user">
<header>
- <h2><i class="fa fa-user"></i><?=escapeHTML($USER['ATTR']['FULLNAME'])?><span>#<?=$USER['ID']?></span></h2>
+ <h2><i class="fa fa-user"></i><?=escapeHTML($USER['ATTR']['FULLNAME'])?><span>#<?=$USER['ATTR']['ID']?></span></h2>
<div>
<time class="brackets" datetime="<?=$USER['ATTR']['TIME_INSERT']?>"><?=parseDatetime($USER['ATTR']['TIME_INSERT'], $Language->template('date_format'))?></time>
</div>
@@ -20,8 +20,8 @@
<footer>
<ul>
<li><a href="<?=$USER['URL']?>" target="_blank" title="<?=$Language->text('select_user')?>"><i class="fa fa-external-link"></i></a></li>
- <li><a href="<?=Application::getAdminURL("user/update.php?id={$USER['ID']}")?>" title="<?=$Language->text('update_user')?>"><i class="fa fa-pencil-square-o"></i></a></li>
- <li><a href="<?=Application::getAdminURL("user/delete.php?id={$USER['ID']}")?>" title="<?=$Language->text('delete_user')?>"><i class="fa fa-trash-o"></i></a></li>
+ <li><a href="<?=Application::getAdminURL("user/update.php?id={$USER['ATTR']['ID']}")?>" title="<?=$Language->text('update_user')?>"><i class="fa fa-pencil-square-o"></i></a></li>
+ <li><a href="<?=Application::getAdminURL("user/delete.php?id={$USER['ATTR']['ID']}")?>" title="<?=$Language->text('delete_user')?>"><i class="fa fa-trash-o"></i></a></li>
</ul>
</footer>
</li> \ No newline at end of file