whu606
I'm not a SuperHero; I just like wearing tights... MVP
In addition to Firebug in Firefox, someone on here recommended Agent Ransack (I'm on Windows) or Grep for command line searching.
Using Firebug it shows that the relevant element is PanelCategories.
Searching for"PanelCategories" in Agent Ransack shows that it occurs in
vanilla\applications\vanilla\views\modules\categories.php
I'm assuming it would be this line
<span class="Count"><?php echo number_format($CountDiscussions); ?>
which you would need to edit.
Answers
thru Css?
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •erm thanks @Aolee, but I was hoping someone could show me what the code looks like etc :)
http://kaohsiungliving.org
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Let me explain. I would like to replace the post count in the category view on the sidepanel with a small image to represent the category. I can only find the styling for post count in /applications/dashboard/design/style.css which just takes away highlighting but doesn't remove the post count completely.
http://kaohsiungliving.org
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@whu606 - thank you so much.
And to further clarify, this line is for all discussions
and this line is for custom categories below all discussions
http://kaohsiungliving.org
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@whu606
I have got this to 'work' as I wanted, but I am now receiving errors in my server log related to the file: vanilla\applications\vanilla\views\modules\categories.php below is a snippet of lines 37 and 38 where the error is located somewhere and as I can't read PHP very well, its difficult to see where it is.
error log: PHP Parse error: syntax error, unexpected ';' on line 37 error log: PHP Parse error: syntax error, unexpected '}', expecting ',' or ';' on line 38
line 37
echo Wrap(Anchor(($Category->Depth > 1 ? '↳ ' : '').Gdn_Format::Text($Category->Name), '/categories/'.rawurlencode($Category->UrlCode)), 'strong')line 38
.'<span class="Count"></span>';http://kaohsiungliving.org
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •get rid of the line break between lines 37 & 38. It's really just one line.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@hbf
Forgive my ignorance but I dont think there is a line break between 37 and 38, unless you mean bring the } bracket up (line 38) to the same line as the rest of the code on line 37?
http://kaohsiungliving.org
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •oh, sorry i thought
was on line 38.
not sure why you have a line break between 'strong') and .'<span
you need to provide little more of the code to know where you are missing a bracket or semi-colon. maybe post the whole function.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Sorry about this, I cant remember how I got the code to display with numbers again!? here is the whole of the code, line 38 is near the bottom you can see its the only line with just a } bracket on it.
http://kaohsiungliving.org
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •try just getting rid of the carriage return after 'strong')
it looks like everything is closed properly.
what's the purpose of the empty span class="count"? seems unnecesarry.
You could probably just get rid of that line and terminate line 36 with a semi-colon.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •by carriage you mean the
' 'empty spaces at the start of the line?the span class is doing its job by styling the categories section with a grey rectangle where the post count would have been. (the code I removed originally to get the error)
thank you for your continued patience!
http://kaohsiungliving.org
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •all the empty spaces and the new line (the result of hitting 'enter' on the keyboard) make it show as one line.
I'm just surprised you want the grey box without the number in it.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •the CR and white space shouldn't matter.... the parser is supposed to ignore that, but i'm trying to rule out the simplest thing first.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •ok so now it looks like this
the reason for the grey box without the number in it http://goo.gl/AwhTP - will give you a better idea. I think it suits the forum, criticism welcome though!
http://kaohsiungliving.org
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •here is the error log if that helps:
http://kaohsiungliving.org
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •ok.. i'll look into it a bit, looks like you are missing a parameter for one of the functions called in that line. my son just woke up so i can't look into it right now.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •There's PowerGrep for windows...
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •add this in your styles.css enjoy! :D
Note: provided you are using the default theme
ul.PanelCategories li.Depth2 span.Count { color: #E3F4FF; background: none repeat scroll 0 0 #E3F4FF; } ul.PanelCategories li.Depth2.Active span.Count { background: #fff; color: #fff; } ul.PanelCategories li.Active span.Count { background: #fff; color:#fff; } ul.PanelCategories li span.Count { background: none repeat scroll 0 0 #E3F4FF; color: #E3F4FF; }- Spam
- Abuse
- Troll
1 • Off Topic 1Insightful Awesome LOL •im sorry, but, i can't see anything wrong with the code. i;'ll try running it on my test site as well. falling asleep at the moment gotta go.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •