how changing order of icon in menu ?

Theme, template, layout, or image issues

how changing order of icon in menu ?

Postby shan_aya » Thu Oct 12, 2006 5:05 pm

hi,
where is files to change to modify order of addons/fonction in menu ?

thx
shan_aya
WR.net Journeyman
WR.net Journeyman
 
Posts: 132
Joined: Fri Aug 11, 2006 12:58 pm

how changing order of icon in menu ?

Postby zanix » Fri Oct 13, 2006 12:24 am

I think you want to be able to move around the buttons in the menu, correct?

Currently, there isn't a way to do this with the addon buttons because they are added automatically and usually in alphabetical order
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: how changing order of icon in menu ?

Postby SethDeBlade » Fri Oct 13, 2006 1:12 am

zanix wrote:.... because they are added automatically and usually in alphabetical order


Must be an enUS-feature only :p ;)



for german roster it seems "a little bit" randomized ;)
User avatar
SethDeBlade
WR.net Expert
WR.net Expert
 
Posts: 192
Joined: Thu Jul 06, 2006 1:02 am
Location: Germany

how changing order of icon in menu ?

Postby PleegWat » Fri Oct 13, 2006 1:15 am

There's no actual alphabetical sorting taking place. The addon's menu.php files are processed in alphabetical order of the addon's name, and the buttons are added to the screen in that order. Within an addon the order in the menu array is kept.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

how changing order of icon in menu ?

Postby zanix » Fri Oct 13, 2006 1:17 am

PleegWat wrote:There's no actual alphabetical sorting taking place. The addon's menu.php files are processed in alphabetical order of the addon's name, and the buttons are added to the screen in that order. Within an addon the order in the menu array is kept.

LoL, I meant alphabetical order based on the addon's folder name
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

how changing order of icon in menu ?

Postby SethDeBlade » Fri Oct 13, 2006 1:30 am

the "sortorder" in my roster is as follows:

public delete
reputation
itemsets
guildbank (categurized)
spellbooks
max resists
recipe
siggen
memberlog
bookworm

you can have a look at it via my site-button. this is why i said it looks randomized ;) :D
User avatar
SethDeBlade
WR.net Expert
WR.net Expert
 
Posts: 192
Joined: Thu Jul 06, 2006 1:02 am
Location: Germany

how changing order of icon in menu ?

Postby zanix » Fri Oct 13, 2006 1:45 am

Then I don't know then

How about this?
The order is whatever order php scans the addon directories for menu.php and adds them to the array for display
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

how changing order of icon in menu ?

Postby shan_aya » Fri Oct 13, 2006 7:02 pm

hehehe,
to do list for 1.7.1 is now longer than 1 item :p
shan_aya
WR.net Journeyman
WR.net Journeyman
 
Posts: 132
Joined: Fri Aug 11, 2006 12:58 pm

how changing order of icon in menu ?

Postby vgjunkie » Fri Oct 13, 2006 7:40 pm

Just an FYI from the php manual regarding readdir function:

Returns the filename of the next file from the directory. The filenames are returned in the order in which they are stored by the filesystem.


If you wanted them in alphabetical order, in the lib/menu.php file for the makeAddonList function you could change:

Code: Select all

        $lCount 
0//link count
 


to:

Code: Select all

        $lCount 
0//link count
        
asort($addons);
 


The function you use can pretty much be sort, asort, arsort or rsort .. etc as the keys don't seem to make any difference inside the function.
Last edited by vgjunkie on Fri Oct 13, 2006 7:48 pm, edited 1 time in total.
User avatar
vgjunkie
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 30
Joined: Wed Aug 09, 2006 11:58 pm
Location: Brooklyn NY

how changing order of icon in menu ?

Postby cynthetiq » Sun Jan 07, 2007 5:00 pm

thanks! that really helped out; I am studying the different types of readdir sorting since I know little to nothing about php, but this helped tremendously as I'm now able to put them in a reasonable order.
cynthetiq
WR.net Apprentice
WR.net Apprentice
 
Posts: 29
Joined: Sat Oct 21, 2006 10:09 am

Re: how changing order of icon in menu ?

Postby Speedtorch » Sat Jan 13, 2007 10:47 am

OMG! That is awesome! The addon sorting was driving me crazy! Thank you! :)
Speedtorch
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Wed Jul 12, 2006 3:08 am


Return to Appearance

Who is online

Users browsing this forum: No registered users and 0 guests

cron