The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
vbExtension utilities or class (Poll)
Something that has been on my mind for some time is the notion of a community-supported set of utilities for writing vBulletin extensions/hacks. vBulletin itself is not designed with extensibility in mind.
The two most compelling reasons for such a set of utilities would be:
|
#2
|
|||
|
|||
take a close look at the /includes/ directory, and you will have everything you need to suite your needs. all these files are like the default API classes for your needs. each file have the specific functions to answer specific needs in code integration.
no need of more extensions... 2¢CA == 1¢US... but btw, it's a cent EDIT... btw, discussing the code structure of vB would have more values on vBulletin.com than here... we already code new things because we need more features, having them implemented in vB means you discuss with the coders of it, at vBulletin.com ! |
#3
|
|||
|
|||
Quote:
I have perused most of the code in include files, and have used a good deal of the common routines. While they offer decent functionality, they clearly do not provide many of the common requirements of writing an extension. If they did, we would not have to post lines of code everytime someone asks "How to I get a proper navbar?" or "How to I generate a list of forums that are accessible?", etc. Cheers |
#4
|
|||
|
|||
sure, but i was talking about integrating to vB... if you want to develop a setup class, no problem, i will be one of the first to try it... i'm doing so myself, as i'm developping external tools and each time, i build the complete list of functions to be independant from vB, so i don't have to upgrade each time vB upgrade..
|
#5
|
||||
|
||||
> "How to I get a proper navbar?"
$navbits = array('put smth. useful here'); $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); I don't think this could be done much easier ... ? |
#6
|
|||
|
|||
Quote:
It is difficult for me to understand why folks would want to hand-code something like permission checking or the pagenav stuff. In the end, all it does is lead to extensions being posted without the proper functionality. The sorts of calls one would make might look like this: PHP Code:
|
#7
|
|||
|
|||
Quote:
PHP Code:
Or to generate a navbar two-levels deep: PHP Code:
|
#8
|
|||
|
|||
hum.. looks like i see where is your point... you would like to have parts of vB to become OOP... i don't think it's planned... OOP is not even recognised at php.net, even in PHP5...
your leveled navbar example is not concise...: PHP Code:
|
#9
|
|||
|
|||
Quote:
As for my navbar call, it would work fine. In the initial call we were supplied the page title and the page URL. We save three pieces of information in globals: 1) The file name, saved in say $EXT_filename. E.g., foo.php 2) The URL, in say $EXT_url. E.g., ./foo.php 3) The page title, in say $pagetitle. A call to generate a two-level navbar then only requires the page title of the sub-page. Hence, the call: PHP Code:
PHP Code:
|
#10
|
|||
|
|||
any way to create such function would mean to create documentation for each function anyway... so why not simply build documentation on what already exists on vB?!...
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|