Textpattern CMS support forum
- From: vancouver
- Registered: 2004-02-24
- Posts: 1,067
I can’t find any mention of the new Vendors Folders that is now part of the latest download of TEXTPATTERN 4.6.2
what is it all about?
…. texted postive
- From: Leeds, UK
- Registered: 2006-01-29
- Posts: 7,712
Re: Vendors Folder
It’s a place for PHP classes to live and be autoloaded. So instead of having a tonne of
include commands at the top of each major file, or introducing more global functions, we’re migrating our code there.
Along with third party libraries (like Textile from Netcarver, and jquery) Textpattern itself is a ‘vendor’ where we put our own library code, separated into folders by its functionality.
If you take a look through some of our functions in files such as
txplib_misc.php, you’ll see that many of them are deprecated or have only one line in them now: a call to
Longer term I suspect most of our code will move there — even Admin panel code because we can make a base ‘admin panel’ class and then extend it to make specific instances such as ‘admin side table’ type panels or ‘admin side grid’ panels, etc and benefit from code reuse. As it stands, there’s a lot of duplication in the panels that we could design out.