ICT:Cargo-Workflow: Difference between revisions
Appearance
m Replaced content with "<includeonly> {{#cargo_declare: _table=Items, Title=String, Image=File }} '''Title:''' {{{Title}}} '''Image:''' [[File:{{{Image}}}|400px]] </includeonly>" Tag: Replaced |
mNo edit summary |
||
| Line 1: | Line 1: | ||
= ICT:Cargo-Workflow – Final Working Configuration (Cargo + PageForms) = | |||
This page documents the final, stable configuration for the postcard archive using Cargo and PageForms. | |||
It contains the complete working setup in one place, ready for successors. | |||
== 1) LocalSettings.php configuration == | |||
<pre> | |||
# Cargo extension | |||
$wgCargoDBtype = "mysql"; | |||
$wgCargoDBserver = "10.10.10.2"; | |||
$wgCargoDBname = "cargodb"; | |||
$wgCargoDBuser = "cargouser"; | |||
$wgCargoDBpassword = "Mhv+mak!90"; | |||
$wgCargoDBprefix = ""; | |||
$wgCargo24HourTime = true; | |||
wfLoadExtension( 'Cargo' ); | |||
# PageForms extension | |||
wfLoadExtension( 'PageForms' ); | |||
$wgPageFormsUploadableFiles = true; | |||
</pre> | |||
'''Important:''' | |||
$wgPageFormsUploadableFiles = true; must appear ''after'' wfLoadExtension( 'PageForms' ). | |||
---- | |||
== 2) Template:Item == | |||
This template defines the Cargo table and how each item page displays. | |||
<pre> | |||
<includeonly> | <includeonly> | ||
{{#cargo_declare: | {{#cargo_declare: | ||
| Line 10: | Line 44: | ||
'''Image:''' [[File:{{{Image}}}|400px]] | '''Image:''' [[File:{{{Image}}}|400px]] | ||
</includeonly> | </includeonly> | ||
</pre> | |||
Notes: | |||
* Only the <includeonly> section is used by Cargo and PageForms. | |||
* The Image field must be declared as File. | |||
---- | |||
== 3) Form:Item == | |||
This is the form used to create new items. | |||
<pre> | |||
{{{info|page name=Item_<unique number>}}} | |||
{{{for template|Item}}} | |||
;Title | |||
:{{{field|Title}}} | |||
;Image | |||
:{{{field|Image|input type=upload|uploadable}}} | |||
{{{end template}}} | |||
{{{standard input|save}}} | |||
{{{standard input|cancel}}} | |||
</pre> | |||
Key points: | |||
* The info directive '''must be the first line''' (no blank lines above it). | |||
* input type=upload|uploadable enables the upload widget. | |||
* Page names are automatically generated: Item_0001, Item_0002, … | |||
---- | |||
== 4) | |||
Revision as of 11:34, 5 January 2026
ICT:Cargo-Workflow – Final Working Configuration (Cargo + PageForms)
This page documents the final, stable configuration for the postcard archive using Cargo and PageForms. It contains the complete working setup in one place, ready for successors.
1) LocalSettings.php configuration
# Cargo extension $wgCargoDBtype = "mysql"; $wgCargoDBserver = "10.10.10.2"; $wgCargoDBname = "cargodb"; $wgCargoDBuser = "cargouser"; $wgCargoDBpassword = "Mhv+mak!90"; $wgCargoDBprefix = ""; $wgCargo24HourTime = true; wfLoadExtension( 'Cargo' ); # PageForms extension wfLoadExtension( 'PageForms' ); $wgPageFormsUploadableFiles = true;
Important: $wgPageFormsUploadableFiles = true; must appear after wfLoadExtension( 'PageForms' ).
2) Template:Item
This template defines the Cargo table and how each item page displays.
<includeonly>
{{#cargo_declare:
_table=Items,
Title=String,
Image=File
}}
'''Title:''' {{{Title}}}
'''Image:''' [[File:{{{Image}}}|400px]]
</includeonly>
Notes:
- Only the <includeonly> section is used by Cargo and PageForms.
- The Image field must be declared as File.
3) Form:Item
This is the form used to create new items.
{{{info|page name=Item_<unique number>}}}
{{{for template|Item}}}
;Title
:{{{field|Title}}}
;Image
:{{{field|Image|input type=upload|uploadable}}}
{{{end template}}}
{{{standard input|save}}}
{{{standard input|cancel}}}
Key points:
- The info directive must be the first line (no blank lines above it).
- input type=upload|uploadable enables the upload widget.
- Page names are automatically generated: Item_0001, Item_0002, …
== 4)