[svn1411] Errors with Custom Menu Panes

Posts from previous Beta sessions

[svn1411] Errors with Custom Menu Panes

Postby mdeshane » Sat Oct 27, 2007 6:44 am

While working on the accounts module I decided to try and take advantage of the new custom menu pane in the installer. However, I've found a few errors that need to be fixed with the menu system.

-Custom menu display title is Panel, where/how do we set the display title?

-Menu buttons are not inserted into custom menu panel.

-Menu.php kicks out an error when using a custom menu.
Notice line 691: Undefined index: accounts_accmenu

-No need to name menu panes addonName_menuName, installer automatically adds addonName_ to menuName. (The wiki needs a little change.)

-Keep menuName short or SQL will kick out errors saying it's too long.

These are the problems I've found with the custom menus so far. I imagine Zanix is still working on completing these functions and just hasn't got that far yet. I also noticed while playing in the db that some menu buttons don't always get removed. Any way we could get a cleanup util that will delete buttons not in the db anymore?
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

[svn1411] Errors with Custom Menu Panes

Postby PleegWat » Sat Oct 27, 2007 5:52 pm

Zanix, you made a pleegwat error there

Committing when it's no where near done.
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

[svn1411] Errors with Custom Menu Panes

Postby zanix » Sun Oct 28, 2007 1:30 am

LoL

Yep, I haven't tested this yet
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: [svn1411] Errors with Custom Menu Panes

Postby zanix » Sun Oct 28, 2007 8:45 am

-Custom menu display title is Panel, where/how do we set the display title?

...I...don't...know...
Update: Make a new locale key 'menupanel_{panelname}' where '{panelname}' is the name of the panel

-Menu buttons are not inserted into custom menu panel.

The buttons won't insert ehhh...
Update: Changes in the custom panels will fix this
Use the scope parameter to insert buttons to your custom panel
The menu will ignore the scope and basename when making a button here
Make sure you enter the full url in the url parameter so it links correctly

-Menu.php kicks out an error when using a custom menu.
Notice line 691: Undefined index: accounts_accmenu

I'll check this out and the above two points when I work on this some more
Update: This is due to menu not finding the locale key for the panel label

-No need to name menu panes addonName_menuName, installer automatically adds addonName_ to menuName. (The wiki needs a little change.)

I updated the wiki a little, it does say that the basename is prefixed, but I tried to clear it up more
Update: I'm removing the prefixing of the basename to the custom panel name, addon devs will just have to be careful
I am also seting the section name in the menu table unique, so you cannot add the same panel name twice

-Keep menuName short or SQL will kick out errors saying it's too long.

The next commit will increase the size from 16 characters to 128
This will fix the problem
Update: This is going to be 64, since basename won't be prefixed anymore

-I also noticed while playing in the db that some menu buttons don't always get removed. Any way we could get a cleanup util that will delete buttons not in the db anymore?

Really? I haven't noticed this
I know the button ids stay in roster_menu, but the menu passes over them if the button doesn't exist

Update: My next commit will have all these fixes
Last edited by zanix on Sun Oct 28, 2007 9:42 am, edited 1 time in total.
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

[svn1411] Errors with Custom Menu Panes

Postby zanix » Sun Oct 28, 2007 10:05 am

Should be all fixed svn[1417]
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

[svn1411] Errors with Custom Menu Panes

Postby zanix » Sun Oct 28, 2007 10:16 am

Ok, sorry
svn[1418]
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: [svn1411] Errors with Custom Menu Panes

Postby mdeshane » Sun Oct 28, 2007 11:15 am

Update: I'm removing the prefixing of the basename to the custom panel name, addon devs will just have to be careful

I actually liked that it automatically prefixed the menu name. I probably should of mentioned that as a plus... Unless it was affecting the way building the menu worked, then I can do without it...

I know the button ids stay in roster_menu, but the menu passes over them if the button doesn't exist

I noticed that as well, was just thinking about keeping the db tidy... lol

