PDA

View Full Version : Basic Questions


Ron1n
09-13-2004, 04:18 PM
I am a pretty advanced PHP coder, but I would like to utilize some of the built in vBulletin functions to save me time and keep my hack uniform, portable, and completely vB compatable. I also dont want to spend a lot of time searching for answers in the vB source, as it is not especially well documented.

1) What function parses text like a post, and what are its parameters (i.e. parsing flags)
2) After adding a permission variable in the admincp and altering it, what is required to access that permission variable.
3) After adding a field to the user table, can that data be accessed in bbuserinfo['field_name'] or do I need to find and edit the function that gets the user information.
4) What calls the special GUI textbox you see for posting? I dont want to just call one function, because different users want different displays that they set in their usercp.

Thats all, it saves me a quite a bit of time if someone who already mods vB could help me out.

Colin F
09-13-2004, 04:46 PM
1) look in the file includes/bbcodeparse.php
2) Do you mean when you add an option? You can call it in any file with global.php included using $vboptions[varname]
3) I'm not sure about that, even though I think so. Why not add it as a custom profile field. Those are available for sure ($bbuserinfo[fieldX]).
4) Can't help you with that sorry.

Dean C
09-13-2004, 07:22 PM
Moved to General vBulletin Questions. Please read the forum descriptions more closely in future :) Thanks

Ron1n
09-13-2004, 08:30 PM
2) Do you mean when you add an option? You can call it in any file with global.php included using $vboptions[varname]

I mean when you add a custom usergroup field ... heres that part of the code:
In AdminCP/usergroup.php

print_table_header("Download Permissions");
print_yes_no_row("Can Download Files? <dfn>Allows usergroup to download from the downloads section?</dfn>", 'usergroup[candownload]', $ug_bitfield['candownloadfiles']);
print_yes_no_row("Can Manage Files?<dfn>Allows usergroup to manage files in the downloads section<br>Set individual permissions below...</dfn>", 'usergroup[canmanagefiles]', $ug_bitfield['canmanagefiles']);
print_table_break();
above
above print_table_header($vbphrase['forum_viewing_permissions']);

I also modded init.php and added the following:
1) added downloadpermissions to special templates array
2) added a to the switch statement in $storeitems (the vboptions array)
3) added $_BITFIELD['downloadpermissions']

3) I'm not sure about that, even though I think so. Why not add it as a custom profile field. Those are available for sure ($bbuserinfo[fieldX]).

Sounds like a plan, how do I go about doing that. Btw, i want this to be hidden from the user... not editable. (it counts their downloads, uploads, stores their latest file downloaded, ect.).

For this I will need to know two things:
1) how to create it
2) how do edit it

VB seems very coder friendly once you learn it, but I just need to learn all the built in functions

Moved to General vBulletin Questions. Please read the forum descriptions more closely in future :) Thanks

I dont know whats with the mods here, but they just like moving things around. This is a question about coding (http://dictionary.reference.com/search?q=coding) not about functioning/functionality (http://dictionary.reference.com/search?q=functioning).