On 17/05/07, Mike <xclbur5150(a)yahoo.com> wrote:
Is it possible to change the file uploads section to
include a few more custom fields, and to automatically create a link to the uploaded file
on a specified page (hopefully selected by the user in one of the Custom fields)
Anything is possible.
With regards to actually editing the form, the upload form itself is
Special:Upload, and the code for it can be found in
includes/SpecialUpload.php. There's a couple of functions in there
responsible for generating the actual form that users see; add HTML
form fields there as standard.
With regards to it doing something, that depends. If the "custom
fields" are going to be preserved, then you'll want to think about
exactly how that's to be done in the database; new table, or
additional columns to the image tables (which our updaters might not
know about, etc.). You would then want to hack a few classes (Image,
in particular, although watch out for conflicts when that becomes File
in the next version) to make sure the stuff gets saved and loaded as
expected.
A custom field that merely alters the upload process is obviously a
lot easier, because you'll only need to check it within the upload
form handler's logic, and things become a lot easier to maintain hacks
for using patches once that's in place.
Rob Church