PDA

View Full Version : Problem using construct_usercp_nav and phrases


nnStaff
03-25-2010, 01:19 AM
I am tweaking an old plugin that worked just fine in 3.8.x, for 4.0. The plugin is running out of misc.php, and calling construct_usercp_nav. Strange thing though, about 1/3 of the phrases used to construct the menu are empty, so it's not constructing the full menu. I've double and triple-checked the code and it isn't setting $vbphrase anywhere, so I don't know if it's somehow not caching the phrases, or if they're somehow getting blanked out.

Is it possible I need to "enable" these phrases? How is it that some work and some don't?

--------------- Added 1269483763 at 1269483763 ---------------

edit: here's a snapshot of what I'm talking about. If you compare that to a typical, admin usercp, it's missing several entries. If you look at the source code, all the code to generate the full menu is there, but there are blanks where the text should be, hence the vbphrase is not working https://vborg.vbsupport.ru/external/2010/03/12.jpg

JulianD
03-25-2010, 01:10 PM
Are you loading the correct phrase groups? I think there is a hook to do this.

// get special phrase groups
$phrasegroups = array('user', 'infractionlevel');

nnStaff
03-25-2010, 02:11 PM
Are you loading the correct phrase groups? I think there is a hook to do this.

// get special phrase groups
$phrasegroups = array('user', 'infractionlevel');
that's what I think I was doing wrong, but I didn't know the hook to try and add to $phrasegroups. Additionally, isn't it weird that it would load some and not others? Wouldn't they all be a part of the same group?