vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Using the same $vbulletin->options across multiple products (https://vborg.vbsupport.ru/showthread.php?t=283802)

DetroitYES 06-01-2012 04:09 PM

Using the same $vbulletin->options across multiple products
 
So, I have two products, each of which offer to make a call to bit.ly to shorten a url before tweeting to a twitter account.

For me, it would be most sensible if I could utilize the same vbulletin option in both products, rather than having to enter the same api keys twice for each.

I've noticed that $vbulletin->options seem to be independent of any product aside from existing in the products installation xml file.

Is it valid/ would there be a problem with having the code to create the same option across multiple products? -- this is assuming that they were listed under the same setting group, and same var name in each xml file for the two products?

What I'm trying to move towards is a central framework for all of my products to simplify managment.

So in abstract, lets say i have product A: atdasd & B: atdsbr and I would like to combine their common elements under the prefix atdatd...

Thanks.

Boofo 06-01-2012 04:40 PM

You could do it if you just require the mod that has the option for the second mod.

cellarius 06-01-2012 04:53 PM

If the option already exists, it will simply be ignored on install.

DetroitYES 06-01-2012 04:55 PM

Quote:

Originally Posted by cellarius (Post 2335505)
If the option already exists, it will simply be ignored on install.

Thank you, that is what I assumed but wanted to confirm.

Adrian Schneider 06-01-2012 04:55 PM

Build a product for each unique functionality that you can isolate. Make your own products dependent on it (literally add it as a dependency).

cellarius, are duplicates ignored or removed when you uninstall one of them?

cellarius 06-01-2012 05:44 PM

I'd have to check, but they would probably be uninstalled. That's a catch, indeed. YouÄre suggestion with seperate products per function is likely the way to go.

DetroitYES 06-01-2012 07:11 PM

Quote:

are duplicates ignored or removed when you uninstall one of them?.
oh, man good point...


All times are GMT. The time now is 09:58 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.01046 seconds
  • Memory Usage 1,720KB
  • 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
  • (2)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