4
Um, kinda difficult to go into the details here, as the hacks are extensive and quite pervasive. As an indication these are the files I've modified:
./class/xoopstopic.php.ORIG
./class/xoopstree.php.ORIG
./class/smarty/plugins/resource.db.php.ORIG
./modules/news/index.php.ORIG
./modules/news/admin/index.php.ORIG
./modules/news/admin/storyform.inc.php.ORIG
./modules/news/class/class.newsstory.php.ORIG
./modules/news/include/storyform.inc.php.ORIG
./kernel/groupperm.php.ORIG
./kernel/group.php.ORIG
Basically, I've used the existing group_permissions class and added "topic_read" and "topic_post" permissions.
This has involved adding SetPermissions(), deleteByItem(), makePermittedSelBox() and makeTopicSelBox() methods to XoopsTopic, makeMyPermittedSelBox() and makeTopicMultiSelBox() methods to XoopsTree, a getNonGroupsByUser() method to XoopsMembership, makeMySelBox() and makeMyMultiSelBox() methods to XoopsGroupHandler.
Finally, I added getAllPermitted() to XoopsNewsStory, and rewrote its getAllPublished() method, and many of the other methods in there to use it.
What else...oh I moved the membership stuff out of group.php into its own file so that a handler can be properly instantiated for it.
Unfortunately, all this is tied up with another hack to allow stories to appear in multiple topics, for which I implemented a new XoopsGhost class (couldn't think of a better name!) and corresponding database table.
Sorry, it's probably not the quick and easy answer you were after. If you want, I can mail you a snapshot of my current XOOPS source tree for you to play with.
My long term plan is to diff against current sources and submit the changes, but I need to get my website off the ground first, and that's taking a while coz of the amount of XOOPS mods I'm having to do to get it to do what I want.
If you think that lot's bad, you should see what I did to xoopsgallery... ;)
bb