Difference between revisions of "Citation Master Basic Mod"

From TNG_Wiki
Jump to: navigation, search
(Sites Using Citation Master Basic)
(Redirected page to Citation Master)
(48 intermediate revisions by 4 users not shown)
Line 1: Line 1:
#REDIRECT [[Citation Master]]
| mod_name        = Citation Master Basic
| mod_summary    = Customize the format and content of citations (individual pages) and sources (browsing page).
| mod_validation  =
| download_link  =  {{Tv922}}[http://wherndon.net/genealogy/mods/mod-cite-master-v9.2.2.1.zip v9.2.2.1] [http://wherndon.net/genealogy/mods/mod-cite-master-v9.2.2.0.zip v9.2.2.0] {{Tv1002}}[http://wherndon.net/genealogy/mods/mod-cite-master-v10.0.2.0.zip v10.0.2.0]
| download_stats =
| mod_author      = [[User:wrherndon|Bill Herndon]]
| mod_url        = [[Citation Master Basic Mod]]
| mod_support    = [mailto:bill@wherndon.net Email me.]
| mod_contact    =
| mod_version    = for TNG v9.2.2 and for TNG v10.0.2
| min_TNG_ver    = 9.2.2
| max_TNG_ver    = 10.0.2
| TNG_file_list  = browsesources.php<br/>personlib.php
| related_mods    =
| notes          =
{| style="margin-right:0.5 em;" align="right"
| __TOC__
== Purpose ==
Have you ever wanted to to display your citations and sources in a  bibliographic format--something more in line with contemporary  publishing standards?  Do you have lots of custom source tags or do you use source tags that aren't supported directly in the tng_sources  table (...and consequently don't get displayed)?  Then Citation Master  Basic can help by allowing you to define the format and
content of citations.
== Developer ==
[[User:wrherndon|Bill Herndon]]
== Requirements ==
* A working TNG installation
* An installed current version of the [[Mod Manager]] (is already included in TNG v9)
* Shell-level access to your TNG host (for editing the configuration file)
== Installation ==
* Download the .zip file to your mods directory and unpack it.
* Inside the the sub-directory, ''egenea_cite_master'', edit the configuration file  ''egenea_cfg_citation.php'' to add format instruction sets for your own source types. 
* Install the mod using the TNG Mod Manager
== Upgrading ==
* Disable the mod through the Mod Manager
* Back up your copy of ''mods/egenea_cite_master/egenea_cfg_citation.php''
* Install the new version of the mod
* Restore your copy of ''''mods/egenea_cite_master/egenea_cfg_citation.php''
* Enable the mod through the Mod Manager
== Features ==
* Define the fields, order, typeface, surrounding punctuation, and separators that go into a displayed citation or source
* Create different format instruction sets for different sources (e.g., Census vs. Will)
* Override TNG's formatting behavior for individual citations and source browsing.
Citation Master Basic supports changes to the typeface of a source field, the punctuation
that surrounds the field, the separator that follows the field, and the punctuation that
follows the citation.  (Typeface, surround, and separator are referred to later as ''categories''.)
=== Typefaces ===
Four typefaces are supported: 'plain', 'bold', 'italic', and 'uline' (i.e., underline).
=== Surrounds ===
Five types of surrounding punctuation are supported: 'parens' (i.e., parenthesis), 'quotes', 'brackets' (i.e., square brackets), 'braces' (i.e., curly braces), and 'angles' (i.e., angle brackets).
=== Separators ===
The supported field separators are: 'space', 'comma', 'colon', 'period', 'semi' (i.e., semi-colon), and 'dash'.  With the exception of dashes, that have spaces both before and after, all other punctuation marks have a single appended space.
== Notes ==
*  The format instructions and source specifications are valid PHP code. So if you make a mistake you'll probably encounter a syntax error when PHP attempts to render your page. 
* Multiple typeface instructions are supported per source tag.  (See the 'Examples' for the syntax of such an instruction.) 
* No instruction is ever required.  There is always a default behavior.
* Instruction order is important.  Do you want your comma inside your quoted title?  Then your separator instruction should come before your surround instruction. 
* You must have a source specification named "_default".  If no other specification matches the source type, this specification is used.
* The '_default' specification supplied in the example configuration file corresponds to the requirements of the Chicago Manual of Style, book format.
=== Formatting Instructions ===
This is a PHP array that associates GEDCOM tags with formatting instructions. So, for example, the TITL (title) tag might be associated with the typeface 'bold'and be followed by a 'comma' (a 'separator' instruction).
=== Source Specifications ===
These are PHP arrays that define source types (such as 'Census') and identify the format instruction sets that get applied.  Source type names are usually specific to the genealogy program you use for your data and how that program exports that data to GEDCOM.  My software, Reunion for Macintosh uses names like 'Census', 'Will', and 'Compilation'.  Yours will almost certainly do something different.
The '_default' specification must exist in the configuration file to handle any source types that don't have their own specifications.  Don't delete it.
== Examples ==
=== Screenshots ===
More here soon...but for the moment check out an example of an individual's source
[http://wherndon.net/genealogy/getperson.php?personID=I116&tree=LindellHerndon#sources citations] or an example of the [http://wherndon.net/genealogy/browsesources.php  source browser].
=== Format Instructions and Source Specifications ===
Format instructions associate things like typefaces with the GEDCOM tags that represent particular source fields.  For example:
    "TITL" => array(
      "typeface" => "italics",
      "separator" => "comma",
      "surround" => "quotes"
    "PUBL" => array(
      "typeface" => array("bold", "italics"),
      "surround" => "parens",
      "separator" => "space"
...instructs Citation Master to display a source's title field (GEDCOM tag TITL) in italics, append a comma, and then surround the whole thing in quotes.  A PUBL (publisher) field should be displayed in bold-italics, surrounded by parenthesis, and followed by a space.
Source specifications define what set of format instructions go with what source, and whether that source should have any leading or trailing punctuation.  For example:
  $egenea_source_fmt['Census'] = array(
    "name" => "",
    "comment" => "Citation Master format for type 'Census' (IEEE style).",
    "context" => "all",
    "trailer" => "period",
    "tags" => $census_fmt_ins
...associates the format instructions contained in ''$census_fmt_ins'' with the source type ''Census'' and instructs Citation Master to add a period after all such sources.
== Frequently Asked Questions ==
'''Q''':  '''''Why GEDCOM tags'''''?
'''A''':  It was the only real way to level the playing field between all types of genealogy software while, at the same time, dealing with the fact that TNG stores some information in the sources table (I assign the expected GEDCOM tags to these pieces of data) and some data as custom events. It also helps me deal with the fact that genealogists sometimes define their own tags.  For example, I use a custom "EREF" tag that stands for "endnote reference" (a shorthand that I use to refer to sources in notes and for naming source files).  I have one of these assigned to every source in my database and wanted them printed on the browsesource.php and individual pages.  TNG, of course, has no idea what this source field is because from it's perspective it's just a custom source event.
'''Q''':  '''''What's the variable $egenea_srctype_tag mean and how should I set it?'''''
'''A''':  Most genealogy software, like Reunion (my software), assigns a GEDCOM style tag to the type of source (e.g., "census", "compilation, "vital record", etc...), and that shows up in TNG as a custom event when your source get imported.  I need to find the field that corresponds to your source type in the database in order to decide which of your defined formats to use.  So, for my software, there is a custom event in the TNG database with tag "TYPE" and value "Vital Record", and I know to look for an entry in the $egenea_source_fmt variable called "Vital Record" containing all the formatting instructions for vital records.
'''Q''': '''''What happens if one of my source fields, one that I specified format instructions for, is empty or missing?'''''
'''A''':  Don't worry about it.  Citation Master treats an empty or missing source field as it simply doesn't exist in the output.  In other words, data, surrounds and separators are simply omitted.
'''Q''': '''''What if I don't import source information but define it in TNG?  In other words, TNG is my primary genealogy database.'''''
'''A''': This is tricky because it means that there may be no custom event to define your source type names, and unless you create such an event...for each source...you won't be able to define different format instructions for different source types.  I don't have a good solution for this, but the default type, '_default', will still work for your sources.  You'll just have to do your best to make sure it works for all your sources.
'''Q''': '''''Where are the admin interfaces so I don't have to deal with all this PHP configuration stuff?'''''
'''A''':  :-)  All in good time.
== Revision History ==
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
! Version
! Release&nbsp;Date
! Comments
|- valign="top"
| 24 Aug 2014
| Updated for compatibility with TNG v10.0.2.
|- valign="top"
| 17 Aug 2014
| Now supporting multiple typeface instructions per tag.  (See the examples for additional information.)  The custom event tag that represents source type can now be set as a Mod parameter.
|- valign="top"
| 09 Aug 2014
| Initial release.
== Sites Using Citation Master Basic ==
If you download and install this mod, please add your TNG site to the table below.
{| border="0" cellspacing="1" cellpadding="3" class="wikitable"
! User
! Note
! Mod-Version
! TNG-Version
| [http://wherndon.net/genealogy Lindell-Herndon Genealogy]
| [[User:wrherndon|Bill Herndon]]
| Mod developer
| 10.0.2
[[Category:Mods for TNG v10]]
[[Category:Mods for TNG v9]]
[[Category:browsesources.php mods]]
[[Category:personlib.php mods]]

Latest revision as of 04:56, 7 July 2015

Redirect to: