Bureaucrats, Moderators (CommentStreams), Interface administrators, Push subscription managers, Suppressors, Administrators
11,987
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Develop a MediaWiki Cargo template named | Develop a MediaWiki Cargo template named Template:Prayer for defining, storing, and displaying data about Catholic prayers in a Cargo table named Prayers. The template should assume all prayers are Catholic and focus on attributes relevant to Catholic prayers, including authorship by saints or other figures. It must combine the Cargo table definition (<nowiki>{{#cargo_declare:_table=Prayers}}</nowiki>) and data storage/display (<nowiki>{{#cargo_store:_table=Prayers}}</nowiki>) in a single template, similar to a provided saints' template. The template must support grouping, filtering, and sorting based on the following characteristics: purpose (e.g., Adoration, Petition), recipient (e.g., God, Virgin Mary), liturgical context (e.g., Mass, Rosary), prayer type (e.g., Traditional, Litany), theme (e.g., Faith, Penitential), historical/cultural origin (e.g., Biblical, Medieval), use context (e.g., Personal, Communal), length (e.g., Short, Long), and liturgical season (e.g., Advent, Lent). The template should include fields for the prayer’s name, text, author, feast day, canonization status, language, ecclesiastical approval, tags for flexible searching, and date added. Use Text instead of List for fields that accept multiple values, as List is not available in the wiki’s supported classes, and avoid SQL reserved keywords (e.g., use UseContext instead of Usage). Ensure compatibility with a Page Forms form (Form:Prayer) modeled after a provided Form:Saints, with an input box for creating pages in the Prayer namespace. | ||
== Requirements == | == Requirements == | ||
# Define the Cargo table within <nowiki | # Define the Cargo table within <nowiki>Template:Prayer</nowiki> using <nowiki>{{#cargo_declare:_table=Prayers}}</nowiki> with the following fields: | ||
#* <nowiki | #* <nowiki>Name</nowiki> (String, indexed): The prayer’s title. | ||
#* <nowiki | #* <nowiki>Text</nowiki> (Text): The full prayer text. | ||
#* <nowiki | #* <nowiki>Author</nowiki> (String, indexed): The composer (e.g., "St. Francis of Assisi", "Unknown"). | ||
#* <nowiki | #* <nowiki>Purpose</nowiki> (Text): The intention (e.g., "Adoration", "Petition", or "Adoration,Petition"). | ||
#* <nowiki | #* <nowiki>Recipient</nowiki> (Text): The addressee (e.g., "God", "Virgin Mary", or "God,Virgin Mary"). | ||
#* <nowiki | #* <nowiki>LiturgicalContext</nowiki> (Text): The context (e.g., "Mass", "Rosary", or "Mass,Seasonal"). | ||
#* <nowiki | #* <nowiki>PrayerType</nowiki> (Text): The form (e.g., "Traditional", "Litany", or "Traditional,Novena"). | ||
#* <nowiki | #* <nowiki>Theme</nowiki> (Text): The theological theme (e.g., "Faith", "Penitential", or "Faith,Hope"). | ||
#* <nowiki | #* <nowiki>FeastDay</nowiki> (String): Associated feast day (e.g., "October 4"). | ||
#* <nowiki | #* <nowiki>CanonizationStatus</nowiki> (Text): Author’s status (e.g., "Saint", "Blessed", or "Saint,N/A"). | ||
#* <nowiki | #* <nowiki>Origin</nowiki> (Text): Historical origin (e.g., "Biblical", "Medieval", or "Biblical,Modern"). | ||
#* <nowiki | #* <nowiki>UseContext</nowiki> (Text): Context (e.g., "Personal", "Communal", or "Personal,Occasional"). | ||
#* <nowiki | #* <nowiki>Length</nowiki> (Text): Length (e.g., "Short", "Medium", or "Short,Medium"). | ||
#* <nowiki | #* <nowiki>Season</nowiki> (Text): Liturgical season (e.g., "Advent", "Lent", or "Advent,General"). | ||
#* <nowiki | #* <nowiki>Language</nowiki> (String): Original language (e.g., "Latin"). | ||
#* <nowiki | #* <nowiki>Approval</nowiki> (String): Ecclesiastical approval (e.g., "Imprimatur", "None"). | ||
#* <nowiki | #* <nowiki>Tags</nowiki> (Text): Keywords for searching (e.g., "healing", "Marian", or "healing,Marian"). | ||
#* <nowiki | #* <nowiki>DateAdded</nowiki> (Date): Auto-filled with the current date. | ||
# Use <nowiki | # Use <nowiki>{{#cargo_store:_table=Prayers}}</nowiki> to store data, with <nowiki>Name</nowiki> defaulting to <nowiki>{{PAGENAME}}</nowiki>. | ||
# Display all fields in a clean format, with <nowiki | # Display all fields in a clean format, with <nowiki>Text</nowiki> in a blockquote and a floating box showing the stored <nowiki>Name</nowiki>, similar to the saints’ template. | ||
# Automatically categorize pages in <nowiki | # Automatically categorize pages in <nowiki><nowiki>[[Category:Catholic Prayers]]</nowiki></nowiki>. | ||
# Include <nowiki | # Include <nowiki>{{#template_params}}</nowiki> to define parameters, their labels, defaults, and placeholders, mirroring the saints’ template. | ||
# Include documentation with usage instructions, an example (e.g., the Memorare prayer), and notes on table creation. | # Include documentation with usage instructions, an example (e.g., the Memorare prayer), and notes on table creation. | ||
# Ensure compatibility with a Page Forms form (<nowiki | # Ensure compatibility with a Page Forms form (<nowiki>Form:Prayer</nowiki>) modeled after <nowiki>Form:Saints</nowiki>, using simple text inputs for <nowiki>Text</nowiki> fields and an input box for creating pages in the Prayer namespace with <nowiki>{{#forminput:form=Prayer|autocomplete on category=Catholic Prayers|namespace=Prayer}}</nowiki>. | ||
# Support queries for grouping (e.g., by Purpose or Recipient), filtering (e.g., Marian prayers for Lent using <nowiki | # Support queries for grouping (e.g., by Purpose or Recipient), filtering (e.g., Marian prayers for Lent using <nowiki>LIKE</nowiki>), and sorting (e.g., by Name or Length). | ||
# Example usage: | # Example usage: | ||
#* Prayer: Memorare | #* Prayer: Memorare | ||
| Line 45: | Line 45: | ||
#* Approval: None | #* Approval: None | ||
#* Tags: Marian,intercession,devotional | #* Tags: Marian,intercession,devotional | ||
# Address table creation by ensuring correct field types, avoiding SQL keywords, and providing instructions to create the table via <nowiki | # Address table creation by ensuring correct field types, avoiding SQL keywords, and providing instructions to create the table via <nowiki>Special:CargoTables</nowiki>, <nowiki>Special:CreateCargoTable</nowiki>, or a setup page. Troubleshoot form rendering issues by ensuring | ||