The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Anyone know how to make a vbulletin->option variable evaluate in a phrase? I'm trying to use the phrase as part of the description for an admincp setting.
For example, I have the variable $vbulletin->options['throttle_posts_time'] set to 24. I want my phrase to read: Quote:
Quote:
Quote:
Quote:
Thanks! |
#2
|
||||
|
||||
![]()
EDIT: Sorry, didn't fully understand
|
#3
|
||||
|
||||
![]()
The phrase should be
Code:
Maximum number of posts in a {1} hour period? Set to -1 for an unlimited number of posts allowed. PHP Code:
|
#4
|
||||
|
||||
![]() Quote:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <?php construct_phrase($vbphrase['throttle_posts_throttle'], $vbulletin->options['throttle_posts_time']);?> <bitfields product="throttle_posts"> <bitfielddefs> <group name="ugp"> <group name="throttle_postspermissions"> <bitfield name="throttle_postspermissions" intperm="true" group="throttle_postspermissions" phrase="throttle_posts_throttle">1</bitfield> </group> </group> </bitfielddefs> </bitfields> ![]() |
#5
|
||||
|
||||
![]()
Well, since you're trying to evaluate a variable where no variable is expected you'll need to modify the backend.
In the calling PHP file, you'll need to perform an str_replace(); somewhere in the function call parsing the XML data. This will most likely require file edits, as I don't believe there are any appropriate hooks available. |
#6
|
||||
|
||||
![]()
k, thx. That's way too much work just to make it look pretty for admins! :-)
|
#7
|
||||
|
||||
![]()
Yea, I just checked. The changes to make would be in /includes/class_bitfield_builder.php -- and there are no hooks available. Alternatively, you could probably do it in /admincp/usergroup.php but, again, no hooks available.
|
#8
|
||||
|
||||
![]() Quote:
Code:
construct_phrase($vbphrase['throttle_posts_throttle'], $vbulletin->options['throttle_posts_time']); |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|