inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Oct 8, 2017 6:36:27 GMT -8
Beta: Add A Friend Zone.pbp (5.87 KB) Introduction: As many of you know the following feature is a little lackluster. Almost a hidden thing in Proboards. As per this recent post: support.proboards.com/thread/639298/friends, it may be time to give friends a little TLC. So this is my idea on how to bring social networking into the Friend Zone. Any crazy idea is welcome. Of course practicality will be taken into consideration. Sometimes people acknowledge friends but might not want to follow them. So this will be a separate system from the Proboards Built-In follow feature. New Plugin: Add A Friend Zone Super User Key (possible extension plugin available) Display friends Name/Link/Affiliation(Relation) on profile (optional change color, optional ranking 1-10, optional affiliation/relation, see more friends dialog) See Friendship Icon Next To Them Opens Up Friendship Dialog VIEW FRIENDSHIP Friends Since October 14, 1492 Messages(message created by them search) - Your Threads - Friend Threads (threads created by them and posts by you search) - Remove Friend (Deleted) pb.member.select() type name send friend request example key data {'u':1,'n':'Pastuleo23','c':'ffffff','r':1,'t':9768768,'a':'bestie'}(display name) (if timestamp is present - treated as a friend, if not it's a friend request) Affiliaton Edit Icon/Dialog/Input Field Color Dialog/Proboards Color Picker Ranking Dialog X for delete. 1-10 add Notifications Box Accept (redirect user page with are you sure dialog) - Ignore (delete) - Ignore All (delete all) Push/Pop calls
This could also open up the possibility of developing friend interaction/game plugins of any sort Any Ideas Guys? Todge Lynx Boy_Wonder ₪» ⅀ ƪ Ƒ «₪ Tiffy-Bean
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Oct 9, 2017 10:25:17 GMT -8
|
|
inherit
(?)?
188910
0
Jan 26, 2013 13:30:48 GMT -8
♥ ℒʊ√ ♥
Clouds float into my life no longer to carry rain or usher storm but to add color to my sunset sky.
10,458
January 2013
luv
|
Post by ♥ ℒʊ√ ♥ on Oct 9, 2017 11:02:58 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ , first, it's very nice of you to take this on.
You seem to already have some great, well thought out plans, but I'll be happy to think about this one and add my 2 cents.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Oct 9, 2017 13:17:34 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓, great idea.. How are you going to keep control of how the key data is managed? Will you be restricting the amount of friends/requests you can receive? Or do you plan on using multiple keys?
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Oct 9, 2017 14:03:22 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ , great idea.. How are you going to keep control of how the key data is managed? Will you be restricting the amount of friends/requests you can receive? Or do you plan on using multiple keys? From what I got so far the idea is that the key data Requests will be 20-50 characters. {'u':1,'n':'Pastuleo23'} Friends will be 60-150 characters (depending if they add rank/color/affiliation) (stripping out the 000 for milliseconds on timestamp will help) {'u':1,'n':'Pastuleo23','c':'ffffff','r':1,'t':1507583657,'a':'bestie'} Same Key - 4000 characters, that's probably 30 friends + a few requests at a time. For the average forum, that should be good. I will probably make an extension plugin that only holds a super user key that can double that limit. (maybe a third) I doubled up on a key with interests notification center, and well it's messy. But this data is less variable then INC so I could manage saving amongst two keys with push and pop while watching the size restrictions. But with that there is a lot of error checking going on in the background so the time it takes to save takes a few seconds. The logic would be: Is their two keys? Is key one full? alert:full || save Is key two full? alert:full || save But in interests it's like: is both full? Find the oldest notification in both keys, compare, delete it, add to that key. (if still full, do another loop) That also means the loading is like Load key 1, check for key 2, load key 2. I'm using pb.member.select on your profile page to access someone else's key data. Then I'll push the request data. They will read it. If accept, it will be popped and the friend will be pushed If reject, it will be popped. I figure if you send a request you will not be able to send another until you refresh the page. I should probably local storage their sends
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Oct 9, 2017 22:37:22 GMT -8
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Oct 10, 2017 12:24:08 GMT -8
Multiple keys can get messy..
the one time I've done it I took the data from key one and looked for key 2.. If it existed I took that data and added it to the first, creating one long array. Manipulated that array how it needed to be done, then split it and re-saved each part the the two keys. The only loop needed would be to make sure the data fits over the two keys
|
|
inherit
(?)?
188910
0
Jan 26, 2013 13:30:48 GMT -8
♥ ℒʊ√ ♥
Clouds float into my life no longer to carry rain or usher storm but to add color to my sunset sky.
10,458
January 2013
luv
|
Post by ♥ ℒʊ√ ♥ on Oct 10, 2017 12:39:06 GMT -8
I am always in awe of you coding gurus.
You've already gotten so much done, P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ . It's really taking shape.
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Oct 10, 2017 13:39:24 GMT -8
Multiple keys can get messy.. the one time I've done it I took the data from key one and looked for key 2.. If it existed I took that data and added it to the first, creating one long array. Manipulated that array how it needed to be done, then split it and re-saved each part the the two keys. The only loop needed would be to make sure the data fits over the two keys With the data I have, there will never be a need to remove all the data in both keys at the same time. I will only need to pick one to modify an existing key. (what needs updated) I will decide a key, empty it with pop, then use push.values to push the modified array back in one call. (all or nothing) If it throws an error, I can just push the original array back using the {values:[]} instead of {value:''}
|
|
inherit
(?)?
188910
0
Jan 26, 2013 13:30:48 GMT -8
♥ ℒʊ√ ♥
Clouds float into my life no longer to carry rain or usher storm but to add color to my sunset sky.
10,458
January 2013
luv
|
Post by ♥ ℒʊ√ ♥ on Oct 10, 2017 15:03:47 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ ~
The praise is always sincere. Most of your jargon goes right over my head. Even though I proofread Peter's Plugin book for him, I will honestly say I still don't have a clue.
And it's hard not to be compulsive when you've got an idea and want to see if plays out like it does in your head. As I first posted, you had this covered with all of your ideas. They were solidly formed.
It's only right you took time to be with your wife. RL comes first, always.
6000 views in 6 hours. Impressive. Watch out. Your replies may generate that much or more.
|
|
inherit
249086
0
Oct 18, 2017 2:59:32 GMT -8
mrvince
8
September 2017
mrvince
|
Post by mrvince on Oct 11, 2017 8:39:05 GMT -8
Thank You That was my idea on Friends
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Oct 11, 2017 8:49:30 GMT -8
Thank You That was my idea on Friends Sweet I will try and have this ready by the end of next week. Make sure to have 1 super key ready for it.
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Oct 12, 2017 16:36:30 GMT -8
Multiple keys can get messy.. the one time I've done it I took the data from key one and looked for key 2.. If it existed I took that data and added it to the first, creating one long array. Manipulated that array how it needed to be done, then split it and re-saved each part the the two keys. The only loop needed would be to make sure the data fits over the two keys Alright I think I got what I want going if you want to see how I'm managing. I should be able to modify key data for every function and option through these two. If I need to remove then add, I can chain them as well. this.removeKey = function(user,funct){
this.removedKey = [] //save what's removed in case that data is needed for a later function user=parseInt(user) //remove all instances of user var keyname = 'friend_zone'
var pkey = $.extend(true, [], pb.plugin.key(keyname).get(pb.data('user').id))//deep clone for splice
var temp = pkey.length
var found = 0
//remove all duplicates in case of errors and choose a key to modify for(a=0;a<(temp-found);a++){
if(pkey[a].u==user){ //if find user found++ //keeps track of how many interations to run AAFZ.removedKey[AAFZ.removedKey.length] = pkey.splice(a,1)[0] //remove object and save to removedKey a-- //run same index again }else if(pkey[a].u==undefined){//error check if no user in object found++
pkey.splice(a,1)
a--
}
}
if(found==0&&pb.plugin.get('add_a_friend_zone_extension1')!=undefined){ //if didn't find in first key and there is a second keyname = 'addafriendzoneextension1'
pkey = $.extend(true, [], pb.plugin.key(keyname).get(pb.data('user').id))//deep clone for splice
temp = pkey.length
for(a=0;a<(temp-found);a++){
if(pkey[a].u==user){
found++//don't run last iteration
AAFZ.removedKey[AAFZ.removedKey.length] = pkey.splice(a,1)[0]
a--//run current iteration again
}else if(pkey[a].u==undefined){//error check
found++
pkey.splice(a,1)
a--
}
}
}
if(found==0){AAFZ.createDialog('AAFZKeyNotSynced','Data Not Synced','Please Refresh Your Page And Try Again.');return;} //creates dialog effortlessly pb.loading(true); //keep people from manipulating page pb.plugin.key(keyname).shift({object_id:pb.data('user').id,num_items:temp,success:function(){
//empty key then add extra without overwriting new data
pb.plugin.key(keyname).push({object_id:pb.data('user').id,values:pkey,success:function(){ //add modified array if(funct!=undefined)
funct() //call success function if specified },error:function(error){//if taking something out and screws up adding something back in just set it
pb.plugin.key(keyname).set({object_id:pb.data('user').id,value:pkey,success:function(){
if(funct!=undefined)
funct() //success function callback },error:function(error){pb.window.alert(error.reason)}})
}})
pb.loading(false) //let them use the page again },error:function(error){pb.window.alert(error.reason);pb.loading(false)}})
}
this.addKey = function(keyID,user,name,timestamp,color,rank,affiliation,funct,funct2){ //set a key and success and fail functions in one line pb.loading(true)
var object = {} //create object to be saved object.u = user //required object.n = name //required if(timestamp=='now'){
object.t = AAFZ.generateTime() //generates timestamp based on serverDate and setInterval 1000 since page opened }else if(timestamp!=undefined){
object.t = timestamp //keep existing date if specified }
if(color!=undefined)
object.c = color //optional if(rank!=undefined)
object.r = rank
if(affiliation!=undefined)
object.a = affiliation
pb.plugin.key('friend_zone').push({object_id:keyID,values:[object],success:function(){ //add key if(funct!=undefined)
funct() //success function called pb.loading(false)
},error:function(error){
if(error.code == 16){ //if key full if(pb.plugin.get('add_a_friend_zone_extension1')!= undefined){ //check extension pb.plugin.key('addafriendzoneextension1').push({object_id:keyID,values:[object],success:function(){
if(funct!=undefined)
funct() //success function pb.loading(false)
},error:function(error){if(error.code == 16){
if(funct2!=undefined) //if still full fail function funct2()
}}})
}else{
if(funct2!=undefined)
funct2() //if no extension fail function }
}else{pb.window.alert(error.reason);}
pb.loading(false)
}})
}
|
|
inherit
249086
0
Oct 18, 2017 2:59:32 GMT -8
mrvince
8
September 2017
mrvince
|
Post by mrvince on Oct 13, 2017 0:43:21 GMT -8
Thank You That was my idea on Friends Sweet I will try and have this ready by the end of next week. Make sure to have 1 super key ready for itSure
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Oct 25, 2017 8:01:40 GMT -8
Sweet I will try and have this ready by the end of next week. Make sure to have 1 super key ready for itSure Welp I didn't get as far with it as I hoped. Darn notifications were a bother. But so far I have a stable Beta for you to enjoy. Add A Friend Zone.pbp (5.87 KB) Tell me what you like and don't like. There are many more features I need to add still. But the basics are here. You can add friends and view notifications in this version. Any input on it at this state is appreciated.
|
|