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