I want to have multiple forums or (forum_lists) in tikiwiki, because, for example, I want my users to contribute exclusively under the gfdl in one forumlist, but may post copyrighted content in another forumlist.
Current situation: From the menu, the users can click on the forums link which leads them to tiki-forums.php. This displays a list of all the forums the user has the right to see listed, with sections.
The idea is to add an extra argument in the url which specifies which forumlist the user wants to see. example: tiki-forums.php?bigforum=gfdlforum and tiki-forums.php?bigforum=copyrightedstuff
A forum can "belong" to only one "bigforum", or forumlist, so this means an extra column in tiki_forums in the db.
Modifications to tiki-forums.php, right after
// This shows a list of forums everybody can use this listing include_once ("lib/commentslib.php"); $commentslib = new Comments($dbTiki);
I put
// Check for bigforum attribute in url, and assigns it to bigforum variable. If not, display an error page. this means tiki-forums.php displays an error page. if (isset($_REQUEST["bigforum"])) { $bigforum = $_REQUEST["bigforum"]; } else { $smarty->assign('errortype', 401); $smarty->assign('msg', tra("Permission denied you cannot view this page")); $smarty->display("error.tpl"); die; }
And in commentslib.php, in the list_forums function, after
if ( $res['forumId'] != '' && $this->user_has_perm_on_object($user, $res['forumId'], 'forum', 'tiki_p_forum_read') ) {
I put
if ( $bigforum == $res['bigforum'] ){
with an extra closing } somewhere down the road.
The bigforum attribute must be manually added in the db, but appart from that it works. better integration with the rest of Tiki would be awesome, url rewrite could give something like tiki.org/forums/IDorNAMEoftheBigforum/
All of this is just broken hacking and my first attempt at doing something, so don't be too harsh ;)
To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.
To help developers solve the bug, we kindly request that you demonstrate your bug on a show.tikiwiki.org instance. To start, simply select a version and click on "Create show.tikiwiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show.tikiwiki.org.
filename | created | hits | comment | version | filetype | ||
---|---|---|---|---|---|---|---|
No attachments for this item |