![]() |
(Many) manual forum/usergroup/permissions.. (solved)
Hey, I'm new to hacking vB but I have it integrated into a website I'm building and need some automated tasks. Was going really well until I hit the following problem. Hopefully someone can figure out where I've gone wrong with this.. I'd really appreciate any assistance you can offer.
I need to create a few thousand forums under a single category each with it's own access group. It'd look like 'Main Category' -> 'Sub Category' -> 'Forum [1...3000]' with usergroups 'zzzForum[1...3000]'. Now, I scripted the creation of what I think are all the necessary entries: =>vb_forum (title, title_clean, description, description_clean, displayorder, daysprune,parentid, parentlist, childlist) For example, ('asdf','asdf','desc','desc',1,-1,21,'22,21,3,-1','22,-1') => vb_usergroup (usergroupid, title, description, forumpermissions,wolpermissions,genericpermissions ,genericoptions) For example, (18,'asdf','desc',643319,1,2627075,40) => vb_forumpermission (forumid, usergroupid, forumpermissions) For example, (22,18,645111) to give the group access to the forum and (3,18,1) to give the group the ability to see the 'Main Category' and 'Sub Category'. Basically, I created a forum linked to it's parents, created a group, and gave the group access to both the forum and the outer category. Then I repeated that a few thousand times. Finally, I updated the childlist of the parent to include all of the new forumids. Trouble is, after creating all the entries, the forums don't show up in the AdminCP->Forum Manager or the Forum Permissions link. I can see the user groups in the User Manager, but they don't show up in the Forum Permissions links either. And even more annoying, when I create a forum or user group in the AdminCP now, I get a blank page instead of a successful redirect and they don't show up either - though they are inserted into the database. After deleting all the entries I inserted manually, I can create/delete usergroups in the admincp as normal. Any thoughts on what's wrong.. something I missed.. a silent but enforced limit (possibly memory related?).. I'm stumped. Thanks. Edit: Should probably mention this is with vB 3.8.1. --------------- Added [DATE]1244469162[/DATE] at [TIME]1244469162[/TIME] --------------- I've managed to have some manner of success.. If I only insert a few forums/groups everything will show up after I run the forum counters maintenance script. :confused: |
I would strongly, strongly recommend not to create "a few thousand forums". I think there have been threads about how it isn't recommended to have over 1000 forums. Why do you need so many forums? Can you possible just use Prefixes instead?
|
I need to have threads isolated by group access rights and unfortunately I have a few thousand divisions.
Members will need to belong to a few dozen groups at a time, though likely only a half dozen. Some groups may have no members in them but can gain members at any time (automatically through the site integration). Each group is bound to a single subforum so only those in the group can see/read any threads within it. I realize it's an atypical usage scenario, but it is what it is. Technically, I can create and delete the forums as members gain access to them or groups empty of people, but I expect most, if not all, groups to be full most of the time. If I can't get it to run now without any members in the groups, it's certainly not going to run down the road. :( Prefixes/tags were suggested over at .com too, but I don't think they will do what I need.. though I admittedly don't know much of anything about them. I'm getting the feeling that vB has a very awkward way of handling forums and access rights - a very big footprint, if you will, that makes it fully unsuited to this usage scenario even though it's exactly what I need. |
For the benefit of anyone else who may find themselves in a similar situation, by partner came upon an idea for a simple workaround to the above issue. Took me a bit to figure out how to implement it, but here you go.
vB is more than happy to manipulate thousands of forums with random passwords. It's the thousands of user groups each with custom permissions that seems to cripple it. All I had to do was link my own access group code into the top of forumdisplay.php and just before the first hook set a cookie with the relevant forum password if the user has access to it based on my criteria. Essentially put this immediately after the // ### START MAIN SCRIPT ### block: require('backend.classes'); $myClass= new backendClass(); if($myClass->hasAccess($foruminfo['forumid'])) { set_bbarray_cookie('forumpwd', $foruminfo['forumid'], md5($vbulletin->userinfo['userid'] . $foruminfo['password']), 1); } Would have been nice to use vB's access groups, but this works very well and I never have to give out the passwords so it amounts to about the same without all of vB's caching overhead. |
All times are GMT. The time now is 10:51 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|