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

--- Comment #6 from [email protected] 2011-11-14 21:30:39 UTC ---
Below is a copy and paste of an image form. 

You can see the form in action here for a fresh file upload (login: Demo/test):

http://www.coincompendium.com/wiki/index.php/Special:FormEdit/Image?&Image[uploadoredit]=upload

And here for an edit of an existing file (login: Demo/test):

http://www.coincompendium.com/wiki/index.php?title=File:Vulture.jpg&action=formedit

In the comments are descriptions of bugs, problems, and workarounds. I'm not
sure how to break these up into individual bug reports since most of it seems
to be closely related, so here it is in it's entirety:



<noinclude>
This is the "Image" form.
To create a page with this form, enter the page name below;
if a page with that name already exists, you will be sent to a form to edit
that page.

{{#forminput:form=Image}}

Note that if you want to use this form to create file pages with the proper
file page name, ignore everything above. You need to use special links to
access the form. More info at:
[http://www.mediawiki.org/wiki/Extension:Semantic_Forms/Manual/Using_Semantic_Forms_for_file_pages_and_uploads
Using Semantic Forms for file pages and uploads]

Rationale for strange curly brace templates used here:

http://sourceforge.net/mailarchive/forum.php?thread_name=1317678457.25787.20.camel%40antec.home&forum_name=semediawiki-user
</noinclude><includeonly>
{{#vardefine: isfilepage |
    {{#explode: {{FULLPAGENAME}} <!-- will return "File" on any file page -->
        | :
        | 0
    }}
}}<nowiki />
{{#vardefine: restricted uploadable |
    {{#ifeq: {{#var: isfilepage}} | File
        | {{!}} restricted <!-- prevent editing of file name in upload field
while CSS to hide it completely loads -->
        | {{!}} uploadable
    }}
}}<nowiki />
{{#vardefine: show file name | <!-- Used to show file name instead of upload
field, to prevent even administrators from even accidentally screwing with a
file name, when they can get past the restricted status of the field -->
    {{#ifeq: {{#var: isfilepage}} | File
        | {{PAGENAME}}
        |
    }}
}}<nowiki />
{{#vardefine: show image being edited | <!-- Used to show to show the image
being edited, so users editing lots of images don't forget which one it is
they're changing properties for. -->
    {{#ifeq: {{#var: isfilepage}} | File
        | [[{{FULLPAGENAME}} | 100x100px | middle | This is the image you are
editing.]]
        |
    }}
}}<nowiki />
{{#vardefine: show image being edited | <!-- Used to show to show the image
being edited, so users editing lots of images don't forget which one it is
they're changing properties for. -->
    {{#ifeq: {{#var: isfilepage}} | File
        | ! style="vertical-align:middle;" {{!}} Image:
            {{!}} [[{{FULLPAGENAME}} {{!}} 100x100px {{!}} middle {{!}} This is
the image you are editing.]]
            {{!}}-
        |
    }}
}}<nowiki>



</nowiki>
<div id="wikiPreview" style="display: none; padding-bottom: 25px;
margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div><nowiki />
<!-- Semantic Forms can't make file pages. Workaround is to manually specify
the page to create using the page name parameter in the info tag with "File:"
prepended to "<Image[File]>"
https://bugzilla.wikimedia.org/show_bug.cgi?id=30034 --><nowiki />
{{{info | create title=Upload image | edit title=Edit image | page
name=File:<Image[File]>}}}<nowiki />
{{{for template | Image | label=Basic facts about this image}}}<nowiki />
<!-- "Edit" radiobutton grayed out in Google Chrome on edit pages. --><nowiki
/>
<!-- uploadoredit radio button field parameters "mandatory" with "default=edit"
fails to prevent "None" radiobutton from appearing on edit pages. No workaround
available other than hiding the entire field. --><nowiki />
<!-- uploadoredit radio button field show on select fails to function when
field is hidden, so must use MediaWiki:Common.css to hide uploadoredit CSS
class. --><nowiki />
<!-- File upload field containing file name still shows sometimes, even with
show on select correctly set to hide it, but "None" does not appear. Making two
copies of uploadoredit radio button field with show on select causes it to hide
correctly. Must use template-constructed field and conditional "uploadable"
parameter to ensure upload link is still not available if field fails to hide.
http://www.coincompendium.com/wiki/index.php?title=File:IMG_0943_crop_text.jpg&action=formedit
--><nowiki />
<!-- File upload field containing file name still shows briefly before div id
CSS is loaded to hide it on edit pages, which allows users to edit the file
name field while believing incorrectly that they are able to change the file
name. --><nowiki />
<!-- File upload field containing file name is editable after file is uploaded,
which allows users to edit the file name field while believing incorrectly that
they are able to change the file name. --><nowiki />
<!-- File upload field id input_5 used in MediaWiki:Common.js to prevent user
editing of file name field after uploading completed. --><nowiki />
<!-- File uploading light box that contains MediaWiki's standard uploader
causes problems on small screens because it can't be closed or scrolled while
it's in a fixed-size & position lightbox.
https://bugzilla.wikimedia.org/show_bug.cgi?id=30020 --><nowiki />
<!-- After a file is uploaded, it remains possible to click the "Upload file"
link again, to repeat the process. Doing so will cause the previous file to be
"lost" due to no semantic properties being applied without also clicking "Save
page" at the bottom of the form. Unfamiliar users may do this if they do not
realize they need to click yet another button at the bottom of the form, after
they've already clicked "Upload file" on the MediaWiki file upload lightbox,
and perhaps already filled out the form. --><nowiki />
<!-- Reuploading a file that produces warnings will cause Semantic Forms to
fail if the user does not check "Ignore any warnings". The file might be
uploaded, but "lost" due to the file name not being passed to the form, and the
identical error repeating when the user gets warnings again if they try to
reupload the file. This can also happen, for example, when the file has been
previously deleted, possibly because it was previously "lost" in an identical
circumstance, or a similar circumstance such as the one above where users
continue to upload files without realizing they need to click a second button
to "Save page". I'm sure there are other ways this particular bug can be
triggered. --><nowiki />
<div class="hidden"> <!-- makes it so hidden uploadoredit fields below don't
take up any space. Not necessary anymore to hide them with the uploadoredit CSS
class, but whatever. --><nowiki />
{{{field | uploadoredit | class=uploadoredit | input type=radiobutton |
values=upload, edit | default=edit | show on select=upload=>uploadfield;}}}
<!-- Must duplicate this line to make buggy show on select hiding work.
Workaround discovered by accident when accidentally pasting form code twice in
form edit page. I don't know why it works. --><nowiki />
{{{field | uploadoredit | class=uploadoredit | input type=radiobutton |
values=upload, edit | default=edit | show on select=upload=>uploadfield;}}}
<!-- Must duplicate this line to make buggy show on select hiding work.
Workaround discovered by accident when accidentally pasting form code twice in
form edit page. I don't know why it works. --><nowiki />
</div>

{| class="formtable"
{{#var: show image being edited}}
! style="border-bottom:1px solid black;" | File:
| style="border-bottom:1px solid black;" | {{#var: show file name}} <!--
Template-constructed fields will not be parsed correctly in this position, so
must go below --><nowiki />
    <div id="uploadfield">{{(((}}field {{!}} File {{!}} mandatory {{#var:
restricted uploadable}} {{!}} default filename=image {{#time: U |
now}}.jpg{{)))}}
    If your upload is not a '''.jpg''' file, be sure to change the
'''Destination filename''' to have the correct file extension (.jpg .png .gif
.pdf, etc).
    Please click the checkbox that says "'''Ignore any warnings'''" at the
bottom of the upload screen.<br />
    {{hidden begin
        | toggle     = left
        | title      = Help info and examples.
        | titlestyle = background:lightgrey;
    }}
    Please upload an unaltered version of your image '''''for archival
purposes'''''. If you need to make minor adjustments to your image before
uploading (like [http://en.wikipedia.org/wiki/Cropping_(image) cropping]), try
using [http://pixlr.com/ Pixlr].

    If you need to make notes on an image, instead of drawing diagrams on it
(the old way), use the ImageAnnotator (the new way):

    {| class="wikitable"
    ! style="text-align:center;" | The old way
    ! style="text-align:center;" | The new way
    |-
    | [[File:1995 1 oz silver proof panda with white spots of death.jpg|300px]]
    | [[File:IMG 0629.JPG|300px]]
    |}
    {{hidden end}}
    </div>
|-
! style="border-bottom:1px solid black;" | Belongs to:
| style="border-bottom:1px solid black;" | {{{field | Belongs to | size=35}}}
    What CC number is this image for? It could be for a type, sighting,
specimen, or some other page. Separate multiple entries with a comma.<br />
    Example: '''CCT1, CCS2, CC3'''
|-
! style="border-bottom:1px solid black;" | Image of:
| style="border-bottom:1px solid black;" |
    {{{field | Image of | input type=checkboxes | values=
        Obverse,
        Reverse,
        Slab front,
        Slab back,
        Detail,
        Altered,
        Set,
        Box,
        Certificate,
        Accessory,
        Documentation,
        Screenshot,
        Other
    }}}
    {{-}}
    {{hidden begin
        | toggle     = left
        | title      = Help info and examples.
        | titlestyle = background:lightgrey;
    }}
<gallery> <!-- galleries break if there's whitespace formatting around the file
name, because file names can have validly have white space --><nowiki />
File:1989GWWcto.jpg|                                                           
                                    '''Obverse''': "Front" side only.
[http://en.wikipedia.org/wiki/Obverse_and_reverse]
File:1989GWWctr.jpg|                                                           
                                    '''Reverse''': "Back" side only.
[http://en.wikipedia.org/wiki/Obverse_and_reverse]
File:1989GWWo.jpg|                                                             
                                      '''Slab front''': Usually displays the
obverse of a coin, and has the label.
File:1989GWWr.jpg|                                                             
                                      '''Slab back''': Usually displays the
reverse of a coin.
File:1995 1 oz silver proof panda with white spots of death 2.jpg|   
'''Detail''': Highlights a detail with a [http://en.wikipedia.org/wiki/Close-up
close up] camera shot.
File:1995 1 oz silver proof panda with white spots of death 3.jpg|   
'''Detail''': Highlights a detail with a final image
[http://en.wikipedia.org/wiki/Cropping_(image) crop].
File:1995 1 oz silver proof panda with white spots of death.jpg|       
'''Altered''': Has permanent annotation markings on the subject of the image
(coin).
File:1995 1 oz silver proof panda with white spots of death 4.jpg|   
'''Altered''': Significantly "doctored" (Contrast adjusted high in this case).
File:1984 22 g silver ancient temple pagoda 4 coin set.jpg|                   
'''Set''': An easily recognizable set of some sort.
File:1984 pagoda goldfish box and outer box.jpg|                               
        '''Box''': Some coins were originally sold with a presentation box or
other container.
File:1984 pagoda COA.jpg|                                                      
                                 '''Certificate''': Certificate of Authenticity
(COA), or other certificate.
File:1992 invention & discovery set compass toy.jpg|                           
    '''Accessory''': Booklets, toys, stamps, paraphernalia, or other
accessories.
File:EMS China sample form.jpg|                                                
                           '''Documentation''': Receipts, forms, invoices,
conservation reports, brochures, catalogs, etc.
File:2011-11-02 165547.jpg|                                                    
                               '''Screenshot''': Image of the screen, usually
of a website [http://en.wikipedia.org/wiki/Screenshot]
File:2010 Hong Kong Convention display case.jpg|                               
        '''Other''': Anything else. Please describe below.
</gallery>
    {{hidden end}}
|-
! style="border-bottom:1px solid black;" | Caption:
| style="border-bottom:1px solid black;" | {{{field | Caption | size=60}}}
    A short description of the image.<br />
    Example: '''Close up of scratch near the date'''
|-
! style="border-bottom:1px solid black;" | Main:
| style="border-bottom:1px solid black;" | {{{field | Main}}} Is this the best
image of its kind to use as a representative main image for the page it belongs
to?<br />
    Images marked as "Main" are displayed on pages preferentially. If you're
not sure, don't change this.
|-
! style="border-bottom:1px solid black;" | Page creation date:
| style="border-bottom:1px solid black;" | {{{field | Page creation date |
restricted | default={{#time: U | now}} }}} Restricted
    Now: {{#time: Y F d l H:i:s | now}}
[http://en.wikipedia.org/wiki/Coordinated_Universal_Time UTC] ({{#time: U |
now}})
|}
{{{end template}}}

'''Free text''':<br />
'''Warning''': Do not delete "ImageNote" lines, if they are shown below. They
are the code that displays annotations on an image without altering the actual
image.<br />
Hint: if you want to reset this field to the default, delete everything above
the "ImageNote" lines, if present, and then enter in only
'''<code>{{subst::Template:Image form preload}}</code>'''

{{{standard input|free text|rows=25|preload=Template:Image form preload}}}


{{{standard input|summary}}}

{{{standard input|minor edit}}} {{{standard input|watch}}}

{{{standard input|save}}} {{{standard input|preview}}} {{{standard
input|changes}}} {{{standard input|cancel}}}
</includeonly>

-- 
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