|
Download the library.
Check out the BYOND website.
Requires the Deadron library to be installed.
Version 0.00.01
OVERVIEW
This file provides a complete conferencing system for your Byond-based game. The conferencing model is rather different than the typical thread-based discussion models found on the web. It brings together the best of various systems I have used, in a manner that encourages in-depth discussion rather than fragmented talk. Best of all, it makes it easy to see the history of a conversation.
You can set up forums and administrate everything without doing any coding. Just list yourself as the admin user or run it locally, access the forums through ForumManager.DisplayTopPage(), and you will have a set of administrative commands made available to you.
Play around with it and see what you think. If people like this code and make use of it, there are lots and lots of additional features and customizations that can be made. Let me know what you need!
STRUCTURE
bbsystem (owns all forums)
forums ("Guide Forum")
conferences ("World History")
topics ("Hobbit habits")
messages ("I like Hobbits, how about you?")
Here is what you need to do to get things going:
- Create the ForumManager object.
- Specify who the admin users are.
- Call ForumManager.DisplayTopPage() to show the user a list of available
forums,
OR
Use ForumManager.ForumByName("Guide Forum") to get a specific forum, then call that forums DisplayTopPage().
Here is some sample code:
game_controller
var
ForumManager/bulletinboard
deadron/dbitem/bbs/forum/guideForum
New()
bulletinboard = new()
// Make dangeron the admin user.
var/list/adminList = new()
adminList += "dangeron"
bulletinboard.setAdminUserList(adminList)
return ..()
proc
ShowGuideForum()
if (!guideForum)
// See if it exists...
guideForum = bulletinboard.ForumByName("Guide Forum")
// If not, create it...
if (!guideForum)
guideForum = bulletinboard.AddForum("Guide Forum")
// Now let the user see it.
guideForum.DisplayTopPage()
return
CLASSES
- ForumManager
- AddForum(forum_name)
- Creates and returns a forum with the specified name. If a forum with the same name already exists, returns that.
- adminUserList()
- List of ckeys for administrative users -- those with permission to delete things. If no admin user is set, then admin access is only available if you are running locally (not on the net).
- DisplayTopPage()
- Displays the list of available forums to the usr. For the admin user, provides an "Add Forum" command.
- ForumByName(forum_name)
- Returns the deadron/dbitem/bbs/forum object representing the specified forum, or null if nothing found.
- New(forum_filename, rootDirectory)
- Sets up the forum system. By default, uses filename "forums.sav" and root directory "/forums".
- setAdminUserList(list/adminList)
- Provide a list of keys or ckeys of admin users. Converts each item to its ckey equivalent.
- deadron/dbitem/bbs/forum
- DisplayTopPage()
- Displays the list of available conferences to the usr.
IMPLEMENTATION DISCUSSION
This code attempts to follow the design approach called Model-View-Controller (MVC). This means that interface code and data object code are kept separate. All interface code is in the Topic() and Display...() functions, which makes it easy to add other interfaces in the future.
The code is security-conscious. On the assumption that someone might fake a Byond URL, it always does a check that the current usr is an admin user before allowing anything destructive.
KNOWN PROBLEMS
Currently once a message is loaded into memory, it stays there. So the forums could become something of a memory hog.
There should be more editing capabilities, for changing names of things and such.
|
|