vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Community Lounge (https://vborg.vbsupport.ru/forumdisplay.php?f=13)
-   -   A question for vB Coders (https://vborg.vbsupport.ru/showthread.php?t=266753)

Plugin Pete 07-13-2011 05:56 PM

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

BirdOPrey5 07-13-2011 07:17 PM

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.

Zachery 07-13-2011 07:24 PM

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.

Plugin Pete 07-13-2011 07:40 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2220168)
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 (Post 2220170)
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.

BirdOPrey5 07-13-2011 07:48 PM

Quote:

Originally Posted by Plugin Pete (Post 2220179)
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.

Adrian Schneider 07-13-2011 07:49 PM

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.

Plugin Pete 07-13-2011 08:13 PM

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


All times are GMT. The time now is 11:50 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.01316 seconds
  • Memory Usage 1,726KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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