The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Getting custom phrase
The following is about the subscriptions.php in the Admin panel.
I have created the custom phrase "setting_zombaio_siteid_title" with content "Site ID". An excerpt of the script: PHP Code:
Do I have to load a certain phrase group to get this phrase? How would I add the custom phrase that I created to the 'subscription' phrase group? |
#2
|
|||
|
|||
I think when you edit the phrase, for "Phrase Type" choose "Subscription Tools".
I don't know if there's any other way to know what Phrase Type matches which group name, but I did it by finding another phrase in that php file and searching for it to look at its type. |
#3
|
||||
|
||||
The problem is because you're calling var_dump before this line:
Code:
require_once('./global.php'); |
#4
|
||||
|
||||
I'm also struggling to get my head around this
I am trying to access a phrase from within a vbA CMPS module I am writing OK I know I could/should? ask this in the vbA forums but I thought you helpful lot could help me here? I've had a look around in another php file (usercp.php) where the phrase I want is available in the $vbphrase array However in my module the $vbphrase array does not contain the phrase I want. Also the $vbphrase array in my custom module contains quite a lot of phrases whether I put require_once('./global.php'); in my file or not I have also tried adding $phrasegroups = array('user', 'infractionlevel'); I got that from usercp.php so assume one of those phrasegroups contains the phrase I want to use? None of this helped any So I am also wondering where does this $vbphrase array get built and how do I choose what phrases I want to be in it? I know I could get around all this hassle by putting the text string I want to use directly into my php (I only want to access a couple of phrases anyway) but I would like to know how to do it the proper way cheers Rich |
#5
|
||||
|
||||
Search for the phrase in phrase manager in Admin CP and find out for sure what type of phrase it is.
|
#6
|
||||
|
||||
Hi BirdOfPrey
OK the two phrases are you_have_pending_friend_requests_from_x and you_have_pending_friend_requests_from_x_and_y_more which look like they are in User Tools (global) Phrases (or Standard Phrases, I'm not sure which is the phrase group) Anyway for some reason these are there in $vbphrase in usercp.php but not there in $vbphrase in my custom vbA module - though $vbphrase does contain a lot of other phrases in my module (whether I put that ./global.php thing or not) - so it must have already been initialised somewhere... Rich |
#7
|
||||
|
||||
I searched my templates but I don't see where those phrases are actually used in vBulletin... Do you know where they would normally show up?
|
#8
|
||||
|
||||
hmmmm there is a lot of stuff on my very customised site that was previously modified by another guy who did a bunk and left me to pick up the mess
So of course I sometimes don't know what is original vbulletin code and what is not Looks like maybe I found some more of his modded stuff However those phrases are showing up in $vbphrase while in my usercp.php file so he must have declared (or added them) somewhere Perhaps if you could point me to documentation explaining the general mechanism involved and where this array originates I can work out what he did Rich |
#9
|
||||
|
||||
I have those phrases in my stock vbulletin, they exist in my phrase manager and yes are in user tools (global).
However no where in any templates can I find them being used. It's possible they are used in a php file, not a template... or maybe old phrases from earlier vBulletin version not used anymore. LOL at documentation, I don't deal with that. There's the manual but I doubt it will be of much use. I would look in functions.php file at: Code:
function init_language() |
#10
|
||||
|
||||
Thanks Joe
It's always nice to have somewhere to start looking Rich |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|