Former Member
inherit
guest@proboards.com
208272
0
Nov 27, 2024 15:34:36 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Apr 22, 2014 13:45:29 GMT -8
Hello.
I'm currently working on translating some pseudocode I have for a plugin I'm working on, and ran into a snag.
I've created a small form that is attached to a mini profile (shown only the user it belongs to when they're logged in), or sidebar. I'm trying to find a way that through submitting this form (it's a combination of two drop downs, so no extra input is necessary other than selecting two things and pushing submit) that it will send a generated (internally) update to their status / activity feed.
As an example, X user chooses Option Y and Option Z, then submits. Their status/activity thread would then have a new item show up as "X did Y and Z!" (or something similar, based on generated criteria). Is this possible through the current API, as I cannot see much other than selecting users. This would also need to be viewable by all of the forum users, as would any typical status/activity message.
Alternatively, I'm looking for away of logging this information (again so the entire forum can access to read it). I know keys are limited to 32KB, sadly, so I don't expect storing a text file as a JSON would work well for logging, thus why I tried to research for the status/activity links.
Any assistance would be greatly appreciated.
Thanks!
|
|
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 Apr 22, 2014 16:43:49 GMT -8
Current activity is not an accessible variable. Their status is, but I believe it has to be done through the form on the profile page.
|
|
Former Member
inherit
guest@proboards.com
208272
0
Nov 27, 2024 15:34:36 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Apr 23, 2014 4:43:49 GMT -8
Hello Wormopolis. My sincere thanks for the timely reply -- much faster than I expected. I guessed this was the case in that the API did not have status/activity accessible quite yet, which is a pity, however wanted to confirm. I checked the current listings and API Kitchen Sink before posting... Would you have any recommendations for processing (R+W) a "log" of a form within ProBoards confines/capabilities. I had thought on a simple text document, but am not sure if we are able to host it on ProBoards in a Read+Write fashion that is limited to logged-in-users. Perhaps another alternative?
|
|
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 Apr 24, 2014 0:36:42 GMT -8
well the easiest would be to use the built in status system, but are you wanting it to never be overwritten?
|
|
Former Member
inherit
guest@proboards.com
208272
0
Nov 27, 2024 15:34:36 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Apr 24, 2014 5:29:20 GMT -8
Overwritten as in completely recoded to be purely automated? Likely not, as I don't think that's really quite possible as of yet (if ever...that would probably require the entire API section to be rewritten behind the scenes by the devs, I'm thinking).
At most I'm expecting a message to be posted to the status system per account of each users' actions on the form. The form is designed to be used as a "roll" system (with its own internal logic), of which a player selects an action and the system will inform them via notifications/status of the outcome (vital success/moderate success/failure/severe failure, etc).
|
|
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 Apr 24, 2014 9:03:07 GMT -8
Overwritten as in it changes their status and they cant change their own status to something else.
a plugin isnt going to be able to push entries into their activity log, if that is what you are after. you can setup some sort of interface to generate the results you want, and store in a key. you could even have it remember all of the results up to a certain point (storage isnt infinite).
|
|
Former Member
inherit
guest@proboards.com
208272
0
Nov 27, 2024 15:34:36 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Apr 25, 2014 7:28:05 GMT -8
Hmm I suppose one could use a key to hold a minimal variable that could then be parsed in javascript to make it human-readable? That would cut down significantly on storage use. The issue would be therein to keep the variable "clean", such as having an auto-pruning process in the code...maybe using timestamps (ie: If older than 3 days, remove).
The key would hold:
var actions = { "userNameA1" : { "type": "A", "result": "vS", "postID": "52" }, "userNameB2" : { "type": "B", "result": "cF", "postID": "81" }, "userNameC3" : { "type": "C", "result": "mS", "postID": "36" } }
Could be processed/parsed into:
"@usernamea1 was vitally successful at ACTION-A! View the post here!" "@usernameb2 critically failed at ACTION-B! View the post here!" "@usernamec3 was moderately successful at ACTION-C! View the post here!"
These would be posted in an AJAX div located somewhere within the page template, I suppose. The postID's are used to create a hyperlink in the latter half of the parsed/constructed statements.
----
I know it's a bit rough, pseudo code wise, but would technically be possible given the information I've seen on the API and what you've provided, would it not?
|
|