Bug fixes, developer area, google plugin updated, rss and sitemap updated

This commit is contained in:
Diego Najar 2017-06-05 18:52:13 +02:00
parent c0b71e96a7
commit 5559ac32fb
4 changed files with 21 additions and 9 deletions

View File

@ -60,6 +60,8 @@ class Plugin {
foreach($this->dbFields as $key=>$value) {
if( isset($args[$key]) ) {
$value = Sanitize::html( $args[$key] );
if($value==='false') { $value = false; }
elseif($value==='true') { $value = true; }
settype($value, gettype($this->dbFields[$key]));
$this->db[$key] = $value;
}

View File

@ -103,7 +103,7 @@ $(document).ready(function() {
<li class="uk-nav-header"><?php $L->p('Publish') ?></li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><?php $L->p('New page') ?></a>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><?php $L->p('New content') ?></a>
</li>
<li class="uk-nav-header"><?php $L->p('Manage') ?></li>

View File

@ -1,6 +1,6 @@
<?php
HTML::title(array('title'=>$L->g('New page'), 'icon'=>'file-text-o'));
HTML::title(array('title'=>$L->g('New content'), 'icon'=>'file-text-o'));
HTML::formOpen(array('class'=>'uk-form-stacked'));

View File

@ -6,7 +6,8 @@ class pluginCategories extends Plugin {
{
// Fields and default values for the database of this plugin
$this->dbFields = array(
'label'=>'Categories'
'label'=>'Categories',
'showCero'=>false
);
}
@ -20,6 +21,12 @@ class pluginCategories extends Plugin {
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
$html .= '</div>';
$html .= '<div>';
$html .= '<input type="hidden" name="showCero" value="false">';
$html .= '<input id="jsshowCero" name="showCero" type="checkbox" value="true" '.($this->getValue('showCero')?'checked':'').'>';
$html .= '<label class="forCheckbox" for="jsshowCero">'.$Language->get('Show categories without content').'</label>';
$html .= '</div>';
return $html;
}
@ -37,12 +44,15 @@ class pluginCategories extends Plugin {
// By default the database of categories are alphanumeric sorted
foreach( $dbCategories->db as $key=>$fields ) {
$html .= '<li>';
$html .= '<a href="'.DOMAIN_CATEGORY.$key.'">';
$html .= $fields['name'];
$html .= ' ('.count($fields['list']).')';
$html .= '</a>';
$html .= '</li>';
$count = count($fields['list']);
if($this->getValue('showCero') || $count>0) {
$html .= '<li>';
$html .= '<a href="'.DOMAIN_CATEGORY.$key.'">';
$html .= $fields['name'];
$html .= ' ('.count($fields['list']).')';
$html .= '</a>';
$html .= '</li>';
}
}
$html .= '</ul>';