Development:Index: Difference between revisions

From COMP15212 Wiki
gravatar W81054ch [userbureaucratinterface-adminsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPmludGVyZmFjZS1hZG1pbjxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+] (talk | contribs)
m (1 revision imported)
pc>Yuron
No edit summary
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, 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]].
== Extensions ==
== Extensions ==
*Semantic Mediawiki is used to provide:
*[https://www.mediawiki.org/wiki/Extension:Semantic_MediaWiki Semantic Mediawiki] is used to provide:
**Page summaries
**Page summaries
**Priority levels
**Priority levels
Line 7: Line 7:
**Dependencies
**Dependencies


*Scribunto (Lua scripting) is used to provide:
*[https://www.mediawiki.org/wiki/Extension:Scribunto 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 adding an arbitrary number of dependencies to a single box)


*A Syntax Highlighting extension is used to provide syntax highlighting for code in the wiki.
*A [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight Syntax Highlighting extension] is used to provide syntax highlighting for code in the wiki.


*Widgets is used to provide:
*[https://www.mediawiki.org/wiki/Extension:Widgets Widgets] is used to provide:
**Page demonstrations ([{{canonicalurl:Special:AllPages|namespace=274}} List of widgets])
**Page demonstrations ([{{canonicalurl:Special:AllPages|namespace=274}} List of widgets])


*[[Development:UserDash|UserDash]] is the extension that drives most other features specific to this site, including:
*[[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.
**[[Special:Profile]], various graphs related to a user's progress through this wiki.
**[[Special:Dashboard]], a page directed towards guiding a user to their next page to read.
**The rating and page tagging system
**The rating and page tagging system
**Page graphs
**Page graphs, summoned by the <nowiki></pagegraph></nowiki> tag (though a separate template is used to actually include the pagegraph)
**[[Special:Contents|Contents]] page
**[[Special:Contents|Contents]] page


*The skin Chameleon is used to provide Bootstrap to the wiki.
*The skin [https://www.mediawiki.org/wiki/Skin:Chameleon Chameleon] is used to provide a Bootstrap look 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.'''
**'''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.
#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.
##
#Second, migrate all pages in the wiki:
#Second, migrate all pages in the wiki:
##cd to the installation directory of MediaWiki.
##Run <code> php maintenance/dumpBackup.php --current > backup.xml </code> to dump all pages into backup.xml
##Run <code> php maintenance/dumpBackup.php --current > backup.xml </code> to dump all pages into backup.xml
##Restore backup.xml with the special page Special:Import on the target server  
##Restore backup.xml with the special page Special:Import on the target server  
##*Special:Import also requires an "interwiki prefix", which doesn't matter for a migration
##*Special:Import also requires an "interwiki prefix", which doesn't matter for a migration
#Third, migrate all images:
#Third, migrate all images:
##Run the bespoke <code>exportImage.sh</code> on the source server to obtain MediaFiles.zip
##Run the bespoke <code>exportImage.sh</code> on the source server to obtain MediaFiles.zip in the home directory
##Copy MediaFiles.zip to ~/ (user directory) on the destination
##Copy MediaFiles.zip to ~/ (user directory) on the destination
##Run the bespoke importImage.sh on the destination to restore images
##Run the bespoke importImage.sh on the destination to restore images

Revision as of 10:21, 9 August 2019

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.

Extensions

  • Scribunto (Lua scripting) is used to provide:
    • Article dependencies (Lua is needed to support adding an arbitrary number of dependencies to a single box)
  • UserDash is the extension that drives most other features specific to this site, including:
    • Special:Profile, various graphs related to a user's progress through this wiki.
    • Special:Dashboard, a page directed towards guiding a user to their next page to read.
    • The rating and page tagging system
    • Page graphs, summoned by the </pagegraph> tag (though a separate template is used to actually include the pagegraph)
    • Contents page
  • The skin Chameleon is used to provide a Bootstrap look 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 'tooltip' => [ 'styles' => 'tooltip', 'scripts' => 'tooltip.js', 'dependencies' => [ 'popper', 'js-util' ] ],> to fix this. This needs to be done every time Composer is used to update components, as this change would be overwritten.

Migration

  1. 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.
  2. Second, migrate all pages in the wiki:
    1. cd to the installation directory of MediaWiki.
    2. Run php maintenance/dumpBackup.php --current > backup.xml to dump all pages into backup.xml
    3. Restore backup.xml with the special page Special:Import on the target server
      • Special:Import also requires an "interwiki prefix", which doesn't matter for a migration
  3. Third, migrate all images:
    1. Run the bespoke exportImage.sh on the source server to obtain MediaFiles.zip in the home directory
    2. Copy MediaFiles.zip to ~/ (user directory) on the destination
    3. Run the bespoke importImage.sh on the destination to restore images
  4. Lastly, refresh the extension databases with php maintenance/update.php, and refresh the Semantic Mediawiki database with php extensions/SemanticMediaWiki/maintenance/rebuildData.php

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.