Improvements on tags

This commit is contained in:
dignajar 2015-08-29 15:07:47 -03:00
parent 63d11a755b
commit 22c75b9d09
3 changed files with 8 additions and 3 deletions

View File

@ -74,7 +74,7 @@ function build_posts_per_page($pageNumber=0, $amount=5, $draftPosts=false)
$list = $dbPosts->getPage($pageNumber, $amount, $draftPosts); $list = $dbPosts->getPage($pageNumber, $amount, $draftPosts);
// There are not post for the pageNumber then NotFound page // There are not post for the pageNumber then true Not found page
if(empty($list) && $pageNumber>0) { if(empty($list) && $pageNumber>0) {
$Url->setNotFound(true); $Url->setNotFound(true);
} }
@ -115,6 +115,10 @@ if( ($Url->whereAmI()==='post') && ($Url->notFound()===false) )
$posts[0] = $Post; $posts[0] = $Post;
} }
}
elseif( ($Url->whereAmI()==='tag') && ($Url->notFound()===false) )
{
} }
// Build post per page // Build post per page
else else

View File

@ -57,7 +57,7 @@ class pluginsimpleMDE extends Plugin {
status: false, status: false,
toolbarTips: true, toolbarTips: true,
toolbarGuideIcon: true, toolbarGuideIcon: true,
autofocus: true, autofocus: false,
lineWrapping: false, lineWrapping: false,
indentWithTabs: true, indentWithTabs: true,
tabSize: 4, tabSize: 4,

View File

@ -25,6 +25,7 @@ class pluginTags extends Plugin {
{ {
global $Language; global $Language;
global $dbTags; global $dbTags;
global $Url;
$html = '<div class="plugin plugin-tags">'; $html = '<div class="plugin plugin-tags">';
$html .= '<h2>'.$this->getDbField('label').'</h2>'; $html .= '<h2>'.$this->getDbField('label').'</h2>';
@ -39,7 +40,7 @@ class pluginTags extends Plugin {
$count = $dbTags->countPostsByTag($tagKey); $count = $dbTags->countPostsByTag($tagKey);
// Print the parent // Print the parent
$html .= '<li><a href="tag/'.$tagKey.'">'.$fields['name'].' ('.$count.')</a></li>'; $html .= '<li><a href="'.HTML_PATH_ROOT.$Url->filters('tag').$tagKey.'">'.$fields['name'].' ('.$count.')</a></li>';
} }
$html .= '</ul>'; $html .= '</ul>';