inherit
172351
0
Sept 5, 2019 10:56:35 GMT -8
DarkPikachu
Complexity == Fun
320
October 2011
tcll
|
Post by DarkPikachu on Nov 19, 2013 13:54:47 GMT -8
so I'm trying my hand at a plugin that uses a key...
what this plugin does is style text for particular users and displays them in threads. the data stored is for both text color/style and glow color/strength (glow can be disabled)
my question is, which key would be most appropriate to use for this??
|
|
inherit
170346
0
Mar 1, 2016 12:53:37 GMT -8
Shorty
Yeah, I'm that cool. Lol! No I'm not.
3,018
August 2011
shortyverrett94
|
Post by Shorty on Nov 19, 2013 14:23:23 GMT -8
Do you want the user to be able to choose his/her own text styles? And is it only that users text that is changed and everyone can see that color, or does that user see all thread in text that color?
|
|
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 Nov 19, 2013 14:47:52 GMT -8
If you want the colors displayed to all users, you'll want a post key. If you want user-configurable colors, you'll want a user key. If you want both, you'll want both.
|
|
inherit
172351
0
Sept 5, 2019 10:56:35 GMT -8
DarkPikachu
Complexity == Fun
320
October 2011
tcll
|
Post by DarkPikachu on Nov 19, 2013 15:39:45 GMT -8
Do you want the user to be able to choose his/her own text styles? And is it only that users text that is changed and everyone can see that color, or does that user see all thread in text that color? it's just custom colors for that user that everyone can see, and you can see theirs. (and the option to disable post colors if you like) Tim Camara: I see... how would I pull off the merge?? btw, what are the uses for the separate keys?? (other than what's obvious) like... does "Post" affect "Message" AND "Conversation"?? if there's a reference, please post
|
|
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 Nov 19, 2013 17:07:04 GMT -8
You don't really have to merge them, you just use each one to store the data that's most relevant. You use the user key to store the user's customized colors or styles, then, when they create a post, you store that info in the post key, so that other users can see those same colors. The separate keys are used to load data based on their associated type. A key is only loaded if an object of it's same type, with the same ID, is loaded on the page. For example, if you load a thread with a post that has the ID of 12345, you'll be able to access the post key with an ID of 12345. If you were to load a different thread, you could no longer access the post key with ID 12345, since that post is no longer on the page. But, you would be able to access the post key of any post that is on the new page. This restriction applies to any non-super key. In addition, private user keys can only be loaded by the current user, hence 'private'. Reference: support.proboards.com/thread/433198/all-plugin-keysActually, you could probably get away with making users do their customizations in a custom field, reducing it down to only one key, but then you don't get the smooth install process, and it would require people to name the fields something specific, or have an extra setup step or two.
|
|
inherit
172351
0
Sept 5, 2019 10:56:35 GMT -8
DarkPikachu
Complexity == Fun
320
October 2011
tcll
|
Post by DarkPikachu on Nov 19, 2013 18:22:58 GMT -8
actually... maybe I won't need to use either >.> thanks for mentioning custom profile fields (I'll be sure to write well detailed instructions with images) thanks again
|
|