ICT:Cargo-Workflow: Difference between revisions
Appearance
mNo edit summary |
mNo edit summary |
||
| Line 6: | Line 6: | ||
== 1) LocalSettings.php configuration == | == 1) LocalSettings.php configuration == | ||
<pre> | |||
# Cargo extension | # Cargo extension | ||
$wgCargoDBtype = "mysql"; | $wgCargoDBtype = "mysql"; | ||
| Line 20: | Line 21: | ||
wfLoadExtension( 'PageForms' ); | wfLoadExtension( 'PageForms' ); | ||
$wgPageFormsUploadableFiles = true; | $wgPageFormsUploadableFiles = true; | ||
</pre> | |||
'''Important:''' | '''Important:''' | ||
| Line 30: | Line 32: | ||
This template defines the Cargo table and how each item page displays. | This template defines the Cargo table and how each item page displays. | ||
<pre> | |||
<includeonly> | <includeonly> | ||
{{#cargo_declare: | {{#cargo_declare: | ||
| Line 41: | Line 44: | ||
'''Image:''' [[File:{{{Image}}}|400px]] | '''Image:''' [[File:{{{Image}}}|400px]] | ||
</includeonly> | </includeonly> | ||
</pre> | |||
Notes: | Notes: | ||
| Line 52: | Line 56: | ||
This is the form used to create new items. | This is the form used to create new items. | ||
<pre> | |||
{{{info|page name=Item_<unique number>}}} | {{{info|page name=Item_<unique number>}}} | ||
{{{for template|Item}}} | {{{for template|Item}}} | ||
| Line 65: | Line 70: | ||
{{{standard input|save}}} | {{{standard input|save}}} | ||
{{{standard input|cancel}}} | {{{standard input|cancel}}} | ||
</pre> | |||
Key points: | Key points: | ||
| Line 77: | Line 83: | ||
This page provides a simple button for club members to add new items. | This page provides a simple button for club members to add new items. | ||
<pre> | |||
== Add a new item == | == Add a new item == | ||
| Line 82: | Line 89: | ||
{{#formlink:form=Item|link text=➕ Add a new item|link type=button}} | {{#formlink:form=Item|link text=➕ Add a new item|link type=button}} | ||
</pre> | |||
Users never see Special:FormStart and never choose page names. | Users never see Special:FormStart and never choose page names. | ||
| Line 91: | Line 99: | ||
This page shows all items in a gallery. | This page shows all items in a gallery. | ||
<pre> | |||
== Browse Items == | == Browse Items == | ||
| Line 99: | Line 108: | ||
|image size=200 | |image size=200 | ||
}} | }} | ||
</pre> | |||
Notes: | Notes: | ||
Revision as of 11:27, 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