(Added:6 Deleted:2 Modified:33, 119KB)
Revision: 1006
Author: arantor
Date: 13:41:10, 18 September 2011
Message:
+ First usable build of the add-on manager. This has many related changes:+ Actually add the folder. Includes a default htaccess file to block archives from being downloaded from there but potentially all other files might be. (Addons/*)
+ Add the add-on manager. (ManageAddons.*, replacing switch_on.png and switch_off.png with smaller sized images)
! create_table can now add columns and indexes (but not unique or primary indexes) if the table already exists when passed to this function. It also has rudimentary support for new datatypes, namely the floating types (float, real, double) and SET and ENUM, but this isn't properly tested and is likely buggy. (Class-DBPackages.php)
! Attempt to detect if an add-on caused an error and set the error type accordingly. (Doesn't bother to attempt to change the label to just the mod's name or similar, just attempts to locate and update for now) (Errors.php)
! Menu changes for the add-on manager. Some of this is temporary code and it leaves the old package manager available for testing with a naughty non-language-string entry. As Wedge's add-on manager matures this won't be a problem. (Admin.php, Admin.english.php, PackageGet.php, Packages.php, index language file)
! Added a setting for setting the path and URL to the Addons area. (Settings.php, install.php, ManageServer.php, Admin language file)
! Removed Modifications language file (Modifications language file, index.php, SSI.php, Load.php)
! On startup, identify the add-ons currently enabled and add their hooks into the current process' stack, as well as making sure we have the paths and URLs to these for later. (Load.php)
! Language editor can now load the language strings of add-ons and access them directly, much as SD 2.0 does. (ManageServer.php, Admin.template.php)
! New hook loader purely for language files (Subs.php)
! New hooks. (Profile-View.php, Subs-BBC.php, Subs-BoardIndex.php, Who.php (lang only), SSI.php, index.php)
! Make sure that hooked files in loaders are loaded correctly. (Profile.php, ScheduledTasks.php, Subs-Template.php, Subs.php)
! Provide facilities for add-ons to declare CSS and JS to be cached through the caching subsystem. (Subs-Cache.php)
! If icons in menu items are full URLs, don't touch them, useful for add-ons. (Subs-Menu.php)
@ This isn't even complete, there are multiple known items still to do:
- The DB changer in the add-on area cannot add columns to existing non-add-on tables (e.g. new column in members table), nor can it add indexes. Also needs more testing anyway.
- The DB changer also does not run any enable-time scripts (nor disable-time scripts, for that matter)
- There's no ability to upload new add-ons, nor any ability to remove any existing ones (including clean-up)
- Dependency management isn't accounted for either.
- The exact process for updating a given add-on is also to be figured out and implemented. I'm thinking it would actually be a process of unpacking the new one into a new folder, disabling the old one, enabling the new one if possible, then removing the old one. Proper in-place updating is a road to madness.
- File edits need to be accounted for.
- Oh, and permission handling both in terms of permissions being required to enable an add-on (e.g. 'this add-on makes file edits, proceed?') and for when file edits are used, permissions on files, preferably ones that won't screw up a lot of servers.
----
Added : /trunk/Addons
Added : /trunk/Addons/.htaccess
Added : /trunk/Addons/index.php
Modified : /trunk/SSI.php
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/Class-DBPackages.php
Modified : /trunk/Sources/Errors.php
Modified : /trunk/Sources/Load.php
Added : /trunk/Sources/ManageAddons.php
Modified : /trunk/Sources/ManageServer.php
Modified : /trunk/Sources/PackageGet.php
Modified : /trunk/Sources/Packages.php
Modified : /trunk/Sources/Profile-View.php
Modified : /trunk/Sources/Profile.php
Modified : /trunk/Sources/ScheduledTasks.php
Modified : /trunk/Sources/Subs-BBC.php
Modified : /trunk/Sources/Subs-BoardIndex.php
Modified : /trunk/Sources/Subs-Cache.php
Modified : /trunk/Sources/Subs-Menu.php
Modified : /trunk/Sources/Subs-Template.php
Modified : /trunk/Sources/Subs.php
Modified : /trunk/Sources/Who.php
Modified : /trunk/Themes/default/Admin.template.php
Added : /trunk/Themes/default/ManageAddons.template.php
Modified : /trunk/Themes/default/images/admin/switch_off.png
Modified : /trunk/Themes/default/images/admin/switch_on.png
Modified : /trunk/Themes/default/languages/Admin.english.php
Added : /trunk/Themes/default/languages/ManageAddons.english.php
Modified : /trunk/Themes/default/languages/ManageMedia.english.php
Deleted : /trunk/Themes/default/languages/Modifications.english.php
Deleted : /trunk/Themes/default/languages/Modifications.french.php
Modified : /trunk/Themes/default/languages/index.english.php
Modified : /trunk/Themes/default/languages/index.french.php
Modified : /trunk/Themes/default/skins/admin.css
Modified : /trunk/index.php
Modified : /trunk/other/Settings.php
Modified : /trunk/other/Settings_bak.php
Modified : /trunk/other/install.php
Modified : /trunk/other/install.sql
Modified : /trunk/other/tools/wedge_api.php
Modified : /trunk/other/xml/detailed-version.php
Posted: September 18th, 2011, 02:43 PM
Forgot to add that there's also the loadAddon functions in Load.php now that are used for loading add-on source, template and language files as needed.
Posted: September 18th, 2011, 02:43 PM
Oh, and also note that the create_table version here also fixes an SMF bug whereby the default value of a column isn't determined correctly for a pre-existing table.