The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi,
Well I'm running a plugin that I need to change some things in the datastore, but how can I change a certain element in the datastore? I know the field name and I can see it in the store and can read the value using $vbulletin->options[' name here '], but how can I change the serialized data stored in the data store? |
#2
|
|||
|
|||
![]()
If the data is serialized then use PHP: unserialize - Manual
|
#3
|
|||
|
|||
![]() Quote:
|
#4
|
||||
|
||||
![]() PHP Code:
|
#5
|
|||
|
|||
![]()
So when you use build_options() it saves the options from the datastore?
|
#6
|
||||
|
||||
![]()
No, it saves the options from table setting into the datastore.
|
#7
|
|||
|
|||
![]()
So what would I do if I wanted to change the values of an array thats in the datastore? I have a field called 'banned_users' which I set the users id in there in the following format " 1,2,3,4 " but I'm making a program to change the values from a custom forum page. The problem I'm having is changing the data already there, I can only change it from the admin cp.
So what would I use to store my new array of ID's in the datastore field 'banned_users'? Thanks. |
#8
|
||||
|
||||
![]() PHP Code:
Also keep datastore caches in mind. |
#9
|
|||
|
|||
![]() Quote:
Thanks again. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|