vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Problem using construct_usercp_nav and phrases (https://vborg.vbsupport.ru/showthread.php?t=239055)

nnStaff 03-25-2010 01:19 AM

Problem using construct_usercp_nav and phrases
 
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 [DATE]1269483763[/DATE] at [TIME]1269483763[/TIME] ---------------

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.

PHP Code:

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


nnStaff 03-25-2010 02:11 PM

Quote:

Originally Posted by JulianD (Post 2010014)
Are you loading the correct phrase groups? I think there is a hook to do this.

PHP Code:

// 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?


All times are GMT. The time now is 08:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00997 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete