Differences
This shows you the differences between the selected revision and the current version of the page.
punbb20:oo 2009/01/26 09:15 | punbb20:oo 2020/02/06 11:04 current | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Sugestion on class structure for PunBB2.0 ====== | + | NOTE: This is a proposal from cereal, trhis is not punbb official |
- | ===== Graphical representation ===== | + | ====== Suggestion on class structure for PunBB2.0 ====== |
+ | example can be found here http://cereal.box.sk/punbbclass/ | ||
===== Explanation ===== | ===== Explanation ===== | ||
Line 15: | Line 16: | ||
* PunBB-Posts: This is basicly a wrapper class (read and write) around the Posts | * PunBB-Posts: This is basicly a wrapper class (read and write) around the Posts | ||
* PunBB-User: This class will handly all user specifick tasks, login, logout, update profile, .... there will be a PunBB-User-Abstract class to make it easy for people to design there own class for user handling | * PunBB-User: This class will handly all user specifick tasks, login, logout, update profile, .... there will be a PunBB-User-Abstract class to make it easy for people to design there own class for user handling | ||
+ | |||
+ | ===== Classes ===== | ||
+ | |||
+ | ==== PunBB ==== | ||
+ | This class will hold all global vars needed for punbb to be run | ||
+ | it will also keep references to the db builder object, the user array (will later be an object) | ||
+ | and other stuff thats currently defined as globals ... | ||
+ | |||
+ | ==== PunBB-Category ==== | ||
+ | * construct(id): the id of the category, must be bigger then 0 | ||
+ | * getId | ||
+ | * getName | ||
+ | * getPosition | ||
+ | * getForums( outputmethode ): this wil either be an array of ids or an array of forum objects | ||
+ | |||
+ | ==== PunBB-Category-write ==== | ||
+ | * construct(id): id can be 0 (add a new category) or > 0 (edit a category) | ||
+ | * setName( val ) | ||
+ | * setPosition( val ) | ||
+ | * delete: only allow this if the id is not 0 and no forums are added to this category, or add a force option to recursively delete all forums | ||
+ | |||
+ | ==== PunBB-Forum ==== | ||
+ | * construct(id): the forum id, must be bigger then 0 | ||
+ | * getName | ||
+ | * getDesc | ||
+ | * getRedirect | ||
+ | * getModerators | ||
+ | * getStats | ||
+ | * getCategory(outputmethode): get it as an id, or as an object | ||
+ | |||
+ | ==== PunBB-Forum-write ==== | ||
+ | * construct(id): id can be 0 (add a new forum) or > 0 (edit a forum) | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||