The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Using $vbphrase in plugin
Can some body help me with next problem:
I need that my plugin return some value with global phrase when i use this construction: PHP Code:
How can i use $vbphrase['.....'] in plugins? |
#2
|
|||
|
|||
Yeah, you can use $vbphrase in a plugin. Are you certain that the phrase you are trying to use is in the global phrase set? If it is not, you might have to use fetch_phrase or fetch_phrase_group to get it. Also, if this is a standalone php file you have created, I believe you have to indicate the phrase groups you want before you include the global.php file.
|
#3
|
||||
|
||||
Just do a
Quote:
--------------- Added [DATE]1210120927[/DATE] at [TIME]1210120927[/TIME] --------------- If that doesn;lt work, you might try: return $vbphrase[sp_default_header] ." $sp_content"; |
#4
|
|||
|
|||
Quote:
Quote:
First it's a function with condition. Second it's function caller. In condition i need to add phrase that inserted when function called whithout parametrs. Thats it Quote:
I was trying this: PHP Code:
PHP Code:
and when i make mistake PHP Code:
Thanks guys! For trying to help! PHP Code:
BTW my vB version 3.7.0 Have some body advices? |
#5
|
|||
|
|||
PHP Code:
so: PHP Code:
|
#6
|
||||
|
||||
Ah, I didn't know he was doing a function.
|
#7
|
|||
|
|||
If it was not inside a function, then he would not have a scope problem.
|
#8
|
||||
|
||||
I've never heard of a scope problem before. At least, not called that, anyway. Thanks for pointing it out. I will have to read up on it.
|
#9
|
|||
|
|||
Marco van Herwaarden thanks! All works for now!
shame for me, but i fogot about variables scopes Boofo sory that i didn't tell it in my first post. And thank for your help too! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|