The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to read vbulletin->options from database?
I have a script that reads from database and write the data in a file.
What is the proper syntax for that please? I tried putting in database: Quote:
Quote:
|
#2
|
|||
|
|||
Not sure exactly what you are asking... We need a little more than a single line to see what you are doing.
|
#3
|
|||
|
|||
I think he's trying to get a vbulletin option, to be added into a file, in the tag.
$vbulletin->options['mybg'] = #000000 So this would be added to the file: <Background backgroundColor="#000000"> I think |
#4
|
|||
|
|||
OK. I am writing to an xml. If I put in the php:
$xml=bgcolor=".$vbulletin->options['mybg']." That is fine. The xml gets written with the correct value. Now, if I put those in the db and do a query_first to retrieve it, then in the php I do $xml=$myquery[result]; the xml gets written with the unconverted value for the option. It just displays bgcolor=".$vbulletin->options['mybg']." I tried the first post codes with no success. Same goes for $vbphrase. the very hard way I am trying to avoid would be to do a str_replace before I write to the xml. But there are so many options and phrases involved ... |
#5
|
||||
|
||||
Why are you manually writing options and phrases to a database? vB handles them all transparently. Just fire up a plugin for example and you can use $vbulletin->options without doing anything beforehand.
|
#6
|
|||
|
|||
It has to be in database.
--------------- Added at 02:12 --------------- No one can help? |
#7
|
|||
|
|||
Please show the full lines of code that is handling this, will be a lot easier to help you then.
|
#8
|
|||
|
|||
The idea: I am releasing this slideshow mod found in my homepage
which auto updates: install and forget about it. It's a dynamic flash slideshow that reads from an XML. I decided to release it with 3 different layouts options. All was fine the way I did it with database, until I thought it would be neat to allow users to customize it to their taste. So in vb options they have 3 choices of layout. Plus they can make it the colors they want plus it uses phrases for the non english members.. So the plugins for when creating/updating/deleting a thread create an xml whenever there are actions in preset forums. the template in database (lots of lines) so I am putting only this. $vbphrase are also involved. Quote:
And as described in first post, what gets written in the xml is the raw code, no matter what I try. |
#9
|
|||
|
|||
What is the content of $template['template']?
Most likely the variable does not get parsed because of the stripslashes(). |
#10
|
||||
|
||||
So if I'm reading this right - the code you are referring to is part of $template['template'] ?
If that's the case then yes, you will simply get the code - as all you are doing is getting the contents and storing them in $myxml. You would need to eval the contents - and they would need to be in a format that eval can handle. Alternatively, you could store some unique text in the template where the value should go, and do a replacement on it after getting the contents. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|