Extension:SacredText

MediaWiki extensions manual
SacredText
Release status: unmaintained
Implementation Tag , Database
Description Can be used to quote sacred texts, without linking to external websites. Adds the sacred texts to the user's database.
Author(s) JonathanWillifordtalk, Leucostictetalk
Latest version 0.0.2
Compatibility policy Snapshots releases along with MediaWiki. Master is not backward compatible.
MediaWiki
Database changes Yes
Tables sacredtext_verses
License GNU General Public License 3.0
Download
Example http://wiki.mises.org/wiki/Holy_Bible
$wgSacredChapterAlias, $wgSacredUseBibleTag
Quarterly downloads 0
Translate the SacredText extension if it is available at translatewiki.net

What can this extension do?

edit

Can be used to quote sacred texts, without any links to external websites.

Usage

edit

One verse

edit

The code

<bible>Gen 1:5</bible>

will result in:

Gen 1:5 And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.

The following also has the same result:

<sacredtext text="Christian Bible" ver="kjv">Gen 1:5</sacredtext>

Multiple verses

edit

The code halter 13 Chapter 13

<bible>1 Corinthians 4:21-5:1</bible>

will result in:

1 Corinthians 4:21-5:1 What will ye? shall I come unto you with a rod, or in love, and in the spirit of meekness? It is reported commonly that there is fornication among you, and such fornication as is not so much as named among the Gentiles, that one should have his father's wife.

Parser function

edit

You can also use a parser function; for example:

{{#bible: Genesis 1:1}}

will result in:

Gen 1:5 And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.

Installation

edit

Get the Scripture data

edit

Due to the size of the SQL scripts that add the scriptures to the database, they are kept on a different SVN repository. To download, please execute the following command while inside the SacredText directory:

svn checkout http://sacredtext.googlecode.com/svn/trunk/data data

Or, since there's only one file, just get it from here.

Edit LocalSettings.php

edit

To install this extension, add the following to LocalSettings.php :

require_once("$IP/extensions/SacredText/SacredText.php");
$wgSacredUseBibleTag = true; // set to false to reserve the bible tag for another extension

Create the database table

edit

Then run "maintenance/update.php". This will create the database table to hold the verses and add the entries for the King James Version of the Bible.

Configuration parameters

edit

$wgSacredChapterAlias

edit

If you want to additional abbreviations for chapters. The first index indicates the religious text where you want to use the abbreviation (ex. "Christian Bible", "Hebrew Bible", "Quran"). Example:

$wgSacredChapterAlias["Christian Bible"]["II Chron"]="2 Chronicles";

$wgSacredUseBibleTag

edit

Set this to false if you want another extension to be able to use the <bible>...</bible> tags. Defaults to true.

$wgSacredUpdateTable

edit

Set this to false if you don't want the sacredtext_verses table to be dropped and re-added upon running update.php. E.g., perhaps you already loaded all the verses you needed into it, so you have no need to update it. Defaults to true.

Sacred texts and translations

edit

Currently, only the King James Version translation of the Christian Bible is added to the database; however other religious texts and translations can be added. I am looking to add more sacred texts and other translations (that are in public domain or have lenient licenses). Please contact me if you are interested in helping.

Changelog

edit

v0.0.2

edit
  • Added parser functions.
  • Added ability to view a range of Bible verses (e.g. Genesis 1:1-1:3).
  • Fixed glitch that prevented verses with double-digit chapters (e.g. Revelation 20:15) from rendering properly.
  • Disabled fallback to BibleGateway.com.
  • Disabled automated reading of data directory; reinstated hard-coded /data/bible_kjv_entire.sql.
  • Added SacredText.i18n.php.
  • Added $wgSacredUpdateTable.

See also

edit