Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
970 views
in Q2A Core by

In qa-theme-base.php page, I changed this line from:

$this->output('<SPAN CLASS="qa-'.$class.'-note">'.$navlink['note'].'</SPAN>');

To:

$this->output('<SPAN CLASS="qa-'.$class.'-note">'.'</SPAN>');

It hide the categories count in the side bar but when I browse the category page. It don't have any links to the categories.

So, on this line I change from:

$this->output($navlink['label']);

To:

this->output($navlink['label'].'<SPAN CLASS="qa-'.$class.'-note">'.$navlink['note'].'</SPAN>');

 

Now, I am getting this error when I am NOT loggin:

Notice: Undefined index: note in /home/clicks/public_html/haveanyquestions.com/qa-include/qa-theme-base.php on line 441

If a logged in there is NO error message.

Can anyone help me?

 

2 Answers

0 votes
by

In function function nav_link($navlink, $class)

just remove last two line

 

if (strlen(@$navlink['note']))
$this->output('<SPAN CLASS="qa-'.$class.'-note">'.$navlink['note'].'</SPAN>');
 
it works for me
 
your funtion would look like this:
 
function nav_link($navlink, $class)
{
if (isset($navlink['url'])) {
$this->output(
'<A HREF="'.$navlink['url'].'" CLASS="qa-'.$class.'-link'.
(@$navlink['selected'] ? (' qa-'.$class.'-selected') : '').'"'.
(isset($navlink['target']) ? (' TARGET="'.$navlink['target'].'"') : '').'>'.$navlink['label'].
'</A>'
);
 
} else
$this->output($navlink['label']);
}
 
 
by
I removed the last two lines and yes it did work BUT if you go to the "Browse categories" page, the links next to the categories name will be remove too.

For example,

Before the change:
Arts & Humanities - 0 questions

After removing the last two lines:
Arts & Humanities
by
If you want links in "Browse categories", instead of deleting these two lines, you can replace them with this:

if (strlen(@$navlink['note']) && $class != "nav-cat") $this->output('<SPAN CLASS="qa-'.$class.'-note">'.$navlink['note'].'</SPAN>');
0 votes
by

Very simple way to do is just add display:none property to .qa-nav-cat-note in css :P

...