Last modified: 2012-08-14 12:02:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T10867, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8867 - Hook to alter upload form
Hook to alter upload form
Status: RESOLVED DUPLICATE of bug 7161
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-03 18:20 UTC by Invalid Account
Modified: 2012-08-14 12:02 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
here is the change (39.42 KB, application/octet-stream)
2007-02-03 19:22 UTC, Invalid Account
Details

Description Invalid Account 2007-02-03 18:20:05 UTC
You know how there are
--------------
	public $editFormPageTop; // Before even the preview
	public $editFormTextTop;
	public $editFormTextAfterWarn;
	public $editFormTextAfterTools;
	public $editFormTextBottom;
-----------

In EditPage.php

Well it would be nice if SpecialUpload.php had something where the hook "UploadForm:initial" had a place 
or two it could add something that is inside the <form> and </form> rather than outside it as it 
currently is--it currently is at the top.

Basically you'd have "public $uploadFormTextInsideForm;" at the top for however many there are

Then in "function mainUploadForm", probably right before "$wgOut->addHtml", it'd be something like if 
($editFormTextPlaceOne != "") { $wgOut->addHTML( $uploadFormTextInsideForm);}

And that's pretty much it. I am marking this easy because I have given all the code here.
Comment 1 Invalid Account 2007-02-03 19:15:14 UTC
Ah I found this $uploadFormTextAfterSummary to put it in, but it's still a bad place and kind of 
messes the form up. Right before the last $wgOut->addHtml is better.
Comment 2 Invalid Account 2007-02-03 19:22:58 UTC
Created attachment 3176 [details]
here is the change
Comment 3 Invalid Account 2007-02-03 19:24:06 UTC
Okay I finished it and it's in the attachment. I'm not a MediaWiki developer, so hopefully one will 
see it and add it.

It is a tiny modification to 1.9.1
Comment 4 Christian Neubauer 2008-02-06 20:48:09 UTC
I think you are saying $uploadFormTextAfterSummary won't work, because it's in the same table cell as the upload description <textarea> and adding stuff there messes up the table.  You should still be able to use it though.  Just make sure you close the <td> and the <tr> before you add your content and leave them off the end of your added content.  For example, in your extension you could do:

$form->uploadFormTextAfterSummary .= "
  </td>
</tr>
<tr>
  <td align='right'><label for='wpUploadCategory'>Category:</label></td>
  <td align='left'>
    <input tabindex='4' type='text' name='wpUploadCategory' id='wpUploadCategory' size='40' value=\"\" />
Comment 5 Chad H. 2009-06-10 17:26:32 UTC
CCing Michael Dale on this. Is this something that can be integrated to the new-upload branch and then merged to trunk?
Comment 6 Michael Dale 2009-06-12 02:03:06 UTC
hmm... I think its fine... but you have to send me a diff since my SpecialUpload.php is pretty different from the turnk you can generate a patch against new-upload branch ( /branches/new-upload/phase3 ) I will plop it in there. 
Comment 7 Chad H. 2009-07-23 02:52:19 UTC

*** This bug has been marked as a duplicate of bug 7161 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links