The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How can I change product's settings via code?
I'm really stumped... I have set up a product, with plugins etc. and have assigned an options group and options.
I can read the options using $vbulletin->options['option_name'] just fine. What I can't work out is how to write to the options by name via PHP. If possible I need to do this from anywhere rather than just via a specific hook... can anyone help? |
#2
|
|||
|
|||
You can update the settings table in the database, then call the function build_options() (which is in includes/adminfunctions.php) Here's a thread where it was discussed: www.vbulletin.org/forum/showthread.php?t=268937
|
#3
|
|||
|
|||
That's fantastic, thanks very much I searched for such a long time trying to find an answer on this, it really is quite difficult to find the documentation for VBulletin development sometimes, I've really struggled as an experienced PHP programmer and web developer with VB.
|
#4
|
|||
|
|||
Yeah, searching is tough, I just happened to remember someone asking about it. And yeah, I always tell people who want to learn how to make vb mods that unfortunately the only good way (IMHO) is to start looking through the code and learning how it works.
|
#5
|
|||
|
|||
Indeed, it's what I've been doing on the whole - it's very frustrating at times, makes me feel like I don't know anything XD It is not helped at the moment by the online API docs not loading, I've submitted a ticket to VB and they're dealing with it... slowly!
--------------- Added [DATE]1349132986[/DATE] at [TIME]1349132986[/TIME] --------------- Perhaps you can help with one more query... I want to store a few bits of information in the settings for my product which are readonly from the admin panel. I see where to change the output in the setting option definitions, I'm just not sure what I should enter there to achieve READONLY input fields... Any ideas? Thanks again for your assistance so far, you've saved me so much time!! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|