1 smommer Nov 30, 2007 12:50
3 smommer Nov 30, 2007 13:46
thanks yabba,
i think i'll go for option 2 as the categories wont be changed that often, apart from a few additions over time.
could you point somewhere that will help me with hard coding these categories. im new to php and need all the help i can get.
4 yabba Nov 30, 2007 13:52
The simplest method is to copy the html that's produced for your categories and then crack open your skins _main.php and replace this section of code with the html ( after changing it so your categories are in the right order )
<?php
// -------------------------- CATEGORIES INCLUDED HERE -----------------------------
// Call the Categories plugin:
$Plugins->call_by_code( 'evo_Cats', array( // Add parameters below:
) );
// -------------------------------- END OF CATEGORIES ----------------------------------
?>
¥
5 afwas Nov 30, 2007 13:54
Hi smommer,
That's the easy part, just copy from the source code:
<div class="bSideItem"><h3>Categories</h3><!--<a href="http://bestnewtoys.co.uk/index.php?blog=1">Best New Toys</a>--><ul><li><a href="http://bestnewtoys.co.uk/index.php?blog=1&cat=21">11 to 15 Years</a> <span class="notes">(0)</span></li>
<li><a href="http://bestnewtoys.co.uk/index.php?blog=1&cat=20">5 to 10 Years</a> <span class="notes">(0)</span></li>
<li><a href="http://bestnewtoys.co.uk/index.php?blog=1&cat=22">Educational</a> <span class="notes">(0)</span></li>
<li><a href="http://bestnewtoys.co.uk/index.php?blog=1&cat=19">Under 5s</a> <span class="notes">(2)</span></li>
</ul>
</div>
I think you should drop the <span class="notes">(0)</span> things, since they don't get upgraded.
So, make your alterations in this code and place it in SKIN/_main.php where the categories are now.
Good luck
6 smommer Nov 30, 2007 13:57
Thanks for your help afwas
i'll give this a try. I really appreciate the help, cheers
edit: this worked great thanks guys :)
7 afwas Nov 30, 2007 13:59
Darn ¥åßßå nearly always beats me on speed. But this time our posts are fully complementairy. :p
I'm pretty sure that categories are in alpha order and there's no easy way to re-order them.
There may be a hack somewhere on the forums but I'm buggered if I can remember where. It went along the lines of :
add 2 digits to the front of your categories so that they end up in the order that you want and then strip out the first 2 characters when spitting their names out.
The main problem with that is there's quite a few places where the category names are spat out.
An alternative, if you don't change your categories often, is to hard code them into your sidebar in the order you want them.
¥