Thank you Zanix! This new menu feature is exactly what addon devs needed! And props to the rest of the devs, you're all doing a great job on the new roster! I look forward to the final release.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

Re: [svn1411] Errors with Custom Menu Panes

Postby zanix » Sun Oct 28, 2007 2:08 pm

mdeshane wrote:
Update: I'm removing the prefixing of the basename to the custom panel name, addon devs will just have to be careful

I actually liked that it automatically prefixed the menu name. I probably should of mentioned that as a plus... Unless it was affecting the way building the menu worked, then I can do without it...

It was affecting the way the menu is built, plus its a ton easier to code it without prefixing the basename

mdeshane wrote:
I know the button ids stay in roster_menu, but the menu passes over them if the button doesn't exist

I noticed that as well, was just thinking about keeping the db tidy... lol

If you go into the menu config and hit save for each section, then it cleans the db of the missing buttons

mdeshane wrote:Thank you Zanix! This new menu feature is exactly what addon devs needed!

This was actually planned when we re-designed the menu, but it wasn't implemented until now
The new max.resist (max stats now) for Roster 2.0 with the buttons below the menu reminded me to get it fixed

mdeshane wrote:And props to the rest of the devs, you're all doing a great job on the new roster! I look forward to the final release.

Thanks, and we are looking forward to it as well
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

[svn1411] Errors with Custom Menu Panes

Postby PleegWat » Sun Oct 28, 2007 3:43 pm

It's somewhat complicated to update the menu each time a button is removed. It was easier to just code it to ignore invalid ID's. Opening up the menu config and saving the pane (even without changing it) cleans up the field.
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

[svn1411] Errors with Custom Menu Panes

Postby mdeshane » Mon Oct 29, 2007 3:22 am

I didn't know that saving the buttons in the config would clean it up, but know that I now I think it's nifty... Now I'm just having slight problems with two buttons.

install.lib.php:
Code: Select all
$installer->add_menu_button('account_register','account_menu','util-accounts-register','inv_misc_note_02');
$installer->add_menu_button('account_user','account_menu','util-accounts-user&fct=login','inv_misc_punchcards_prismatic'); 


enUS.php:
Code: Select all
$lang['account_register']       = 'Register|Displays the account registration page.';
$lang['account_user']           = 'Login|Displays the login|lost password page.'


The first one only shows the name and not the info. Where the second replaces the first letter of the name with a T.
Also, the new addon menu panes look great!
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

[svn1411] Errors with Custom Menu Panes

Postby zanix » Mon Oct 29, 2007 3:28 am

Could I see an example/link?
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

[svn1411] Errors with Custom Menu Panes

Postby mdeshane » Mon Oct 29, 2007 4:05 am

How about screenshots:
Image
and
Image

A picture says a thousand words... lol And it shows off the pretty new custom menu pane... OOOOH Shinny... lol But more importantly it shows the errors in full detail.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

[svn1411] Errors with Custom Menu Panes

Postby zanix » Mon Oct 29, 2007 4:16 am

Print $button['title'] after this line in lib/menu.php
Code: Select all
$button['title'] = isset($roster->locale->act[$button['title']]) ? $roster->locale->act[$button['title']] : $button['title'];
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

[svn1411] Errors with Custom Menu Panes

Postby mdeshane » Mon Oct 29, 2007 4:36 am

zanix wrote:Print $button['title'] after this line in lib/menu.php
Code: Select all
$button['title'] = isset($roster->locale->act[$button['title']]) ? $roster->locale->act[$button['title']] : $button['title'];

Here is the result of the array output:

RegisterTogin|Displays the login|lost password page.My Characters|Displays your characters.My Guilds|Displays your guilds.My Realms|Displays your realms.

Let me know if you'd prefer a screenshot.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

[svn1411] Errors with Custom Menu Panes

Postby zanix » Mon Oct 29, 2007 5:33 am

Anything before the "RegisterTogin|Displays the login" part?
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

Next

Return to Archived

Who is online

Users browsing this forum: No registered users and 1 guest

cron