dbFields = array(
'label'=>'Categories',
'hideCero'=>true
);
}
// Returns the custom form for the plugin's settings for display in the admin panel
public function form()
{
global $L;
$html = '
';
$html .= '';
$html .= '';
$html .= '
'.$L->get('This title is almost always used in the sidebar of the site').'
';
$html .= '
';
$html .= '
';
$html .= '';
$html .= '';
$html .= '
';
return $html;
}
// Returns the sidebar for display in the website
public function siteSidebar()
{
global $categories;
$html = '
';
$html .= '
'.$this->getValue('label').'
';
$html .= '
';
$html .= '
';
// By default the categories database is alphanumeric sorted
foreach ($categories->db as $key=>$fields) {
$count = count($fields['list']);
if (!$this->getValue('hideCero') || $count>0) {
$html .= '