Gospel Translations:Technology/BrowseTranslations extension
From Gospel Translations
Contents |
Project summary
Create a SpecialPage that allows drilldown browsing of our translation library.
Assignments
- unassigned - Write PHP functions which will accept the parameters described below and return the appropriate listings [no working knowledge of Mediawiki plugin architecture required]
- Andrew - Convert functions into a SpecialPage extension on the GospelTranslations wiki
Overview of functionality
Special pages are designed to accept one parameter, which is included in the URL a la Special:Emailuser/Mahra. That special page creates a form to email Andrew, where the input parameter was Mahra
(Andrew's user name on this wiki).
The BrowseContent extension will work by first accepting a two-part parameter delimited by a colon. Because the extension's purpose is to provide a drilldown view, the two-part parameter will be formatted as Category:Member
. "Category" refers to the type of drill down--whether by Author, Publisher, Title, Topic, or Language. "Member" refers to the subgroup to display.
For example,
-
Publisher:Ligonier
would return a formatted list of everything published by Ligonier, -
Author:Dave Harvey
would return everything Dave Harvey has written -
Title:C
would return a list of all titles beginning with the letter "C"
Also, for each Category you can use the special Member "Index" to list all available Members. For example,
-
Language:Index
would return a list of all the languages that are published by us -
Topic:Index
would return a list of all the topics that have at least one article assigned to them
A minimal user experience would be:
- User visits Special:BrowseTranslations/Author:Index, which lists all authors as links
- From there, User clicks on the link for "John Piper" and is taken to Special:BrowseTranslations/Author:John_Piper, which lists all of Piper's works alphabetically
- User clicks an article title and is taken to the appropriate page
Since the example above would actually produce a huge list of titles, we'll need to plan a way to provide further drill down. One idea would be to keep adding parameters after forward slashes, i.e. Special:BrowseTranslations/Author:John_Piper/Topic:Salvation
. That is a long URL though, so I think other approaches should be considered.
See below for info on the database from which all this information will be pulled.
Helpful documentation
- Content database layout. Our content database is mirrored in a special multi-dimensional array stored on our servers. You'll need to know it's layout in order to access all of the Publisher, Author, Topic, Title, and Language data necessary for this extension.
- SpecialPage technical overview from MediaWiki.org
Special considerations for the Language
Category
For all Categories except Language
, the default language of the wiki will be assumed. So on an English wiki, only return English results, and so on.
But when browsing languages, another layer of functionality needs to be added. Let's say the user is on our English wiki, and is curious about what we've translated into Spanish. Well, if we just did a search in the form of Language:Spanish
, the resulting page would list several hundred items and thus be too expansive to be helpful.
For that reason, we should probably have Language:Spanish
simply return 4 options: Browse by Author, Topic, Title, or Publisher. And from there we would simply add new parameters to refine the search. Two options for doing this are:
- add a switch to our normal search which overrides the default language
-
Topic:Index/Spanish
-
Author:John Piper/Bosnian
-
- add a 3rd and 4th parameter to the Language search
-
Language:Spanish:Topic:Index
-
Language:Bosnian:Author:John Piper
-