Last modified: 2014-09-17 02:01:17 UTC
If namespaces were allowed as sub-categorization of images, a large number of features could be enabled through extensions and other customization, including: * Namespace protection on images * Categorization, sorting, search by namespace (and category) of images * Tree-structuring of images (eg, sub-directory type listings using NS and designated categories) The proposed mechanism would be two-fold: # Allow namespace in image link (eg., Image:[ns]:[Image Name]) # Include namespace in file hash (eg., [ns]/[category]/[hash]/file.img This functionality can be implemented by patching 4 files and is completely reverse compatible with previoius versions. Additionally, the proposed patches require this functionality to be enabled (disabled by default), and poses almost no overhead when not used. It provides a platform for much needed image categorization, including enhanced listing and segregation with very little cost. Modifications: SpecialUpload.php - modify to allow uploading of image using [ns]:[Image Name] format, assign to ns, and save in [ns]/[category]/[hash]/file.img hashed format Image.php - parse ns/category in image reference (if exists) ImageFunctions.php - parse ns/category in image reference (if exists) Title.php - needs two set property functions Optional: img_auth.php - enhance to use enhanced hashing or (preferable), new img_authNS.php which does same with NS protection checking (old img_auth would still work, just wouldn't have overhead/functionality of NS checking).
Created attachment 3624 [details] Contains required patch files (in diff formats) and actual files Contains the diff files necessary to complete
Created attachment 3625 [details] Patches required to SpecialUpload
Created attachment 3626 [details] Image.php patches Patches required for image.php
Created attachment 3627 [details] ImageFunctions.php patches
Created attachment 3628 [details] Title.php Patches required for Title
Created attachment 3630 [details] img_auth.php patch - not recommended, pref new img_authNS.php
Created attachment 3631 [details] img_authNS.php alternative to img_auth.php alternative
TimStarling is updating the file repository handling process, will include ability to do this via extension versus patching - highly desireable. Included patches with this bug can be applied against 1.10. TimStarling: after image changes, I think you might be able to implement this as a plug-in repository, well, plus any UI changes, but I don't think you'll have to make backend patches. The way it works is that you specify a repository class to be used as the local repository
Diffs should normally be placed in one file so they can be read and applied more easily.
Created attachment 3632 [details] SpecialUpload.php Patches - corrected Had typo in orignal patch - accidently uploaded wrong version
Created attachment 3633 [details] All patches in a single diff file - as per simetrical Includes patches to img_auth.php - not preferred, should use img_authNS.php as alternative.
Created attachment 3636 [details] Contains required patch files (in diff formats) and actual files Fixed bug in non-namespace typo
Created attachment 3637 [details] All patches in a single diff file - as per simetrical Fixed minor bug in non-namespace typos
This seems too hierarchical and hard-wired, the opposite of the sort of categorization and tagging we like to see on a wiki. I don't see it as being very useful.
Was able to use TimStarling's FileRepo system to create a new local Repo - NSFileRepo. As of 1.16.0, will require no patches to implement. Minor patching reqiured for versions 1.13.0 through 1.15.1