![]() |
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:
|
Not sure exactly what you are asking... We need a little more than a single line to see what you are doing.
|
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 :D |
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 ... |
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.
|
It has to be in database.
--------------- Added at 02:12 --------------- No one can help? |
Please show the full lines of code that is handling this, will be a lot easier to help you then.
|
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. |
What is the content of $template['template']?
Most likely the variable does not get parsed because of the stripslashes(). |
It's a lot of contents. I am putting the beginning only
If I don't escape it I can't put in database. And if I don't remove the slashes, they get written in xml too. |
All times are GMT. The time now is 07:07 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|