Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 11-22-2008, 03:31 PM
Bilderback's Avatar
Bilderback Bilderback is offline
 
Join Date: Sep 2007
Location: Illinois
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Plugins VS Files for Addons

What is the best way to build an addon for vBulletin?
I notice differences in the creation of products...
some use all plugins...
some use files (bitfields, xml, php)...

examples: Adding admincp options
Plugin way
Hook the useradmin edit to use print_table and other options
Bitfield way
Create the bitfield xml for options
File way
Add the code to an admin php file

Is one way better than the other?

Thanks
Reply With Quote
  #2  
Old 11-23-2008, 02:38 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WHat you use depends on teh task at hand. What kind of Admin CP options are we talking about? If it's categories under "vBulletin Options", you can add those freely by enabling Debug Mode.
Reply With Quote
  #3  
Old 11-23-2008, 10:07 PM
Bilderback's Avatar
Bilderback Bilderback is offline
 
Join Date: Sep 2007
Location: Illinois
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am beginning to create products for vbulletin and just generalizing options.
Example: display some settings in the admincp for a mod-
1.-bitfield_myproduct.xml
2.-plugin (use print and admin hook)
3.-file (use print in custom admin file)

Or will it really depend on the nature of the mod and its script size?
Reply With Quote
  #4  
Old 11-24-2008, 03:25 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Again - display what settings and where?
Reply With Quote
  #5  
Old 11-24-2008, 05:13 AM
Bilderback's Avatar
Bilderback Bilderback is offline
 
Join Date: Sep 2007
Location: Illinois
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bilderback View Post
I am beginning to create products for vbulletin and just generalizing options.
Example: display some settings in the admincp for a mod-
1.-bitfield_myproduct.xml
2.-plugin (use print and admin hook)
3.-file (use print in custom admin file)

Or will it really depend on the nature of the mod and its script size?
A setting - Any setting
Enable Product
1.-using bitfields
Code:
<group name="myproduct">
	<bitfield name="myproduct_enable">1</bitfield>
</group>
2.-using plugins
useradmin_edit_column1
Code:
print_table_break('', $INNERTABLEWIDTH);
print_table_header('My Product');
print_yes_no_row('Enable My Product', 'myproduct[enable]', $myproduct['enable']);
3.-using files
Code:
if ($_REQUEST['do'] == 'modify')
{
print_cp_header();
print_form_header('My Product Header', 'modify');
print_table_header(Enable My Product'], 1);
print_textarea_row('Enable My Product?', 'myproduct_enable');
print_submit_row("Submit!");
print_cp_footer();
}
Just trying to find the best ways to build addon scripts.
Reply With Quote
  #6  
Old 11-24-2008, 08:32 AM
ReCom ReCom is offline
 
Join Date: Mar 2008
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually there is an element tagged "options" in your product xml where you can define all these settings and have the built-in vBulletin Options section to take care all the displays, submissions and validations of your settings. Like Dismounted mentioned above, if you enable the Debug mode you can add these settings directly under vBulletin Options and later export them together with your product xml.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:17 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
  • Page Generation 0.03551 seconds
  • Memory Usage 2,205KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete