Go Back   vb.org Archive > Community Central > Community Lounge
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-13-2011, 05:56 PM
Plugin Pete Plugin Pete is offline
 
Join Date: Jul 2011
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default A question for vB Coders

Hi All,

After 10 years using vBulletin and building forums I finally decided to get off of my rear, get involved, and start building mods and add-ons. Sometime this week I hope to release my first vB add-on to beta. To that end I have a question.

What are some of the best practices to follow when releasing a vB add-on?

Thanks in advance!

Pete
Reply With Quote
  #2  
Old 07-13-2011, 07:17 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would say-

Mark something you haven't tested for long as Beta

Include good documentation in a text file on how to use it

Include an option to disable the mod in the mod options. It should truly disable just about all code by putting everything in a conditional that only runs if enabled.

Whenever possible use one of the built-in error checks for each input field.

I like to have mods inside a folder, the folder inside a zip file, so I can just drag the folder out of the zip file after I've downloaded it.
Reply With Quote
  #3  
Old 07-13-2011, 07:24 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Always use a custon naming scheme for your fields/tables in the database.

So you've made the best gallery mode ever? Don't call the table gallery, what if vBulletin adds a stock gallery feature? The user wont be able to upgrade.
What if you want to add a thread count to the user table? Dont call it threadcount or threads.

When we (GeekyDesigns) to stuff, we almost always try to use gd_name that way we shouldn't normally run into conflicts with name spaces.
Reply With Quote
  #4  
Old 07-13-2011, 07:40 PM
Plugin Pete Plugin Pete is offline
 
Join Date: Jul 2011
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
I like to have mods inside a folder, the folder inside a zip file, so I can just drag the folder out of the zip file after I've downloaded it.
Joe,

Thanks for your feedback and insight. Based on your last comment, I'm wondering if I made a mistake.

The add-on I'm about to release to beta is on the large side. It has a folder structure for the add-on to house class files, css files, images, cache files, etc. The primary php file itself resides in the forum root. Is that a no-no?

Thanks!

--------------- Added [DATE]1310589806[/DATE] at [TIME]1310589806[/TIME] ---------------

Quote:
Originally Posted by Zachery View Post
Always use a custon naming scheme for your fields/tables in the database.

So you've made the best gallery mode ever? Don't call the table gallery, what if vBulletin adds a stock gallery feature? The user wont be able to upgrade.
What if you want to add a thread count to the user table? Dont call it threadcount or threads.

When we (GeekyDesigns) to stuff, we almost always try to use gd_name that way we shouldn't normally run into conflicts with name spaces.
Thanks, Zachery. I did my best to try to avoid naming conflicts on all levels. I even did a fairly exhaustive search to make sure my main php file name has not been used by another add-on.

Cheers, and thanks for the input.
Reply With Quote
  #5  
Old 07-13-2011, 07:48 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Plugin Pete View Post
Joe,

Thanks for your feedback and insight. Based on your last comment, I'm wondering if I made a mistake.

The add-on I'm about to release to beta is on the large side. It has a folder structure for the add-on to house class files, css files, images, cache files, etc. The primary php file itself resides in the forum root. Is that a no-no?

Thanks!
You can definitely put your main php file in the forum root. I'm not talking about after the files have been uploaded, I'm talking about when they are downloaded.

I prefer a structure like

ZIP File -> Name of Mod Folder -> UPLOAD -> All files and folders to upload relative to forum root
ZIP File -> Name of Mod Folder -> All XML and TXT files

It's not a requirement just my preference. Check out any of my mods if you want to see what I mean.
Reply With Quote
  #6  
Old 07-13-2011, 07:49 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anything inside the forum directory should be placed inside an 'upload' directory. That is pretty standard practice.

Other than that, I'm obviously a huge advocate of VDE to help organize in preparing that package and keeping updates consistent.
Reply With Quote
  #7  
Old 07-13-2011, 08:13 PM
Plugin Pete Plugin Pete is offline
 
Join Date: Jul 2011
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, got it. Thanks, guys. Yes, I do have everything organized under an 'upload' folder.

Adrian, I started playing w/ VDE a while ago and love it. I will use it for all future releases.

Pete
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 09:04 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.03601 seconds
  • Memory Usage 2,215KB
  • Queries Executed 11 (?)
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_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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