The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Info on functions?
I'm looking for information on a specific function (build_forum_permissions() and how it is used, yet the comments in the code in vB 3 RC4 aren't descriptive enough to help. Does anyone know of a good resource to ask about this? FYI, yes, I had been thinking about asking directly at vb.com
|
#2
|
||||
|
||||
Well, it queries the database for usergroups and forums adnd builds up the datastore records usergroupcache and forumcache..
To use it just call build_forum_permissions(). |
#3
|
||||
|
||||
IIRC, when used to make a forum, it SHOULD see what the forum defaults are and set the newly created forum to said defaults? Oh and yes, I know how to use a function, just having problems with this 1 in particular. When I use it in my forum creation script, everything is set to the table defaults for the forum. Basically I'm trying to figure out a way to have it set the new forum's permissions to the default of the site without manually going into the admin panel, or manually slapping them in by a mySQL insert.
|
#4
|
||||
|
||||
The forum defaults (eg. allow bb code, active, etc.) AFAIK are hardcoded in admincp/forum.php, so if you want them in your own script too you will have to copy that code.
|
#5
|
||||
|
||||
I don't think they're hard coded in PHP, since I believe you can change the forum default from within the admincp, and I think it's just a mySQL query / update when it does that. I'll take a look at that though.
Has anyone ever attempted to make a script to automatically create forums? |
#6
|
||||
|
||||
Copy & Paste from admincp/forum.php
PHP Code:
|
#7
|
||||
|
||||
I stand corrected! I'll look for that. Just goes to prove that the world DOES keep on moving when I take a nap!
|
#8
|
||||
|
||||
By George, I think I've got it! The code you mentioned that is hard coded doesn't go directly into the $forum. Somewhere along the line it gets turned into $forum['options']. Took ages, but I finally stumbled upon the sequence:
PHP Code:
PHP Code:
Now, does anyone see any potential errors or boo-boos that I might have missed? It is 5:10 AM for me after all |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|