1<?php
2/**********************************************************************************
3WIKINDX: Bibliographic Management system.
4Copyright (C)
5
6This program is free software; you can redistribute it and/or modify it under the terms
7of the GNU General Public License as published by the Free Software Foundation; either
8version 2 of the License, or (at your option) any later version.
9
10This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12See the GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License along with this program;
15if not, write to the
16Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18The WIKINDX Team 2004
19sirfragalot@users.sourceforge.net
20**********************************************************************************/
21/*****
22* BIBLIOGRAPHIC STYLE HELP class (English)
23*
24* NOTE TO TRANSLATORS:  1/  Both the class name and the constructor name should be changed to match the (case-sensitive) name of
25*				the folder your language files are in.  For example, if you are supplying a Klingon translation and
26*				your languages/ folder is languages/kn/, the class and constructor name for the file SUCCESS.php
27*				must both be SUCCESS_kn.
28*****/
29class HELPSTYLE_en
30{
31// Constructor
32	function HELPSTYLE_en()
33	{
34		$linkSfWikindx = MISC::a("link", "WIKINDX Sourceforge Project",
35			"http://sourceforge.net/projects/wikindx/", "_blank");
36////////////////////////////////////////////////////////////////////////////////////
37// TRANSLATORS start here.  Translate ONLY the second string in each define().
38define("TEXT1", "If you have WIKINDX admin rights, you can create and edit bibliographic styles for on-the-fly formatting when displaying or exporting bibliographic lists.");
39// Don't translate 'nobody' and the HTML tags!
40define("TEXT2", "These styles are stored as an encoded text file within its own directory in the styles/bibliography/ directory. This directory <strong>must</strong> be writeable by everyone or at least the web server user (usually user 'nobody'). Additionally, when editing an existing style, the style file within its named directory in the styles/bibliography/ directory <strong>must also</strong> be writeable by everyone or the web server user. As new bibliographic styles are created, the WIKINDX team will make these available on the $linkSfWikindx downloads site as plug-ins. Once you have a downloaded file, simply unzip the contents to the styles/bibliography/ directory.");
41define("TEXT3", "If you develop new styles yourself, you are strongly encouraged to contact the WIKINDX developers at $linkSfWikindx to make them available to other users.");
42define("TEXT4", "You can create a new style based on an existing one by copying the existing style. To remove a style from the list available to your users, simply remove that style's directory from styles/bibliography/.");
43// 'Short Name' and 'Long Name' should match the name given in MESSAGES.php style array.
44define("TEXT5", "Each style has a set of options that define the heading style of titles, how to display numbers and dates etc. and then a separate style definition for each resource type that WIKINDX handles. The 'Short Name' is used by WIKINDX as both the folder and file name and for this reason should not only be a unique name within styles/bibliography/, but should also have no spaces or any other characters that may cause confusion with your operating system (i.e. alphanumeric characters only). The 'Long Name' is the description of the style that is displayed to WIKINDX users.");
45// 'generic style' should be whatever you set for $style['generic'] in MESSAGES.php.
46define("TEXT6", "The three 'generic style' definitions are required and are used to display any resource type for which there does not yet exist a style definition. This allows you to build up your style definitions bit by bit.  Furthermore, some bibliographic styles provide no formatting guidelines for particular types of resource in which case the generic styles will provide some formatting for those resources according to the general guidelines for that bibliographic style. Each resource for which there is no style definition will fall back to the chosen generic style. The generic styles try their best but if formatting is strange for a particular resource type then you should explicitly define a style definition for that type. ");
47// Don't translate HTML tags!
48define("TEXT7", "Each style definition has a range of available fields listed to the right of each input box. These fields are <strong>case-sensitive</strong> and need not all be used. However, with some of the more esoteric styles, the more database fields that have been populated for each resource in the WIKINDX, the more likely it is that the formatting will be correct.");
49define("TEXT9", "The formatting of the names, edition and page numbers and the capitalization of the title depends on the global settings provided for your bibliographic style.");
50define("TEXT8", "If the value entered for the edition of a resource contains non-numeric characters, then, despite having set the global setting for the edition format to ordinal (3rd. etc.), no conversion will take place.");
51// 'Editor switch' should be whatever you set for $style['editorSwitchHead'] in MESSAGES.php.
52// 'Yes' should be whatever you set for $style['yes'] in MESSAGES.php.
53define("TEXT10", "The 'Editor switch' requires special attention. Some bibliographic styles require that for books and book chapters, where there exists an editor but no author, that the position occupied by the author is taken by the editor. If you select 'Yes' here, you should then supply a replacement editor field. Please note that if the switch occurs, the editor(s) formatting will be inherited from the global settings you supplied for the author. See the examples below.");
54define("TEXT11", "Tip: In most cases, you will find it easiest to attach punctuation and spacing at the end of the preceding field rather than at the start of the following field. This is especially the case with finite punctuation such as full stops.");
55define("SYNTAX_HEADING", "SYNTAX");
56define("SYNTAX1", "The style definition syntax uses a number of rules and special characters:");
57define("SYNTAX2", "The character '|' separates fields from one another.");
58define("SYNTAX3", "If a field does not exist or is blank in the database, none of the definition for that field is printed.");
59define("SYNTAX4", "Field names are case-sensitive");
60// follows on from above in the same sentence...
61define("SYNTAX5", "and need not all be used.");
62define("SYNTAX6", "Within a field, you can add any punctuation characters or phrases you like before and after the field name.");
63define("SYNTAX7", "Any word that you wish to be printed and that is the same (even a partial word) as a field name should be enclosed in backticks '`'.");
64// Do not translate |^p.^pp.^pages|, 'pages', 'pp.' and 'p.'
65define("SYNTAX8", "For creator lists (editors, revisers, directors etc.) and pages, alternative singular and plural text can be specified with '^' (e.g. |^p.^pp.^pages| would print the field 'pages' preceded by 'pp.' if there were multiple pages or 'p.' if not).");
66define("SYNTAX9", "BBCode [u]..[/u], [i]..[/i] and [b]..[/b] can be used to specify underline, italics and bold.");
67// Do not translate HTML tags!
68define("SYNTAX10", "The character '%' enclosing any text or punctuation <em>before</em> the field name states that that text or those characters will only be printed if the <em>preceeding</em> field exists or is not blank in the database. The character '%' enclosing any text or punctuation <em>after</em> the field name states that that text or those characters will only be printed if the <em>following</em> field exists or is not blank in the database. It is optional to have a second pair in which case the construct should be read 'if target field exists, then print this, else, if target field does not exist, print that'.  For example, '%: %' will print ': ' if the target field exists else nothing if it doesn't while '%: %. %' will print ': ' if the target field exists else '. ' if it does not.");
69// Do not translate HTML tags!
70define("SYNTAX11", "Characters in fields that do not include a field name should be paired with another set and together enclose a group of fields. If these special fields are not paired unintended results may occur. These are intended to be used for enclosing groups of fields in brackets where <em>at least</em> one of the enclosed fields exists or is not blank in the database.");
71// Don't translate <code>|%,\"%\". %|xxxxx|xxxxx|%: %; %|</code> or other HTML tags
72define("SYNTAX12", "The above two rules can combine to aid in defining particularly complex bibliographic styles (see examples below). The pair <br /><code>|%,\"%\". %|xxxxx|xxxxx|%: %; %|</code><br /> states that if at least one of the intervening fields exists, then the comma and colon will be printed; if an intervening field does not exist, then the full stop will be printed <em>only</em> if the <em>preceeding</em> field exists (else nothing will be printed) and the semicolon will be printed <em>only</em> if the <em>following</em> field exists (else nothing will be printed).");
73define("SYNTAX13", "If the final set of characters in the style definition is '|.' for example, the '.' is taken as the ultimate punctuation printed at the very end.");
74define("EXAMPLE_HEADING", "EXAMPLES");
75// Do not translate HTML tags!
76define("EXAMPLE2", "<em>might produce:</em>");
77define("EXAMPLE4", "<em>and, if there were no publisher location or edition entered for that resource and only one page number given, it would produce:</em>");
78define("EXAMPLE9", "<em>and, if there were no publisher location or publication year entered for that resource, it would produce:</em>");
79// don't translate 'editor ^ed.^eds.^ '
80define("EXAMPLE13", "<em>and, if there were no author entered for that resource and the replacement editor field were 'editor ^ed.^eds.^ ', it would produce:</em>");
81define("EXAMPLE15", "Consider the following (IEEE-type) generic style definition and what it does with a resource type lacking certain fields:");
82// don't translate HTML tags
83define("EXAMPLE18", "<em>and, when applied to a resource type with editor and edition fields:</em>");
84define("EXAMPLE20", "Clearly there is a problem here, notably at the end of the resource title. The solution is to use rule no. 10 above:");
85define("EXAMPLE23", "<em>and:</em>");
86define("EXAMPLE25", "Bibliographic styles requiring this complexity are few and far between.");
87// TRANSLATORS end here
88////////////////////////////////////////////////////////////////////////////////////
89// Do not translate these:
90define("EXAMPLE1", "author. |publicationYear. |title. |In [i]book[/i], |edited by editor (^ed^eds^). |publisherLocation%:% |publisherName. |edition ed%,%.% |(Originally published originalPublicationYear) |^p.^pp.^pages|.");
91
92define("EXAMPLE3", "de Maus, Mickey. 2004. An amusing diversion. In <em>A History of Cartoons</em>, Donald D. A. F. F. Y. Duck, and Bugs Bunny (eds). London: Animatron Publishing. 10th ed, (Originally published 2000) pp.20-9.");
93
94define("EXAMPLE5", "de Maus, Mickey. 2004. An amusing diversion. In <em>A History of Cartoons</em>, Donald D. A. F. F. Y. Duck, and Bugs Bunny (eds). Animatron Publishing. (Originally published 2000) p.20.");
95
96define("EXAMPLE7", "author. |[i]title[/i]. |(|publisherLocation%: %|publisherName%, %|publicationYear.|) |ISBN|.");
97define("EXAMPLE8", "de Maus, Mickey. <em>A big book</em> (London: Animatron Publishing, 1999.) 1234-09876.");
98define("EXAMPLE10", "de Maus, Mickey. <em>A big book</em>. (Animatron Publishing.) 1234-09876.");
99
100define("EXAMPLE11", "author. |publicationYear. |[i]title[/i]. |Edited by editor. |edition ed. |publisherLocation%:%.% |publisherName. |Original `edition`, originalPublicationYear|.");
101define("EXAMPLE12", "Duck, Donald D. A. F. F. Y. 2004. <em>How to Make it Big in Cartoons</em>. Edited by M. de Maus and Goofy. 3rd ed. Selebi Phikwe: Botswana Books. Original edition, 2003.");
102define("EXAMPLE14", "de Maus, Mickey and Goofy eds. 2004. <em>How to Make it Big in Cartoons</em>. 3rd ed. Selebi Phikwe: Botswana Books. Original edition, 2003.");
103
104define("EXAMPLE16", "creator, |\"title,\"| in [i]collection[/i], |editor, ^Ed.^Eds.^, |edition ed|. publisherLocation: |publisherName, |publicationYear, |pp. pages|.");
105define("EXAMPLE17", "ed Software, \"Mousin' Around,\". Gaborone: Computer Games 'r' Us, 1876.");
106define("EXAMPLE19", "Donald D. A. F. F. Y. de Duck, \"How to Make it Big in Cartoons,\"Mickey de Maus and Goofy, Eds., 3rd ed. Selebi Phikwe: Botswana Books, 2003.");
107define("EXAMPLE21", "creator, |\"title|%,\" %.\" %|in [i]collection[/i]|%, %editor, ^Ed.^Eds.^|%, %edition ed|%. %|publisherLocation: |publisherName, |publicationYear, |pp. pages|.");
108define("EXAMPLE22", "ed Software, \"Mousin' Around.\" Gaborone: Computer Games 'r' Us, 1876.");
109define("EXAMPLE24", "Donald D. A. F. F. Y. de Duck, \"How to Make it Big in Cartoons,\" Mickey de Maus and Goofy, Eds., 3rd ed. Selebi Phikwe: Botswana Books, 2003.");
110
111		include_once("core/html/MISC.php");
112		include_once("core/messages/MESSAGES.php");
113		$this->messages = new MESSAGES();
114// Start the templating system
115		include_once("core/template/TEMPLATE.php");
116		$this->template = new TEMPLATE('content');
117		include_once("core/messages/UTF8.php");
118		$this->utf8 = new UTF8();
119	}
120// Help page
121	function display()
122	{
123		$this->template->setVar('heading',
124			$this->utf8->decodeUtf8($this->messages->text("heading", "helpStyles")));
125		$this->pString = MISC::aName("top");
126		$this->pString .= TEXT1;
127		$this->pString .= MISC::p(TEXT2);
128		$this->pString .= MISC::p(TEXT3);
129		$this->pString .= MISC::p(TEXT4);
130		$this->pString .= MISC::p(MISC::hr());
131		$this->pString .= MISC::p(TEXT5);
132		$this->pString .= MISC::p(TEXT10);
133		$this->pString .= MISC::p(TEXT6);
134		$this->pString .= MISC::p(TEXT7);
135		$this->pString .= MISC::p(MISC::hr());
136		$this->pString .= MISC::h(SYNTAX_HEADING);
137		$this->pString .= MISC::p(SYNTAX1);
138		$this->pString .= MISC::ol(
139			MISC::li(SYNTAX2) .
140			MISC::li(SYNTAX3) .
141			MISC::li(MISC::b(SYNTAX4) . ' ' . SYNTAX5) .
142			MISC::li(SYNTAX6) .
143			MISC::li(SYNTAX7) .
144			MISC::li(SYNTAX8) .
145			MISC::li(SYNTAX9) .
146			MISC::li(SYNTAX10) .
147			MISC::li(SYNTAX11) .
148			MISC::li(SYNTAX12) .
149			MISC::li(SYNTAX13)
150			);
151		$this->pString .= MISC::p(TEXT11);
152		$this->pString .= MISC::p(MISC::hr());
153		$this->pString .= MISC::h(EXAMPLE_HEADING);
154		$this->pString .= MISC::p("<code>" . EXAMPLE1 . "</code>" . MISC::BR() .
155			EXAMPLE2 . "</code>" . MISC::BR() . "<code>" . EXAMPLE3 . "</code>" );
156		$this->pString .= MISC::p(EXAMPLE4 . MISC::BR() . "<code>" . EXAMPLE5 . "</code>");
157		$this->pString .= MISC::hr();
158		$this->pString .= MISC::p("<code>" . EXAMPLE7 . "</code>" . MISC::BR() .
159			EXAMPLE2 . "</code>" . MISC::BR() . "<code>" . EXAMPLE8 . "</code>" );
160		$this->pString .= MISC::p(EXAMPLE9 . MISC::BR() . "<code>" . EXAMPLE10 . "</code>");
161		$this->pString .= MISC::hr();
162		$this->pString .= MISC::p("<code>" . EXAMPLE11 . "</code>" . MISC::BR() .
163			EXAMPLE2 . "</code>" . MISC::BR() . "<code>" . EXAMPLE12 . "</code>" );
164		$this->pString .= MISC::p(EXAMPLE13 . MISC::BR() . "<code>" . EXAMPLE14 . "</code>");
165		$this->pString .= MISC::hr();
166		$this->pString .= MISC::p(EXAMPLE15 . MISC::BR() . "<code>" . EXAMPLE16 . "</code>" . MISC::BR() .
167			EXAMPLE2 . MISC::BR() . "<code>" . EXAMPLE17 . "</code>" . MISC::br() .
168			EXAMPLE18 . MISC::br() . "<code>" . EXAMPLE19 . "</code>");
169		$this->pString .= MISC::p(EXAMPLE20 . MISC::BR() . "<code>" . EXAMPLE21 . "</code>" . MISC::BR() .
170			EXAMPLE2 . MISC::BR() . "<code>" . EXAMPLE22 . "</code>" . MISC::br() .
171			EXAMPLE23 . MISC::br() . "<code>" . EXAMPLE24 . "</code>");
172		$this->pString .= MISC::p(EXAMPLE25);
173		$this->pString .= MISC::hr();
174		$this->pString .= MISC::p(TEXT8);
175		$this->pString .= MISC::p(TEXT9);
176		$this->pString .= MISC::p(MISC::a("link",
177			$this->utf8->decodeUtf8($this->messages->text("misc", "top")), "#top"), "small", "right");
178		$this->template->setVar('body', $this->pString);
179		return $this->template->process();
180	}
181}
182