The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Phrase system
Can somebody give a brief overview of how to create a custom phrase group and use it within custom templates?
I made a custom phrase group called "vbms" ("vBulletin Mail System" as the title) and an ID of 5000 and added it to the phrasetype table. I added a phrase via the admin CP frontend. I also added a phrasetype_vbms column to the language table and rebuilt all languages. Finally I used $phrasegroups = array("vbms"); before including global.php and used $vbphrase[other_vbms_links] within a custom template. The phrase text doesn't show up; neither does anything else. Ideas? |
#2
|
||||
|
||||
Custom phrase groups should have IDs below 1000, so this might be the reason.
Take a look at function add_phrase_type() in adminfunctions_language.php |
#3
|
|||
|
|||
Quote:
|
#4
|
|||
|
|||
Sorry, I meant 50,000, not 5,000.
This would explain a lot: Code:
mysql> select phrasegroup_vbms, length(phrasegroup_vbms) from language; +------------------+--------------------------+ | phrasegroup_vbms | length(phrasegroup_vbms) | +------------------+--------------------------+ | | 0 | +------------------+--------------------------+ 1 row in set (0.00 sec) |
#5
|
|||
|
|||
This is essentially the last thing that needs to be done for an alpha of vBMS, and I don't like seeing development go stagnant, so any help would be greatly appreciated
|
#6
|
||||
|
||||
Quote:
Quote:
PHP Code:
|
#7
|
|||
|
|||
Truly sorry about that, didn't see your post.
Okay, I removed (what I think is) every trace of vBMS phrases. I added the column to language (now using 500), added the phrasetype row, added a phrase via the admin CP, rebuilt languages, and...no change. Is it still caching from somewhere (possibly in datastore) or something, is my PHP code wrong...what's going on? |
#8
|
|||
|
|||
I just figured it out, it was a sneaky bug with variable scope. The particular phrase that I was using was used in a template generated within a function. Predictably, making $vbphrase global fixed the problem.
Thanks for the help. |
#9
|
|||
|
|||
Quote:
|
#10
|
||||
|
||||
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|