Currently Textpattern has a 'image_data' function which offers some uploading
functionality, but it could be take some work, not much, but some slight
adjustments.
One of the issues with the function is that it's located inside an
admin-interface file. Which requires that you include the file before you can
even start using the function. That wouldn't be that big of issue if that was
all, and the file wasn't what it is, but the file requires that it is imported
to a global scope, which for plugins, is impossible. Having to define globals
before including is everything else than fine.
Changes would include:
- Making 'IMPATH' constant accessible globally (e.g. moving it to
/textpattern/index.php and publish.php).
- Moving 'image_data' to library file (e.g. txplib_misc.php)
- Potentially adding some slight improvements and additions to 'image_data' too
Original issue reported on code.google.com by jukka.m.svahn on 8 Nov 2012 at 10:09
Original issue reported on code.google.com by
jukka.m.svahn
on 8 Nov 2012 at 10:09