![]() |
constructing phrases for standard errors?
anyone know how can i use dynamic vb phrases and construct while using them as an error in print_standard_error function?
|
I am not sure I understand the question AN-net. You could call it with any phrase, such as
Code:
eval(print_standard_error('This is an error.', false /* No lookup */)); |
well here is my code:
PHP Code:
|
No, the way you have it, you are passing 3 separate parameters to print_standard_error -- which do not match the usage for the arguments of that function. You will have to construct the phrase before you call print_standard_error by calling construct_phrase, which is intended to do what you want.
Then, once you have the phrase made, make the call to print_standard_error as I showed, with the second argument of "false". |
oh ok cause i knew about construct_phrase but i wasnt sure how to do it with print_standard_error. thanks:)
edit: hmmm still doesnt work, it still gives me trouble my code: PHP Code:
|
Quote:
eval(print_standard_error($vbphrase['journalfloodcheck'], false); A cleaner approach would be to not overwrite $vbphrase, like this: $msgTemp = construct_phrase($vbphrase['journalfloodcheck'], $setting['floodint'], 'commenting'); eval(print_standard_error($msgTemp, false)); |
not to bump an old thread but i have tried to get it construct phrase and now it doesnt display the phrase at all but just the error box with nothing in it
here is my current code: PHP Code:
|
PHP Code:
|
nope nothing shows up still:(
|
anyone, please i really need this:)
|
Add some debug information and see what you can find out... Like, for example, if the phrase is really defined, to start with..
PHP Code:
|
it seems i will have to hack the print_standard_error function then;)
|
the problem is within vb it self, there is no dynamic phrase system for errors and the $vbphrase array only includes specific phrase groups. i will be requesting that vb makes such a feature for the next version because it is critical, please support my thread on vb.com in vb3 suggestion forum;)
|
Add your groups to the $phrasegroups array at the top of the file, and i'll work, without hacking the function ;)
|
oh but see i did that and it turns out the phrase groups that may be put must be in the language table. so all the phrase groups that are truely available are the not all the ones we see in phrase manager;) fronterror(working name for the front end error phrases) is not in the language table so you cant use it in $phrasegroups or a db error occurs cause it is not a field. anyways print_standard_error needs to be made more flexible or maybe a new function named print_dynamic_error :D
|
ignore
|
All times are GMT. The time now is 03:53 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|