Last modified: 2010-03-11 20:08:45 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 T23404, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21404 - Additional mode for specifying page name using formlink with one-step process
Additional mode for specifying page name using formlink with one-step process
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-04 04:05 UTC by Joel Natividad
Modified: 2010-03-11 20:08 UTC (History)
1 user (show)

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


Attachments
Small patch to enable additional formlink mode (720 bytes, application/octet-stream)
2009-11-04 04:05 UTC, Joel Natividad
Details

Description Joel Natividad 2009-11-04 04:05:22 UTC
Created attachment 6749 [details]
Small patch to enable additional formlink mode

Yaron,
On a project I'm working on, the page name of a page created with a form is set to a concatenation of the Current User and the Current date stamp.

I couldn't figure out a way to do this with formlink, so I created this small patch.

Basically, if the formlink query string begins with a slash (/), the query string is treated as the page name.

This allowed me to do something like:

{{#formlink:DK_Report_Compilation|Create DK Report Compilation|button|/{{CURRENTUSER}}-{{#time: Y m d H:i:s}}}}

This resulted in Special:AddData being invoked in the mode Special:AddData/FORM_NAME/TARGET_NAME and gave me the flexibility to use magic words in specifying the target page name.

Unless there is a better way to do what I'm trying to do using the existing code, hope you find this useful.

Thanks,
Joel
Comment 1 Yaron Koren 2010-03-11 20:08:45 UTC
Setting to "FIXED" - this is now possible, in a different way, now that the "page name=" is parsed by MW in version 1.9. It means that you can use variables like {{CURRENTUSER}} directly within the "page name" value.

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


Navigation
Links