Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Subcategories?

2»

Comments

  • Ah i understand , i must edit my theme's categories.php lol .
  • Arny , i corrected your code , voilà :
    if(preg_match("/^(.+)-(.+)/smiU",$Category->Name,$match)) { $DisplayCat = $match[2]; $Class = "SubCategory"; } else { $DisplayCat = $Category->Name; $Class = "Category"; $PrevCat = $Category->Name; }
  • edited September 2006
    I corrected another bug in the regex , here's the new working regex :
    #^(.+)-(.+)$#
  • For those of you wonder what iSlayter was talking about, Nested Categories are a way to store, edit, and display tree hierarchies without the performance hit of a recursive digging algorithm.

    If I can rouse him, I'll get the code and start working on this myself since I want the feature. Otherwise, I'll start from scratch to do it.
  • edited January 2007
    I know it's not my place to make demands here (as I have no clue how to program php even in the remotes way) but as I just want to contribute my ideas I will make a suggestion of how I would envision to display subcategories: See an example of the accordion effect of the mootools script library here: http://www.chrisesler.com/mootools/mootools-accordion.html It would be extremely cool to be able to toggle categories like this while saving space and working toward a clean structure (not overwhelming people with too many choices - only providing subcategories on click of the category of interest). Would it be difficult to provide an extension that uses the mootools script library to accomplish this? Dada
  • Thanks jeffbax, your Categories.php page worked great.
This discussion has been closed.