{"id":22729872,"url":"https://github.com/jhpyle/mediawiki-pla","last_synced_at":"2025-03-30T01:14:05.872Z","repository":{"id":29647725,"uuid":"33189343","full_name":"jhpyle/mediawiki-pla","owner":"jhpyle","description":"PLA's mediawiki setup","archived":false,"fork":false,"pushed_at":"2015-04-02T12:55:11.000Z","size":128,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T02:54:13.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhpyle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-31T14:14:25.000Z","updated_at":"2022-09-14T03:11:08.000Z","dependencies_parsed_at":"2022-09-03T17:51:24.121Z","dependency_job_id":null,"html_url":"https://github.com/jhpyle/mediawiki-pla","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhpyle%2Fmediawiki-pla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhpyle%2Fmediawiki-pla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhpyle%2Fmediawiki-pla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhpyle%2Fmediawiki-pla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhpyle","download_url":"https://codeload.github.com/jhpyle/mediawiki-pla/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246262618,"owners_count":20749175,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-10T18:12:13.040Z","updated_at":"2025-03-30T01:14:05.840Z","avatar_url":"https://github.com/jhpyle.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mediawiki-pla\n\nThis project is documentation of the MediaWiki configuration used by Philadelphia Legal Assistance.\n\n# Installing MediaWiki\n\nMediaWiki runs on PHP and MySQL.  See the [Installation Guide](http://www.mediawiki.org/wiki/Manual:Installation_guide) for instructions on installing it.\n\n# Files in this project\n\n## LocalSettings.php\n\nThis is the configuration file for the wiki.  On PLA's system, it is located in /var/lib/mediawiki-intake/.  This is the same folder with the primary index.php file for MediaWiki.\n\nPLA actually has multiple wikis.  This LocalSettings.php file is for https://wiki.philalegal.org, but we also have wikis at http://eap.philalegal.org and http://pfp.philalegal.org.  You will see references to these wikis in the search engine configuration file, sphinx.conf.  Multiple wikis need to reside in different folders (with their own LocalSettings.php files), but they can share the same MySQL database by using different table prefixes.\n\n## sphinx.conf\n\nThis is the configuration file for SphinxSearch, /etc/sphinxsearch/sphinx.conf.\n\nSphinxSearch is a search engine.  We upgraded MediaWiki's default search engine to use SphinxSearch.  We had to install the sphinxsearch server:\n\n    # apt-get install sphinxsearch\n\nWe also had to install and configure the SphinxSearch extension.  (See below for information about extensions.)\n\n## wiki.philalegal.org.conf\n\nThis is the Apache configuration file, /etc/apache2/sites-available/wiki.philalegal.org.conf.  It points to the main wiki directory, /var/lib/mediawiki-intake/ where index.php gets launched and does the rest.\n\nWe have chosen to run our wiki on https so that passwords are encrypted.\n\n## krb5.conf\n\nThis is the Kerberos configuration file, /etc/krb5.conf.  It points Apache to our Active Directory server.  See \"LDAP authentication,\" below.\n\n## mw-serve\n\nThis is the startup script for mw-serve, /etc/init.d/mw-serve.  This is necessary for obtaining high-quality PDF export to work on a non-public wiki.  See the Collection extension and the \"PDF export with mw-serve\" section below.\n\n## backup-script.sh\n\nThis is a backup script that runs on a daily basis from /etc/cron.daily/backup-script.sh.  It performs a rolling backup (seven days' worth) of the the MySQL databases.  It saves the MySQL database backup and a copy of all the MediaWiki files (code and uploaded files) to a Windows network drive.\n\n# Extensions\n\nSee [Extensions](http://www.mediawiki.org/wiki/Manual:Extensions) for instructions on how to install extensions.  Extensions are bundled as zip files or .tar.gz files and you unpack those files into the \"extensions\" subfolder.  Then you need to add something to LocalSettings.php to enable the extension.  Every extension has a page that explains what those lines need to say.\n\nThese are the extensions that PLA has installed.  Some of these come with MediaWiki; some may not actually be in use.\n\n* **Babel** - for internationalization\n* **Cite**\n* **cldr**\n* **CleanChanges**\n* **CodeEditor**\n* **Collection** - useful for being able to export multiple wiki pages in the format of a \"book.\"  Requires setting up mw-serve; see below.\n* **ConfirmEdit**\n* **DynamicSidebar** - highly recommended - allows customization of the sidebar depending on the user's group.  with the LdapAuthentication extension, the group is determined from Active Directory.\n* **EmbedVideo**\n* **Flashlets**\n* **FlvHandler**\n* **Gadgets**\n* **googleCalendar** - allows for embedding a public Google calendar\n* **ImageMap**\n* **InputBox**\n* **Interwiki** - for being able to write links to other wikis (e.g., Wikipedia) with \"internal\" links like `[[Wikipedia:George Washington|our first president]]`.\n* **jwplayer**\n* **LabeledSectionTransclusion** - advanced feature - for being able to transclude \n* **LdapAuthentication** - excellent - connects with Active Directory\n* **LocalisationUpdate**\n* **Mantle**\n* **MediawikiPlayer**\n* **MobileFrontend** - this makes the site easier to use on smartphones\n* **MsUpload** - a \"must\" - greatly simplifies the file upload process\n* **Nuke**\n* **ParserFunctions**\n* **PdfExport**\n* **PdfHandler**\n* **Poem**\n* **Renameuser**\n* **Scribunto**\n* **SemanticMediaWiki** - highly recommended - allows information from pages to be embedded in a linguistic way and queried programmatically\n* **SpamBlacklist**\n* **SphinxSearch** - we upgraded MediaWiki's default search engine to SphinxSearch\n* **SyntaxHighlight_GeSHi**\n* **TemplateData**\n* **TitleBlacklist**\n* **TitleKey** - highly recommended - makes page search queries case-insensitive.\n* **Translate** - for internationalization\n* **UniversalLanguageSelector**\n* **UserMerge**\n* **Validator**\n* **Widgets**\n* **WikiEditor**\n* **YouTube** - for being able to embed YouTube videos with simple markup like `\u003cyoutube\u003ehecXupPpE9o\u003c/youtube\u003e`\n\n# Installed Templates\n\nTemplates in MediaWiki are just regular MediaWiki pages that have names like \"Template:The Simpsons\".  When you insert `{{The Simpsons}}` in a page, MediaWiki replaces that text with the content of the template.  Templates may include other Templates and do various computational things.\n\nYou install Templates in the same way that you create pages -- by creating a page, typing in the WikiText, and saving.  If you have a collection of templates in an XML file that was created by Special:Export, you can import them using Special:Import, just as you can with ordinary pages.\n\nAfter to create a template page, it will show you an error if the template you created requires a template that you have not yet installed.  So the process of satisfying template dependencies is not difficult, but it can be time-consuming.\n\nThe templates on PLA's wiki either came with MediaWiki or were created manually by me.  I found the templates on another site (e.g., Wikipedia's templates are publicly accessible just as its pages are), viewed the source, and copies and pasted the template source into pages on my own wiki.\n\nThe main templates that we use for navigation are [Template:Navbox](http://en.wikipedia.org/wiki/Template:Navbox) and [Template:Sidebar](http://en.wikipedia.org/wiki/Template:Sidebar).  These templates had a number of other templates as dependencies, and also depended on extensions being installed.\n\nIf any of the links below (to Wikipedia) do not work, you should just Google the name of the template and you might find it elsewhere.\n\n* [Template:!](http://en.wikipedia.org/wiki/Template:!)\n* [Template:-](http://en.wikipedia.org/wiki/Template:-)\n* [Template:/doc](http://en.wikipedia.org/wiki/Template:/doc)\n* [Template:1x](http://en.wikipedia.org/wiki/Template:1x)\n* [Template:3x](http://en.wikipedia.org/wiki/Template:3x)\n* [Template:Box portal skeleton/Categories](http://en.wikipedia.org/wiki/Template:Box_portal_skeleton/Categories)\n* [Template:Box portal skeleton/Did you know](http://en.wikipedia.org/wiki/Template:Box_portal_skeleton/Did_you_know)\n* [Template:Box portal skeleton/Intro](http://en.wikipedia.org/wiki/Template:Box_portal_skeleton/Intro)\n* [Template:Box portal skeleton/News](http://en.wikipedia.org/wiki/Template:Box_portal_skeleton/News)\n* [Template:Box portal skeleton/Opentask](http://en.wikipedia.org/wiki/Template:Box_portal_skeleton/Opentask)\n* [Template:Box portal skeleton/Projects](http://en.wikipedia.org/wiki/Template:Box_portal_skeleton/Projects)\n* [Template:Box portal skeleton/Related portals](http://en.wikipedia.org/wiki/Template:Box_portal skeleton/Related portals)\n* [Template:Box portal skeleton/Topics](http://en.wikipedia.org/wiki/Template:Box_portal_skeleton/Topics)\n* [Template:Box portal skeleton/Wikimedia](http://en.wikipedia.org/wiki/Template:Box_portal_skeleton/Wikimedia)\n* [Template:Box portal skeleton/box-footer](http://en.wikipedia.org/wiki/Template:Box_portal_skeleton/box-footer)\n* [Template:Box portal skeleton/box-header](http://en.wikipedia.org/wiki/Template:Box_portal_skeleton/box-header)\n* [Template:Box-footer](http://en.wikipedia.org/wiki/Template:Box-footer)\n* [Template:Box-header](http://en.wikipedia.org/wiki/Template:Box-header)\n* [Template:Browsebar](http://en.wikipedia.org/wiki/Template:Browsebar)\n* [Template:Code](http://en.wikipedia.org/wiki/Template:Code)\n* [Template:Doc](http://en.wikipedia.org/wiki/Template:Doc)\n* [Template:Documentation](http://en.wikipedia.org/wiki/Template:Documentation)\n* [Template:Documentation subpage](http://en.wikipedia.org/wiki/Template:Documentation_subpage)\n* [Template:Documentation/docspace](http://en.wikipedia.org/wiki/Template:Documentation/docspace)\n* [Template:Documentation/end box](http://en.wikipedia.org/wiki/Template:Documentation/end_box)\n* [Template:Documentation/end box2](http://en.wikipedia.org/wiki/Template:Documentation/end_box2)\n* [Template:Documentation/start box](http://en.wikipedia.org/wiki/Template:Documentation/start_box)\n* [Template:Documentation/start box2](http://en.wikipedia.org/wiki/Template:Documentation/start_box2)\n* [Template:Documentation/template page](http://en.wikipedia.org/wiki/Template:Documentation/template_page)\n* [Template:Esoteric](http://en.wikipedia.org/wiki/Template:Esoteric)\n* [Template:Fmbox](http://en.wikipedia.org/wiki/Template:Fmbox)\n* [Template:For loop](http://en.wikipedia.org/wiki/Template:For_loop)\n* [Template:ForLoop/aux](http://en.wikipedia.org/wiki/Template:ForLoop/aux)\n* [Template:High-risk](http://en.wikipedia.org/wiki/Template:High-risk)\n* [Template:Icon](http://en.wikipedia.org/wiki/Template:Icon)\n* [Template:Intricate template](http://en.wikipedia.org/wiki/Template:Intricate_template)\n* [Template:Lorem ipsum](http://en.wikipedia.org/wiki/Template:Lorem_ipsum)\n* [Template:Mbox](http://en.wikipedia.org/wiki/Template:Mbox)\n* [Template:Mod](http://en.wikipedia.org/wiki/Template:Mod)\n* [Template:Module rating](http://en.wikipedia.org/wiki/Template:Module_rating)\n* [Template:Multicol](http://en.wikipedia.org/wiki/Template:Multicol)\n* [Template:Multicol-break](http://en.wikipedia.org/wiki/Template:Multicol-break)\n* [Template:Multicol-end](http://en.wikipedia.org/wiki/Template:Multicol-end)\n* [Template:Namespace detect](http://en.wikipedia.org/wiki/Template:Namespace_detect)\n* [Template:Navbar](http://en.wikipedia.org/wiki/Template:Navbar)\n* [Template:Navbox](http://en.wikipedia.org/wiki/Template:Navbox)\n* [Template:Navbox subgroup](http://en.wikipedia.org/wiki/Template:Navbox_subgroup)\n* [Template:Navbox suite](http://en.wikipedia.org/wiki/Template:Navbox_suite)\n* [Template:Navigation templates](http://en.wikipedia.org/wiki/Template:Navigation_templates)\n* [Template:Nowrap](http://en.wikipedia.org/wiki/Template:Nowrap)\n* [Template:Ombox](http://en.wikipedia.org/wiki/Template:Ombox)\n* [Template:Ombox/core](http://en.wikipedia.org/wiki/Template:Ombox/core)\n* [Template:Para](http://en.wikipedia.org/wiki/Template:Para)\n* [Template:Portal](http://en.wikipedia.org/wiki/Template:Portal)\n* [Template:Portal template list](http://en.wikipedia.org/wiki/Template:Portal_template_list)\n* [Template:Portal/Images/Default](http://en.wikipedia.org/wiki/Template:Portal/Images/Default)\n* [Template:Portal/Images/Science](http://en.wikipedia.org/wiki/Template:Portal/Images/Science)\n* [Template:Portals](http://en.wikipedia.org/wiki/Template:Portals)\n* [Template:Pp-book-cover](http://en.wikipedia.org/wiki/Template:Pp-book-cover)\n* [Template:Pp-meta](http://en.wikipedia.org/wiki/Template:Pp-meta)\n* [Template:Pp-template](http://en.wikipedia.org/wiki/Template:Pp-template)\n* [Template:Purge](http://en.wikipedia.org/wiki/Template:Purge)\n* [Template:Purge page](http://en.wikipedia.org/wiki/Template:Purge page)\n* [Template:Purgepage](http://en.wikipedia.org/wiki/Template:Purgepage)\n* [Template:Rand](http://en.wikipedia.org/wiki/Template:Rand)\n* [Template:Random number](http://en.wikipedia.org/wiki/Template:Random_number)\n* [Template:Random portal component with nominate](http://en.wikipedia.org/wiki/Template:Random_portal_component_with nominate)\n* [Template:Refbegin](http://en.wikipedia.org/wiki/Template:Refbegin)\n* [Template:Saved book](http://en.wikipedia.org/wiki/Template:Saved_book)\n* [Template:Sidebar](http://en.wikipedia.org/wiki/Template:Sidebar)\n* [Template:Strikethrough](http://en.wikipedia.org/wiki/Template:Strikethrough)\n* [Template:Tbullet](http://en.wikipedia.org/wiki/Template:Tbullet)\n* [Template:Template doc](http://en.wikipedia.org/wiki/Template:Template_doc)\n* [Template:Template other](http://en.wikipedia.org/wiki/Template:Template_other)\n* [Template:Template sandbox notice](http://en.wikipedia.org/wiki/Template:Template sandbox notice)\n* [Template:TemplateDataHeader](http://en.wikipedia.org/wiki/Template:TemplateDataHeader)\n* [Template:Tim](http://en.wikipedia.org/wiki/Template:Tim)\n* [Template:Tiw](http://en.wikipedia.org/wiki/Template:Tiw)\n* [Template:Tl](http://en.wikipedia.org/wiki/Template:Tl)\n* [Template:Tlx](http://en.wikipedia.org/wiki/Template:Tlx)\n* [Template:Transclude](http://en.wikipedia.org/wiki/Template:Transclude)\n* [Template:Void](http://en.wikipedia.org/wiki/Template:Void)\n\n# Notes about special features\n\n## LDAP authentication\n\nPLA uses a version of LDAP authentication that integrates with Apache.  Apache asks for the username and password, checks it against Active Directory using Kerberos, and then gives the username and password to MediaWiki, which runs an Active Directory to get the user's groups and other LDAP information.\n\nThe hardest part about setting this up was Kerberos.  I did a lot of things to get my Linux box to be able to query Active Directory, but I don't know which things were necessary.  I just followed some guides on the Internet.  Of course, because Microsoft is involved, the documentation was inscrutable and the process was painful.\n\n## PDF export with mw-serve\n\nHigh-quality PDF export is possible by installing and configuring [mw-serve](http://mwlib.readthedocs.org/en/latest/renderserver.html).  This was non-trivial.  It runs four daemon processes called \"postman,\" \"nslave,\" \"nserve,\" and \"mw-qserve.\"  Yes, this is needlessly complicated.  Moreover, the whole thing is currently broken because one of these daemons calls a library with deprecated code.\n\n# Author\n\nJonathan Pyle, http://philalegal.org/jonathanpyle\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhpyle%2Fmediawiki-pla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhpyle%2Fmediawiki-pla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhpyle%2Fmediawiki-pla/lists"}