Differences

This shows you the differences between the selected revision and the current version of the page.

punbb20:oo 2009/01/26 10:26 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 18: Line 19:
===== Classes ===== ===== Classes =====
-Class: PunBB-Category +==== PunBB ==== 
-__construct(id): the id of the category, must be bigger then 0 +This class will hold all global vars needed for punbb to be run 
-getId +it will also keep references to the db builder object, the user array (will later be an object) 
-getName +and other stuff thats currently defined as globals ... 
-getPosition + 
-getForums( outputmethode ): this wil either be an array of ids or an array of forum objects+==== 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) 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
-class:PunBB-Category-write 
-__construct(id) 
-setName( val ) 
-setPosition( val ) 
-addForum (id): add a forum to this category 
-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 

Personal Tools