Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data storage.
#1
Would it be possible to add in a simple hook or function to save and retrieve data? Creating an XML is not amazingly hard, but it seems like a task that most every application needs. Even if simply to store user settings.

I would imagine a simple "save data" in the API would automatically take the data provided and place it in a folder under the same name as the registered plugin, while restore/load data would retrieve it from there.

Or alternatively the API could add capability to simply add plugin configuration data to a central xml, accessed in one read for every plugin that uses it?
Reply
#2
I'm not sure if this helps, but:
1. You can create a folder in the plugins folder with the same name as your plugin, if you need additional files.
2. It's best to save the data in the data folder rather than the plugins folder - you can create an XML file there with your plugin.
Reply
#3
I am already considering a data library for the next major version.

http://code.google.com/p/get-simple-cms/...20Modified
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#4
shovenose Wrote:I'm not sure if this helps, but:
1. You can create a folder in the plugins folder with the same name as your plugin, if you need additional files.
2. It's best to save the data in the data folder rather than the plugins folder - you can create an XML file there with your plugin.

Oh yeah I understand that. Smile

I just figure it would be a nice feature to have, as storing data is common enough a function for plugins to be repeating the same steps.
Reply




Users browsing this thread: 1 Guest(s)