Demo VisualData 1.0
/ Page upload
Editing
Demo VisualData/Page upload
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
The following form (click the button below) shows the use of VisualData as a multiple file uploader fully customizable. The form below uses the following features: * wikitext in either title and description of each item and subitem * subitem with multiple items and min-item attribute set to 1 (in order to hold the file and caption fields) * OO.UI.SelectFileWidget for the field "file" with input-config <code><nowiki>droppable</nowiki></code> and <code><nowiki>showDropTarget</nowiki></code>. Note that both the attributes must be set in order to enable a doppable area * value formula for the file field <code><nowiki>{{PAGEID}}-<value></nowiki></code> in order to upload the file with a filename prefixed with the pageId of the current or created page. This is useful when you don't want to care of uploading files with same name on the wiki. * list of accepted mime-types editable in the file input config (special page [[Special:ManageSchemas]] then Page upload schema) accessible from the settings icon besides the dropdown with available inputs (see picture below) [[File:Screenshot-VisualData-InputConfig.png|480px|frameless]] (the caption associated to each file is simply a field besides the file field in the same subitem, other fields could be added as well) {{#visualdataform: Page upload |title = Page upload |action = edit |edit-page = |return-page = |view = inline |popup-size = medium |css-class = |pagename-formula = |edit-freetext = false |edit-categories = false |edit-content-model = false |default-categories = tasks |default-content-model = |layout-align = top |popup-help = true |submit-button-text = |layout = tabs |submit-button-text = |validate-button-text = }} This is the code to display the form-button <pre> {{#visualdataform: Page upload |title = Page upload |action = edit |edit-page = |return-page = |view = popup |popup-size = medium |css-class = |pagename-formula = |edit-freetext = false |edit-categories = false |edit-content-model = false |default-categories = tasks |default-content-model = |layout-align = top |popup-help = true |submit-button-text = |layout = tabs |submit-button-text = |validate-button-text = }}</pre> '''Also note that although the [[VisualDataSchema:Page_upload|Page upload schema]] is now used inside a form, its typical use would be to add it to whatever page of the wiki through the "Edit semantic" tab, and then adding it to the page.''' This way there is no need to create a form each time. Here is a [https://www.mediawiki.org/wiki/Help:Images/en gallery] created through the parser function below. It uses the following 2 templates: [[Template:Page_upload]] and [[Template:Page_upload_files]]. The gallery is automatically updated after form submit with the new data. {{#visualdataprint: {{FULLPAGENAME}} |?files/file |?files/caption |schema=Page upload |template=Page upload |template?files=Page upload files |format=template }} <pre> {{#visualdataprint: {{FULLPAGENAME}} |?files/file |?files/caption |schema=Page upload |template=Page upload |template?files=Page upload files |format=template }} </pre> == See also == {{Demo VisualData footer}}
Summary:
Please note that all contributions to Wikisphere may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Wikisphere:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Demo VisualData footer
(
edit
)
Template:Page upload
(
edit
)
Template:Page upload files
(
edit
)
Navigation menu
Personal tools
Create account
Log in
Namespaces
Page
Data
Discussion
English
Views
Read
Edit
Edit source
Edit data
View history
More
Delete
Move
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information
Browse subpages
VisualData
New article
Browse data
Subpage navigation
Browse subpages