Log in

View Full Version : detectiing installed plugins and products.


Code Monkey
03-11-2006, 02:13 AM
Is there a built in vb function to detect if a specific plugin or product is installed?

Adrian Schneider
03-11-2006, 02:19 AM
Not that I know of, though all you would need to do is a simple query to check if something exists.

Code Monkey
03-11-2006, 04:53 AM
Ah, look what I found. :D


$products = fetch_product_list();

Marco van Herwaarden
03-11-2006, 06:47 AM
All loaded (ie. installed & Active) plugins are in the $vbulletin object. Think $vbulletin->product(s) or $vbulletin->plugin(s).

Too lazy to go check now which one

Edit: it is $vbulletin->products['product_id']

Code Monkey
03-11-2006, 12:53 PM
That's even better since I will know the product id. Thanks

Of course, if it's turned off...

Trigunflame
03-11-2006, 01:03 PM
That's even better since I will know the product id. Thanks

Of course, if it's turned off...

isset() is your friend ;)

Marco van Herwaarden
03-11-2006, 03:15 PM
I think that it will not be in the array if it is turned off (if you look at it from a functional POV, then turned off is the same as not installed).

But i already suggested sometime ago at vb.com, to always include in the array, but add a flag if it is active or not.

Code Monkey
03-11-2006, 03:42 PM
They could just do it this way.


$vbulletin->products['on']['product_id']

$vbulletin->products['off']['product_id']