Development:Index: Difference between revisions

From COMP15212 Wiki
pc>Yuron
No edit summary
gravatar Yuron [userbureaucratinterface-adminsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPmludGVyZmFjZS1hZG1pbjxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+] (talk | contribs)
m (1 revision imported)
Line 1: Line 1:
This page details information related to the development of this Mediawiki-driven website, serving as documentation for the code written for the wiki. For information regarding how to make use of this wiki's features once it's been set up, refer to [[Help:Index]].
This page details information related to the development of this Mediawiki-driven website.
== Extensions ==
== Extensions ==
*Semantic Mediawiki is used to provide:
*Semantic Mediawiki is used to provide:
Line 5: Line 5:
**Priority levels
**Priority levels
**Paths
**Paths
**Dependencies


*Scribunto (Lua scripting) is used to provide:
*Scribunto (Lua scripting) is used to provide:
**Article dependencies (Lua is needed to support adding an arbitrary number of dependencies to a single box)
**Article dependencies (Lua is needed to support an arbitrary and unlimited number of dependencies)


*Widgets is used to provide:
*Widgets is used to provide:
**Page demonstrations ([{{canonicalurl:Special:AllPages|namespace=274}} List of widgets])
**Page demonstrations ([[Widget:BarrierDemo |Barrier demo]], [[Widget:PageTableDemo|Page Table Demo]], etc)
 
*[[Development:UserDash|UserDash]] is the extension that drives most other features specific to this site, including:
**[[Special:Dashboard]], which currently holds the contents of the account profile page from MESH, rather than the Dashboard.
**The rating and page tagging system
**Page graphs
**[[Special:Contents|Contents]] page
 
*The skin Chameleon is used to provide Bootstrap to the wiki.
**'''The Bootstrap extension the Chameleon skin comes with does not include tooltip.js from Bootstrap. Replace line 68 in extensions/Bootstrap/src/Definition/V4ModuleDefinition with ''' <code> 'tooltip'          => [ 'styles' => 'tooltip', 'scripts' => 'tooltip.js', 'dependencies' => [ 'popper', 'js-util' ] ],> </code> ''' to fix this. This needs to be done every time Composer is used to update components, as this change would be overwritten.'''


== Migration ==
== Migration ==
#First, copy over the wiki installation, including the extensions, skin, and custom configurations in LocalSettings.php, or start from a fresh installation and append the needed extensions/configurations to LocalSettings.php afterwards.
*Step 1: Export content from old wiki:
#Second, migrate all pages in the wiki:
**Export all pages with <code> php maintenance/dumpBackup.php --current > name-of-output-file.xml </code>
##Run <code> php maintenance/dumpBackup.php --current > backup.xml </code> to dump all pages into backup.xml
**Export all images with (bespoke) <code> exportImage.sh </code>
##Restore backup.xml with the special page Special:Import on the target server
*Step 2: Import content to new wiki
##*Special:Import also requires an "interwiki prefix", which doesn't matter for a migration
**Import all pages using Special:Import
#Third, migrate all images:
**Import all images with (bespoke) <code> importImage.sh </code>
##Run the bespoke <code>exportImage.sh</code> on the source server to obtain MediaFiles.zip
** Refresh Semantic Mediawiki with <code> php extensions/SemanticMediaWiki/maintenance/rebuildData.php </code>
##Copy MediaFiles.zip to ~/ (user directory) on the destination
##Run the bespoke importImage.sh on the destination to restore images
#Lastly, refresh the extension databases with <code>php maintenance/update.php</code>, and refresh the Semantic Mediawiki database with <code> php extensions/SemanticMediaWiki/maintenance/rebuildData.php </code>
 
=== Further setup ===
For the rating chart in Special:Profile to work properly, the values UDStartYear, UDStartMonth, UDStartDay, UDStartHour, UDEndWeek and UDVacationWeeks in extensions/UserDash/extension.json must be set to sensible values.

Revision as of 12:47, 26 July 2019

This page details information related to the development of this Mediawiki-driven website.

Extensions

  • Semantic Mediawiki is used to provide:
    • Page summaries
    • Priority levels
    • Paths
  • Scribunto (Lua scripting) is used to provide:
    • Article dependencies (Lua is needed to support an arbitrary and unlimited number of dependencies)

Migration

  • Step 1: Export content from old wiki:
    • Export all pages with php maintenance/dumpBackup.php --current > name-of-output-file.xml
    • Export all images with (bespoke) exportImage.sh
  • Step 2: Import content to new wiki
    • Import all pages using Special:Import
    • Import all images with (bespoke) importImage.sh
    • Refresh Semantic Mediawiki with php extensions/SemanticMediaWiki/maintenance/rebuildData.php