inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jul 11, 2013 16:12:29 GMT -8
A "Forum Key" that allows you to store data globally (accessible from any pages, regardless of content). this would allow a dynamic storage device to a forum that could provide consistency between pages of data. counts as a "super key", and adheres to same standards as the other keys (4K size, no set on pageload).
|
|
inherit
(??_?)
181912
RIP RIP RIP Almost RIP - Why does this social section still exist?
0
1
Jul 6, 2015 20:35:17 GMT -8
CheatAreZee
56,804
March 2005
zyvoloski
Ricky's Mini-Profile
|
Post by CheatAreZee on Jul 12, 2013 13:15:46 GMT -8
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on Jul 12, 2013 13:55:54 GMT -8
I think Pat would have to sign off on this idea. I'll have him take a look at it when he gets back in.
|
|
Keith Rozett
Full Member
Not that kind of doctor.
Not even the other kind, technically.
Posts: 720
inherit
Not that kind of doctor.
186408
0
Jul 7, 2015 11:21:48 GMT -8
Keith Rozett
Not even the other kind, technically.
720
November 2012
krozett
|
Post by Keith Rozett on Jul 12, 2013 14:24:52 GMT -8
If I understand you correctly, couldn't you just use a regular super key, and set the read/write permissions to everyone? Then you can store/retrieve data under user id 1, since every user can access it.
EDIT: Tim just explained to me why it won't work. D'oh!
|
|
inherit
The Great Cinnamon Roll
191518
0
Oct 19, 2016 22:17:44 GMT -8
David Clark
Care for some tai chi with your chai tea?
17,602
March 2013
davidlinc1
|
Post by David Clark on Jul 12, 2013 14:31:25 GMT -8
If I understand you correctly, couldn't you just use a regular super key, and set the read/write permissions to everyone? Then you can store/retrieve data under user id 1, since every user can access it.EDIT: Tim just explained to me why it won't work. D'oh! Out of curiosity, why?
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on Jul 12, 2013 14:46:59 GMT -8
That will only work on pages where the admin user is being loaded. So if you're logged in as the admin user, everything's peachy. If you're any other user, and on a page where the admin account isn't (calendar, edit profile, any thread they haven't posted in, etc.), their data won't be loaded, plugin key data along with it.
|
|
inherit
The Great Cinnamon Roll
191518
0
Oct 19, 2016 22:17:44 GMT -8
David Clark
Care for some tai chi with your chai tea?
17,602
March 2013
davidlinc1
|
Post by David Clark on Jul 12, 2013 14:54:11 GMT -8
Oh. In that case, yeah - something like what Wormo is describing could be very useful.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jul 17, 2013 1:57:11 GMT -8
considering it would just be one key for the forum, perhaps it could be larger in size then a regular key - i.e. larger then 4K. as a suggestion, maybe the max size of a post itself?
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on Jul 23, 2013 15:41:45 GMT -8
Good news, everyone! Pat just greenlit this idea. Currently, the way it's planned to work is as follows:
- Each forum super key (final name TBD) will require one super key spot on your forum. - They will have a larger space available than a normal key; Right now it's looking like either 16k or 32k pending further discussion with Martyn. - They will be available on every page, regardless of what other data is loaded. - They will behave otherwise exactly like a normal super key, and be subject to all the same restrictions on usage.
I'm currently working on some long-awaited updates to some Library stuff, so hopefully I can talk Keith or Vinh into implementing this quickly.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jul 23, 2013 16:24:41 GMT -8
SWEET!
name suggestion: wormo key.
just a thought
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jul 24, 2013 1:29:45 GMT -8
With this forum super key, will it be possible to append data rather than overwrite it? So you could add an extra parameter where we can pass in a boolean. By default it will overwrite, but with the parameter set, it appends the data instead. Considering the size of the key (and only being 1), and I doubt any plugin will need all that space (if you do, then ignore my proposed solution to share it). I think we should discuss about sharing this key right from the start so we can all use it to write too. It's simple enough to do, have a root object and each of us gets our own key in the object. If no root object exists, create one. This is handled by us, not by ProBoards. There is no reason why you couldn't just be greedy and overwrite the key data for yourself, but considering the type of key this will be, I think it would be a good idea. var data_str = proboards.plugin.key("wormo_key").get(); var data = JSON.parse(data_str) || {}; // Should check if valid json first though
if(!data["wormo"]){ data["wormo"] = {}; }
// Data example that gets stored in the key // {"peter":{"hello":"world"},"womo":{"hello":"world"}} Only problem we have, is that if the key is in use, ProBoards will not allow the plugin to be installed. Anyway around this Tim Camara, apart from having an empty plugin just to hold the key for everyone?
|
|
inherit
162752
0
Nov 7, 2024 3:58:23 GMT -8
Pebble
Where it all does or doesn't happen!
1,437
January 2011
pebbleleague
|
Post by Pebble on Jul 24, 2013 1:43:19 GMT -8
Great news for me as I have a personal project that requires this! Also good news in general! If my understanding is correct this will be a proboards cookie, but bigger? (roughly speaking) If the PB's cookie has a set name then sharing shouldn't be a problem as far as I can see (as the key data would be extracted, added to, and then re-written, as long as there is room in there, and with 32K that should be more than enough.)
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jul 24, 2013 8:00:24 GMT -8
I was just kidding calling it "wormokey"
implementing a JSON system has my vote as well. if it is put into the developer guide that its required to access it that way might just keep accidents from happening in the first place. there needs to be a disclaimer that it could happen though.
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on Jul 24, 2013 8:38:05 GMT -8
Okay, some further updates on this front: I hate to rain on anyone's parade, but the talk of sharing a single key to store non-related data is causing Pat to look more critically at allowing this type of key. There's no official rule about this yet, but it seems like the line is going to come down roughly to be that you can share a key if the data stored within is all related, but storing non-related data in the same key is bad. Purely from a business perspective, providing a way to circumvent the super key restrictions doesn't make sense, so if we provide this type of key, it's likely to come with a restriction to prevent exactly that. On the more positive side, we've decided to implement the following additions to key setting functionality: - Append
- Increment
- Decrement
- Push
- Pop
Increment and Decrement will obviously only work correctly on integers, and Push and Pop will only work correctly on arrays.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,022
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jul 29, 2013 13:22:56 GMT -8
On the more positive side, we've decided to implement the following additions to key setting functionality: - Append
- Increment
- Decrement
- Push
- Pop
Increment and Decrement will obviously only work correctly on integers, and Push and Pop will only work correctly on arrays. Thanks Tim, am I reading too much into this or are the addition of these data manipulation methods also a way to address key data (over)writing conflicts in near-simultaneous key operations? I also assume these methods will be documented in this thread once pushed?
|
|