vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Basic Questions (https://vborg.vbsupport.ru/showthread.php?t=69404)

Ron1n 09-13-2004 03:18 PM

Basic Questions
 
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 03: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 06:22 PM

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

Ron1n 09-13-2004 07:30 PM

Quote:

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
Code:

        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
Code:

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']

Quote:

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

Quote:

Originally Posted by Dean C
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 not about functioning/functionality.


All times are GMT. The time now is 01:49 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01706 seconds
  • Memory Usage 1,722KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete