Arrange Category Alphabetically [SOLVED]

All web design discussion, including Ultimate Quiz MOD support.

Moderator: CricketMX Forum Moderators

Post Reply
doswald
Frequent Poster
Frequent Poster
Posts: 32
Joined: Thu Jan 10, 2008 10:32 am

hi mate, here me again. just wanna ask (still im using v1.2.0), when i add new category it goes at the bottom of the page. are there any ways that we can arrange them alphabetically for a neat/clean quiz area?

thanks for the time.

regards
Last edited by doswald on Thu Jan 17, 2008 2:13 am, edited 1 time in total.
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

I think this is right:

in quiz.php


find

Code: Select all

      if( !$userdata['session_logged_in'] )
      {
         $sql_suffix = "WHERE category_permissions = 0 OR category_permissions = 1";
      }
      
      else
      {
         $sql_suffix = '';
      }
   
   $sql = "SELECT * FROM " . QUIZ_CATEGORY_TABLE . " $sql_suffix";
REPLACE WITH

Code: Select all

      if( !$userdata['session_logged_in'] )
      {
         $sql_suffix = "WHERE category_permissions = 0 OR category_permissions = 1";
      }
      
      else
      {
         $sql_suffix = '';
      }
   
   $sql = "SELECT * FROM " . QUIZ_CATEGORY_TABLE . " $sql_suffix  ORDER BY category_name ASC";
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
doswald
Frequent Poster
Frequent Poster
Posts: 32
Joined: Thu Jan 10, 2008 10:32 am

you're the man mate! thanks for being there!
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

I'm glad I've been able to figure out at least one of your questions! :)
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
Post Reply