Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 27 Jul 2012, 17:01
DetroitYES's Avatar
DetroitYES DetroitYES is offline
 
Join Date: Mar 2009
Update options outside of the settings menu?

I found this thread:

http://www.vbulletin.org/forum/showthread.php?t=157223

Which lead me to develop this code in my admincp for the product:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This executes correctly, and if I go to the option under the settings menu, displays the updated value correctly. However, I also have this code that generates a diffrent button if the id of the user being displayed for the row matches the setting. It only works correctly when I update the option via the settings menu, not via the query. In other words, $vbulletin->options['atdisg_featured_feed'] does not seem to be pulling from the database...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I have to assume this is due to the datastore Paul mentioned in the related thread:

Originally Posted by Paul M View Post
They are stored as a serialized array in the datastore for general access, and ultimately, in the settings table.
Is there a way to update the datastore as well when I run the query?.. Or is there some reason that I should not update the options outside of settings?

--------------- Added 27 Jul 2012 at 17:36 ---------------

#############UPDATE

i found the save_settings() function, on line ~430 of adminfunctions_options.php


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #2  
Old 28 Jul 2012, 02:27
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
Dude! Thanks for this! I've been using a "Daily Stuff" type of thing on my forum for a while now, and using the settings to save stuff like "Last Time Updated" so on and so forth, but I've always been doing it "manually." I never knew there was a built-in function, and sometimes some of my users get their "Daily Stuff" twice n a row.

I assume that was because of the datastore? I dunno, tbh, but I assume that using this function will change that if so. :3
Reply With Quote
  #3  
Old 01 Aug 2012, 17:00
DetroitYES's Avatar
DetroitYES DetroitYES is offline
 
Join Date: Mar 2009
Originally Posted by Sarteck View Post
Dude! Thanks for this! I've been using a "Daily Stuff" type of thing on my forum for a while now, and using the settings to save stuff like "Last Time Updated" so on and so forth, but I've always been doing it "manually." I never knew there was a built-in function, and sometimes some of my users get their "Daily Stuff" twice n a row.

I assume that was because of the datastore? I dunno, tbh, but I assume that using this function will change that if so. :3
Glad to help, and yes, it was due to the datastore which save_settings() updates along with the actual database column...
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 01:41.

Layout Options | Width: Wide Color: