Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2008-05-20 16:24:59

elbekko
Former Developer
From: Leuven, Belgium
Registered: 2008-04-30
Posts: 1,131
Website

Make $forum_extensions array

Well, since you can disable extensions the extension author should be able to disable any external files used by the extension too. A good solution for this would be to define an array containing the IDs and version numbers of the enabled arrays.

This could also be handy for installed extensions checking for the installed version of another extension (like for example an alternate userlist checking if coloured usergroups exists).


Ben
SVN repository for my extensions - The thread
Quickmarks 0.5
“Question: How does a large software project get to be one year late? Answer: One day at a time!” - Fred Brooks

Offline

#2 2008-05-20 16:30:26

Vovochka
Member
From: Ukraine
Registered: 2008-05-10
Posts: 165
Website

Re: Make $forum_extensions array

You should look here
http://fluxbb.org/forums/topic/425/dependencies/

Upd: or just get everything you would like to know from the database

Last edited by Vovochka (2008-05-20 16:32:16)

Offline

#3 2008-05-20 16:30:48

elbekko
Former Developer
From: Leuven, Belgium
Registered: 2008-04-30
Posts: 1,131
Website

Re: Make $forum_extensions array

That's something entirely different.


Ben
SVN repository for my extensions - The thread
Quickmarks 0.5
“Question: How does a large software project get to be one year late? Answer: One day at a time!” - Fred Brooks

Offline

#4 2008-05-20 16:47:00

Smartys
Former Developer
Registered: 2008-04-27
Posts: 3,117
Website

Re: Make $forum_extensions array

Not a bad idea, although I think some helper functions might be a better solution (eg: extension_info($ext_id) that queries the database and returns the information if it's installed)

Offline

#5 2008-05-20 17:41:15

StevenBullen
Member
Registered: 2008-05-03
Posts: 256
Website

Re: Make $forum_extensions array

I like the sound of this one. big_smile

Offline

#6 2008-05-21 01:02:54

damaxxed
Member
From: Germany
Registered: 2008-05-16
Posts: 353

Re: Make $forum_extensions array

What about the following extension snippet?

<hook id="co_common">define('EXAMPLE_EXTENSION_ACTIVE', true);</hook>

With this constant, you can easily check whether the extension is active&installed or not

Offline

#7 2008-05-21 11:25:41

Smartys
Former Developer
Registered: 2008-04-27
Posts: 3,117
Website

Re: Make $forum_extensions array

Except that would require each extension to follow the rule of defining its own constant: fetching from the database provides more information and means we don't have to enforce that (either by mandating that or by doing it ourselves).

Offline

#8 2008-05-21 12:04:33

damaxxed
Member
From: Germany
Registered: 2008-05-16
Posts: 353

Re: Make $forum_extensions array

Why fetch additional data from the DB when the developers can provide themselves with the information?

Ok, it only works for their own extensions.. that's a point

Offline

Board footer

Powered by FluxBB 1.4.8