To download this library for your Linux/Mac installation, enter this on your command line:
DreamDownload byond://UnknownPerson.upCommentBox##version=11Emulator users, in the BYOND pager go to File | Open Location and enter this URL:
upCommentBox is a plug-and-play utility and demo of the usage of the library upForm. The code is included with only a few lines of code allowing the client procedures to be called. This environment is also a demo in that it demonstrates how the functions and features of upForm can be used to create interesting and useful browser interfaces using the library. upCommentBox also saves the comments into a savefile.
Version 1.0 (Mar 24 08)
- Utility released
Version 1.1 (Mar 26 08)
- the authorized list is now updated via upCB_Authorized(), which should only be called in world/New() to add keys to the authorized list. Refer to to the usage instructions. (Gughunter)
In order to use this utility, you should allow players to use two main procs and one variable:
- Call this when you want a player to submit a new comment
- Call this when you want an administrator to be able to manage existing comments
- Initialize this value at runtime to a list to determine what keys are authorized to manage comments. Values are stored in canonical form (therefore, the key "Unknown Person" in canonical form would be "unknownperson"). This value is essentially obtained by using client.ckey, or using ckey() to the key string
The easiest way to use library is to just define verbs for the submit and manage button, but only allow authorized keys to use the manage verb. Don't forget to initialize upCB_authorized, or nobody will be able to manage comments.
Copyright © 2019 BYOND Software. All rights reserved.