https://bugzilla.wikimedia.org/show_bug.cgi?id=21404

           Summary: Additional mode for specifying page name using formlink
                    with one-step process
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: SemanticForms
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Created an attachment (id=6749)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6749)
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


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to