Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[How-To] Product Managament (vBulletin 3.5 RC 1 and up)
Andreas's Avatar
Andreas
Join Date: Jan 2004
Posts: 6,863

 

Germany
Show Printable Version Email this Page Subscription
Andreas Andreas is offline 07-25-2005, 10:00 PM

This How-To is mainly meant for Hack-Developers, if you are only planning to use Hacks just read the End-User section.

Developers
vBulletin 3.5.0 RC1 introduces a new concept for customizing/modifying vBulletin: Products.
With Products, you can manage Plugins, Phrases, Settings and Templates in just one XML File.
Furthermore it supports Install/Uninstall Codes (for running queries, etc.), it also covers updating existing Hacks as you can add Codes for different Versions.

To start, you first have to turn on debug mode:
Put
PHP Code:
$config['Misc']['debug'] = true
in config.php.

Then go to ACP / Plugin System / Manage Products.
Click Add/Import Product.
In the second Form (Add New Product) fill in the Details for your Hack:
  • Product ID should be a unique ID for you Hack; it must not start with vb and should be lowercase only, not contain spaces or other special characters.
    Attention: The Product ID must not be longer then 15 characters.
  • Title should be the Title for your Hack
  • Version should be the Version.
    The Format shoud be Mainversion Subversion Subrelease
    Example: Myhack 1.0.0 Beta 1
  • Description should be a short description for you Hack, eg. what it does.

Afterwards, create all the Plugins, Phrases, Templates and Settings your Hack requires and make sure you select the Product you just created.
Important: Templates must be placed in the MASTER Style, Phrases in the MASTER Language

When you are finished, go to ACP / Plugin System / Manage Products and select Edit from the Dropdown next to your Product.

In the Form (Add New Install/Uninstall Code) add all Code necessary to install/uninstall your Hack (eg, Queries, etc.).
If you are updating an existing Hack, add new Install/Uninstall Codes for the new Version that just make the changes necessary to upgrade the previous Version; Product Management will make sure that all necessary Codes will be run.

If your Hack includes Usergroup Permissions/Bitfields, add the following Code to Install and Uninstall to rebuild the Bitfield cache:

PHP Code:
if (is_newer_version('3.5.1'$vbulletin->options['templateversion']))
{
    
// Rebuild Bitfields
    // Do this for vBulletin < 3.5.1 *ONLY*; later versions rebuild
    // automatically and calling the builder in install code causes
    // the bitfields NOT to be rebuild correctly
    
require_once(DIR '/includes/class_bitfield_builder.php');
    
vB_Bitfield_Builder::save($db);
    
build_forum_permissions();

When everything is done, go to ACP / Plugin System / Manage Products again and export the Product as XML; this will then include all Plugins, Templates, Phrases, Settings and Install/Uninstall Codes required.

End-Users
Go to ACP / Plugin System / Manage Products.
Click Add/Import Product, select the product XML File for the Hack you want to install.
If you are upgrading an existing Hack, make sure that Allow Overwrite is set to Yes

This How-To is (C) 2005 by KirbyDE and you are not allowed to redistribute it in any way without my explicit consent.
Reply With Quote
  #22  
Old 07-29-2005, 04:49 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now all we need is the ability for this to upload new files (extensions) edit templates & edit files. Then it will be a complete installation system.
Reply With Quote
  #23  
Old 07-29-2005, 08:17 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MrNase
Custom vBulletin settings must be added with a query? Or is there a function available with adds them without using a query?
Assign them to your Product, then Product Management will take care of Installing/Uninstalling
Reply With Quote
  #24  
Old 07-29-2005, 08:18 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Now all we need is the ability for this to upload new files (extensions) edit templates & edit files. Then it will be a complete installation system.
I for one wouldn't like that. Especially editing Templates can be tricky, as you never know for sure how they will loke like.
Reply With Quote
  #25  
Old 07-29-2005, 08:46 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
I for one wouldn't like that. Especially editing Templates can be tricky, as you never know for sure how they will loke like.
Editing templates should be the users task only. Due to style customizations. But uploading files from the admincp would complete this!
Reply With Quote
  #26  
Old 07-29-2005, 10:39 AM
MrNase MrNase is offline
 
Join Date: May 2003
Location: Germany
Posts: 670
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
Assign them to your Product, then Product Management will take care of Installing/Uninstalling
That must be done in the debug mode? Because all other things can be done without it..
Reply With Quote
  #27  
Old 07-29-2005, 10:50 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Templates, Phrases, Settings and Plugins must be created in Debug Mode - as stated in the first Post.
Reply With Quote
  #28  
Old 07-29-2005, 11:44 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Now all we need is the ability for this to upload new files (extensions) edit templates & edit files. Then it will be a complete installation system.
I agree. And add a file editor to that, and you have everything. Better yet, have ALL of the code in XML format. No more file edits... ever.
Reply With Quote
  #29  
Old 07-29-2005, 11:46 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have to disagree. File and especially Template Edits should stay a User task, as they can be quite complicated keeping customized Styles and different Versions in mind.
Reply With Quote
  #30  
Old 07-29-2005, 04:07 PM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Kirby, you should write books for vbulletin.
Reply With Quote
  #31  
Old 08-01-2005, 11:43 AM
Dream's Avatar
Dream Dream is offline
 
Join Date: Oct 2001
Posts: 2,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can I use version numbers like 1.0 or 1.9.5
Reply With Quote
Reply


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 06:27 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05095 seconds
  • Memory Usage 2,317KB
  • Queries Executed 26 (?)
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
  • (2)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete