inherit
172351
0
Sept 5, 2019 10:56:35 GMT -8
DarkPikachu
Complexity == Fun
320
October 2011
tcll
|
Post by DarkPikachu on Mar 10, 2014 13:20:01 GMT -8
there's actually a few plugins I need to do this for... - post previews (for quotes and user profile links) - RP Characters (for a text field in every user's profile) this is only to be initialized once per page load, so as to not overload the server but how do I go about using the API to get the info??
|
|
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 Mar 10, 2014 15:31:33 GMT -8
nothing in the API will do that. you would have to request it as a feature, but I can say they probably wont load data on EVERY member EVERY page load.. that would be ridiculously expensive time wise..
|
|
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 Mar 10, 2014 15:48:08 GMT -8
Why on earth would you need every member's info on every page load? Your first plugin could be solved with this (not yet implemented) and your second plugin just sounds like a custom field.
|
|
inherit
172351
0
Sept 5, 2019 10:56:35 GMT -8
DarkPikachu
Complexity == Fun
320
October 2011
tcll
|
Post by DarkPikachu on Mar 10, 2014 17:21:06 GMT -8
well the 2nd plugin is a custom field (text area) but this only applies to you and the users on the page... but I need info from a user's custom field who's not on the page. all I need is that text area from everyone's profile so I can make a custom display for everyone's shared characters. (users have to specify you in that character's options before you'll be able to use it) if I may make a request then, since it's currently not possible. (perhapse a small option to make a custom profile field global) as for the first plugin, I'll look into that thanks.
|
|
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 Mar 11, 2014 8:15:03 GMT -8
if I may make a request then, since it's currently not possible. (perhapse a small option to make a custom profile field global) That's not going to happen. There's the potential for a page to load far too much data.
|
|
inherit
172351
0
Sept 5, 2019 10:56:35 GMT -8
DarkPikachu
Complexity == Fun
320
October 2011
tcll
|
Post by DarkPikachu on Mar 12, 2014 8:57:51 GMT -8
well I've found a work around anyways with local storage... but you have to visit either a page the user has posted on or the users profile at least once, otherwize you'll just get a default dialog for the character saying: "you have not collected info about this character yet please visit either a thread the owner has posted on, or visit their profile to resolve this" I could probably use an iframe to resolve this >_> DON'T WORRY! I won't overload the server by making an iframe call or every character dialog... NO! if you run across a character whose user isn't on the current page when their character data is non-existant in your data, ONLY THEN will I create an iframe (one iframe every second for each owner you don't have) to view the owner's profile page to retrieve their character data for your display. that's how I intend to solve things.
|
|
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 Mar 12, 2014 9:06:55 GMT -8
if you run across a character whose user isn't on the current page when their character data is non-existant in your data, ONLY THEN will I create an iframe (one iframe every second for each owner you don't have) to view the owner's profile page to retrieve their character data for your display. From www.proboards.com/developer-guidelines:
|
|
inherit
172351
0
Sept 5, 2019 10:56:35 GMT -8
DarkPikachu
Complexity == Fun
320
October 2011
tcll
|
Post by DarkPikachu on Mar 12, 2014 9:18:12 GMT -8
^that was actually a request for it's usage. sorry I wasn't clear about it. would you consider it if I add restrictions?? obvious restrictions: - hidden - limited to processing 1 iframe every second. - only used once if you don't have their data. just because something is illegal, that doesn't mean it isn't right. the gov't does this all the time though 80% of the time, they're doing it wrong... >.> if not an iframe, then might I get some recommendations on what I CAN do to get this working properly?? (where people can use other people's limit-less shared RP characters) there IS the option of creating a server and storing everyone's profile data on that, but I'm not made of money and can't afford to set up my own interface... let alone, I don't want to use GitHub for something as frivelous as this. work with me here please, I'm doing my best to work with you guys that I've restricted calling an iframe to about as often as a user does a google search. (actually it's less-often, but still) I know you guys don't want people calling an iframe because each iframe does a separate server request and can overload the server and possibly result in being banned by cloudflare. EDIT: if the iframe thing goes through, is there any way I can restrict data requested from the server?? (make the server calls less stressful for the server)
|
|
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 Mar 12, 2014 9:46:50 GMT -8
would you consider it if I add restrictions?? obvious restrictions: - hidden - limited to processing 1 iframe every second. - only used once if you don't have their data. You already made those restrictions clear in your earlier post, and my answer took those into consideration. just because something is illegal, that doesn't mean it isn't right. the gov't does this all the time though 80% of the time, they're doing it wrong... >.> It's not illegal, it's not a matter of right vs. wrong, it just breaks the TOS. if not an iframe, then might I get some recommendations on what I CAN do to get this working properly?? (where people can use other people's limit-less shared RP characters) there IS the option of creating a server and storing everyone's profile data on that, but I'm not made of money and can't afford to set up my own interface... let alone, I don't want to use GitHub for something as frivelous as this. Shared hosting servers are incredibly cheap these days and Github is both free and full of frivolous projects. Spend a few hours making a simple REST client for a database or heck, even implement a websocket in node.js (that's the hip thing these days, it appears). I'm doing my best to work with you guys that I've restricted calling an iframe to about as often as a user does a google search. (actually it's less-often, but still) If we had Google's resources, this wouldn't be an issue. Sadly, we're not the #1 website in the world (as ranked by Alexa).
|
|
inherit
172351
0
Sept 5, 2019 10:56:35 GMT -8
DarkPikachu
Complexity == Fun
320
October 2011
tcll
|
Post by DarkPikachu on Mar 12, 2014 10:25:14 GMT -8
You already made those restrictions clear in your earlier post, and my answer took those into consideration. sorry It's not illegal, it's not a matter of right vs. wrong, it just breaks the TOS. which defines what you can and can't do. what you CAN do is right, and therefore is legal what you CAN'T do is wrong, and therefore is illegal when in the same terms, a wrong can make a right if used properly. (this is the area people are afraid to jump into) in the terms of the TOS, it's about: - overloading the server, which most programming noobs would do... - referencing illegal or malicious content aimed to pirate, harm, or destroy - other negative things I don't know much about but now where does that leave the programmers who actually do stuff properly. I don't intend to do any of those acts, so the best resource I've got is to talk over the disputes with the developers. so any reasonable disputes you guys may have about using iframes, I want to work them out with you (unless there's another way to call a reasonable amount of data from a user's profile that doesn't require an iframe) also... I have a reputation to uphold for doing stuff correctly, which is why alot of my stuff is unfinished... heh so if it's a trust thing because you guys don't know me well, I'm just here to let you know that Shared hosting servers are incredibly cheap these days and Github is both free and full of frivolous projects. Spend a few hours making a simple REST client for a database or heck, even implement a websocket in node.js (that's the hip thing these days, it appears). ugh... I might consider GitHub... if needed If we had Google's resources, this wouldn't be an issue. Sadly, we're not the #1 website in the world (as ranked by Alexa). lol, that wasn't about google, but ok... just trying to point out that I'm trying to make as few server calls as possible
|
|
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 Mar 13, 2014 2:18:23 GMT -8
You already made those restrictions clear in your earlier post, and my answer took those into consideration. sorry It's not illegal, it's not a matter of right vs. wrong, it just breaks the TOS. which defines what you can and can't do. what you CAN do is right, and therefore is legal what you CAN'T do is wrong, and therefore is illegal when in the same terms, a wrong can make a right if used properly. (this is the area people are afraid to jump into) in the terms of the TOS, it's about: - overloading the server, which most programming noobs would do... - referencing illegal or malicious content aimed to pirate, harm, or destroy - other negative things I don't know much about but now where does that leave the programmers who actually do stuff properly. I don't intend to do any of those acts, so the best resource I've got is to talk over the disputes with the developers. so any reasonable disputes you guys may have about using iframes, I want to work them out with you (unless there's another way to call a reasonable amount of data from a user's profile that doesn't require an iframe) also... I have a reputation to uphold for doing stuff correctly, which is why alot of my stuff is unfinished... heh so if it's a trust thing because you guys don't know me well, I'm just here to let you know that Shared hosting servers are incredibly cheap these days and Github is both free and full of frivolous projects. Spend a few hours making a simple REST client for a database or heck, even implement a websocket in node.js (that's the hip thing these days, it appears). ugh... I might consider GitHub... if needed If we had Google's resources, this wouldn't be an issue. Sadly, we're not the #1 website in the world (as ranked by Alexa). lol, that wasn't about google, but ok... just trying to point out that I'm trying to make as few server calls as possible If this is for personal use, how about you just build a page off of the groups page, have it cycle through the groups page, and boom you have everyone loaded, and legitimately. All of the data is stored in alert(JSON.stringify(proboards.data('proboards.user'))); if(location.href.indexOf('members') != -1) { var userdata = JSON.stringify(proboards.data('proboards.user')); var splitarray = new Array(); var sortedarray = new Array(); var multiarray = new Array(); splitarray = userdata.split(',') var count = 0; for(a=0;a<splitarray.length;a++) {splitarray=splitarray.replace('{','').replace('}','');} for(a=0;a<splitarray.length;a++) {//alert(splitarray); var sid = splitarray.substring(1,4).replace(/"/g,'').replace(':','');; var sname = splitarray[a+2].replace(/"/g,'').replace('name:',''); multiarray[count] = [sname,sid]; a= a+3;count++ } sortedarray = multiarray.sort(function(a, b){ var nameA=a[0].toLowerCase(), nameB=b[0].toLowerCase(); if (nameA < nameB){return -1};if (nameA > nameB){ return 1}; return 0;}); alert(sortedarray);//full list alert(sortedarray[0][0]);//name alert(sortedarray[0][1]);//id number alert(sortedarray[1][0]);//second name } Something as simple is that would give you a multidimensional array of names and user ids (granted it must be under 1000 members)
|
|
inherit
172351
0
Sept 5, 2019 10:56:35 GMT -8
DarkPikachu
Complexity == Fun
320
October 2011
tcll
|
Post by DarkPikachu on Mar 13, 2014 5:53:16 GMT -8
sounds intresting, but doesn't sound exactly like what I need... :/ (I need everyone's data for a thread-page) here's my plugin: tcll5850.proboards.com/thread/216/characters-plugin-finally-development-neededso far I've got it to where you have a variable filled with localStorage data from every user you've seen. the major problem is guests... say you reference a page that you're using someone's character on, but the person who own's that character is not on the page... as of right now, I'm not using iframes... so for guests, you'll have to visit that person before you'll be able to see their character displayed properly. (guests will just see a default dialog for that character with a notification that you have to visit the owner's page) EDIT: so far, this is the console output for the data variable for me on that page: admin: Object dk: Object loggren: Object wii4all: Object
the members dk, loggren, and wii4all are not on that page, but I can use their characters and have it display properly only for me. EDIT2: what I'm currently doing is using window['localStorage'] to store and retrieve that data. if you visit a page where a user has posted, their info is appended to that variable. (all I need is their character data, and their profile page, so that's all that gets stored)
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Mar 13, 2014 6:54:08 GMT -8
Very messy the way you are doing it.
If I was going to make this plugin, here is probably how I would go about it...
- Build a page where your members can build their character (i.e name, avatar, stats, can it be shared etc). - Store this data in a super user key for that user. - When members need to reference a character that isn't theirs (including shared), use the search user component to find the user that has the characters they want to reference (this pulls back the key data from the search), prevent it's default behaviour from happening (i.e adding user @), but do whatever you need to do. - When member submits their post, store the referenced characters in a post key. - On the thread view page, just grab the data for each post, display it as you wish. Done.
|
|
inherit
172351
0
Sept 5, 2019 10:56:35 GMT -8
DarkPikachu
Complexity == Fun
320
October 2011
tcll
|
Post by DarkPikachu on Mar 13, 2014 7:38:40 GMT -8
yea, but 4KB has me thinking otherwize... especially since I use picasa links for images AND have the option of CSS styling. that data can end up being taken very quickly with only a few characters (depending on the visual work you put into them) so I'm staying away from keys :/ you're only limited to 2 and 5 anyways, so it'll be a -1 if my plugin does this as far as the search user component... that may be what I need to bamf iframes entirely as long as it's possible to do search("@loggren")
|
|
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 Mar 13, 2014 7:41:26 GMT -8
Very messy the way you are doing it. If I was going to make this plugin, here is probably how I would go about it... - Build a page where your members can build their character (i.e name, avatar, stats, can it be shared etc). - Store this data in a super user key for that user. - When members need to reference a character that isn't theirs (including shared), use the search user component to find the user that has the characters they want to reference (this pulls back the key data from the search), prevent it's default behaviour from happening (i.e adding user @), but do whatever you need to do. - When member submits their post, store the referenced characters in a post key. - On the thread view page, just grab the data for each post, display it as you wish. Done. You basically described the Alters plugin. except characters are stored in plugin settings.
|
|