PHP Classes

Another way to order

Recommend this page to a friend!

      Unlimited sub-categories  >  All threads  >  Another way to order  >  (Un) Subscribe thread alerts  
Subject:Another way to order
Summary:Is there another way to order the categories?
Messages:3
Author:Xavier Van Nieuwenhuyse
Date:2007-02-14 17:52:00
Update:2007-02-17 18:15:43
 

  1. Another way to order   Reply   Report abuse  
Picture of Xavier Van Nieuwenhuyse Xavier Van Nieuwenhuyse - 2007-02-14 17:52:00
Thank you for this useful script, with a good description on how to use it. I immediately thought I could use it as the base of a website menu. The first thing I did were two little changes:
1) Introduce a snippet that escapes special characters and check if slashes have to be added in the class;
2) At the beginning of the example, introduce a variable with the page name, and use this variable instead of using the page name at several given places in the script. Both changes will ease portability of this class.

The categories are ordered by name, and that is certainly convenient for many. A possibility to order the categories differently (e.g. by adding an "order" number) would improve the functionality of this class and make it's usage even more interesting.

  2. Re: Another way to order   Reply   Report abuse  
Picture of S.Shaban S.Shaban - 2007-02-14 18:31:47 - In reply to message 1 from Xavier Van Nieuwenhuyse
Hello Xavier Van Nieuwenhuyse,

Thanks for your positive comments and interest.

unfortunatley, In the current class the ordering feature isn't available,
also for escaping values i kept it away because many of users use there own classes or functions for escaping values, so just escape the values before passing it to the methods as params.

about the page name, i didn't get what do you mean exactly ..but i think you could modify the menu template from the $->htmltree class variable ?

OH PLEASE WAIT i'm not finished.. i'm asking you to wait about 1 or 2 days while Manuel Lemos(phpclasses.org owner) approve my new class, its the most powerful class for nesting mysql records.
it has more features that the current one, and could easily be used for anything else not just categories or menus.

it has been submitted to phpclasses.org from 11 days, i think today it should be approved , and i hope you will be the first user :-)

let me know if there is any other comments :-)

  3. Re: Another way to order   Reply   Report abuse  
Picture of Xavier Van Nieuwenhuyse Xavier Van Nieuwenhuyse - 2007-02-17 18:15:43 - In reply to message 2 from S.Shaban
Shady thank you for the reply!
With the page name, I mean I put $thispage = "name of the current page" variable, and use it later in stead of updating several times the page name (if I change it) in the script. But never mind, it is just a small thing to ease things :)
Xavier