The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi,
I hooked a function at global_bootstrap_complete to register an unknown user before login process is called (my intention look here https://vborg.vbsupport.ru/showthread.php?t=283789). For the registering process I'm using the user data manager as well as the function verify_username($username). But this method will fail cause of a missing 'charset' style variable. To determine the username length the function vbstrlen is called which in turn calls mb_strlen($username, $encoding); Because of missing the missing charset string in $vbulletin->stylevars['charset'] it will fail by throwing an exception 'Unknown encoding'. PHP Code:
Currently I came with a quick and dirty solution by setting charset manually PHP Code:
Maybe there is a more suitable approach. TIA Greetings Bundschuh |
#2
|
|||
|
|||
![]()
Admin CP -> Languages & Phrases -> Language Manager -> [Edit Settings] -> HTML Character Set (needs to be set UTF-8)
Make sure everything else in the forum matches though. |
#3
|
|||
|
|||
![]()
To be honest I don't understand the hook situation. A comment in global.php says that hook "global_setup_complete" is deprecated, but it appears to be the only "global" hook that is called after the style has been loaded (and it seems like if they are going to suggest that global_bootstrap_complete is a replacement that it should be mostly equivalent). So anyway, maybe you should try using hook global_setup_complete and if they ever do get around to removing it you can deal with it then.
|
#4
|
|||
|
|||
![]()
Thanks for you answers.
@futureaudio: I'd like to avoid changes in admincp to make a plugin running. But thanks for the advice, I will give this a try. @kh99: I was asking myself the same question especially because the functions load_style() and process_templates() are commented out in class_bootstrap.php->bootstrap(). Maybe it's as you described, if they remove the hooks in global.php they will also have to call style and templates in bootstrap itself. Greetings Bundschuh |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|