Member Log In
Site Navigation
Latest Modifications
- [vB 3.8.4] THX - Hack for VB. 3.8.4
By: bluedog - [vB 3.8.4] Cyb - Chatbox V.2.3
By: bluedog - [vB 4.0.x] PHPKD - Advanced Quick...
By: PHPKD - [vB 3.6.x] StopSpam
By: flappi282 - [vB 3.8.x] vBulletin Chat Addon for...
By: 123flashchat
Latest Template Mods
- [vB 4.0.x] Remove My Profile Link...
By: Ak Worm - [vB 3.8.x] Images DownloadBox...
By: cRs!MP - [vB 3.8.x] Adviertise Mod On Forum...
By: MG4 - [vB 3.8.4] Images PassWordBox...
By: cRs!MP - [vB 3.8.4] Footer Follow Ups
By: Ak Worm
Latest Styles
- [vB 4.0.x] 4.0.3 - VB4STYLE-TWEETA...
By: Belon - [vB 4.0.x] [4.0.3] vbdesigns.de...
By: Belon - [vB 3.8.4] CompletevB - Skylight
By: DreadKnight - [vB 3.8.3] [vB 3.8.4] Barcelona...
By: hoiquantinhoc.com - [vB 3.8.3] Natures Walk by vBSkin...
By: Chri5
Latest Graphics
- [vB ] [anim.]Team Ranks
By: cRs!MP - [vB ] Abstract Circles (3...
By: cRs!MP - [vB ] PlayStation Rank Images
By: cRs!MP - [vB 3.6.12] Heavy Stroked Button...
By: Shelley - [vB ] Minature Ranks.
By: Shelley
vBulletin Modifications »
General vBulletin Section »
vBulletin Modification Tutorials »
[How-To] usefull admincp print_xxx functions
![]() |
| | #1 | |||||||||
Location: Israel Age: 29 ![]() |
Status: Offline [How-To] usefull admincp print_xxx functions In this tutorial i'll list & explan about some very common & usefull print_xxxxx functions that are builtin into vbulletin system. those can make you life much easier when trying to customize the admincp config screens. note that desspite the fact a detailed description & params list for all of these functions can be found inside /includes/adminfunctions.php file that bundled in your copy of vbulletin, i think having a quick quide on this can be good & can bring knowledge to those who are not familer with those functions. so lets start: print_table_break() parameters: can have optional 2 parameters in it: param1 string Code to be inserted between the two tables param2 string Width for the new table - default = '90%' description: Prints out a closing table tag and opens another for page layout purposes. whenever you add new controls to existing admincp screen, use this function first. code & screenshot of how this looks: not needed - just a spacer between 2 tables blocks. print_table_header('title header') parameters: 1 required, all the rest are optional: param1 string Title for the row param2 integer Number of columns to span param3 boolean Whether or not to htmlspecialchars the title param4 string Name for <a name=""> anchor tag param5 string Alignment for the title (center / left / right) param6 boolean Whether or not to show the help button in the row description: Makes a column-spanning bar with a named <A> and a title, then reinitialises the background class counter. code & screenshot of how this looks: PHP Code: ![]() print_input_row('title','name','value') parameters: 2 required, all the rest are optional: param1 string Title for row param2 string Name for input field param3 string Value for input field param4 boolean Whether or not to htmlspecialchars the input field value param5 integer Size for input field param6 integer Max length for input field param7 string Text direction for input field param8 mixed If specified, overrides the default CSS class for the input field description: Prints a row containing an <input type="text" /> code & screenshot of how this looks: PHP Code: ![]() print_yes_no_row('title','name','value') parameters: 2 required, all the rest are optional: param1 string Title for row param2 string Name for radio buttons param3 string Selected button's value param4 string Optional Javascript code to run when radio buttons are clicked - example: ' onclick="do_something()"' description: Prints a row containing 'yes', 'no' <input type="radio" / > buttons code & screenshot of how this looks: PHP Code: ![]() print_cp_header() parameters: all are optional: param1 string The page title param2 string Javascript functions to be run on page start - for example "alert('moo'); alert('baa');" param3 string Code to be inserted into the <head> of the page param4 integer Width in pixels of page margins (default = 0) param5 string HTML attributes for <body> tag - for example 'bgcolor="red" text="orange"' description: prints admincp page header code & screenshot of how this looks: PHP Code: Realted function: print_cp_footer() - same, just for footer (NO params are required) print_form_header() parameters: all are optional: param1 string PHP script to which the form will submit (ommit file suffix) param2 string 'do' action for target script param3 boolean Whether or not to include an encoding type for the form (for file uploads) param4 boolean Whether or not to add a <table> to give the form structure param5 string Name for the form - <form name="$name" ... > param6 string Width for the <table> - default = '90%' param7 string Value for 'target' attribute of form param8 boolean Whether or not to place a <br /> before the opening form tag param9 string Form method (GET / POST) description: prints form tags (action target) - in case you have custom script target to process this form, be sure to put it here (param1). code & screenshot of how this looks: PHP Code: that's it for those common functions. again there are few more out there, you can check the file for complete listing & declaration of them. now some practical example: remember that it is handy to use vars for these controls that are built in into vbulletin. for example, if i were to add any new option for "per user" (lets assume for example called "my_field"), i would first add an extra filed under "user" table named "my_field" (via phpmyadmin for example), then would use for var name 'user[my_field]' for example: place line like: PHP Code: in addition don't forget to add code that saves it using vbulletin engine: just add line like: PHP Code: that's it for this tutorial - hope you find it usefull enough for those who need quick start quide into admincp functions :classic: Regards, Idan. * Support will only be given via forums ! * If this post solved/aided your problem, please click "mark as aid" / "mark as solution" as explained in here Last edited by Idan; 09-03-2006 at 01:48 PM. | |||||||||
|
| | #2 |
| |
Status: Offline Thanks for making a tutorial this will make other peoples lives eaiser. |
|
| | #3 |
| |
Status: Offline thanks nice work |
|
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [How To] set usernames in color/bold/italic | GirlsOnTop | vBulletin Modification Tutorials | 19 | 11-28-2009 05:35 PM |
| [How to] Set User Titles | Rex | vBulletin Modification Tutorials | 24 | 11-20-2007 08:25 PM |
| [How to] Add navigation groups to your admincp left panel | Ken Iovino | vBulletin Modification Tutorials | 11 | 07-16-2007 02:59 AM |
| [How to] submit a press release | Rex | Growing Your vB Forum | 1 | 06-19-2006 06:36 PM |
All times are GMT. The time now is 05:18 AM.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.






























