1<?php
2
3/**
4 * Content for the citation page
5 *
6 * This file will be imported by the "main.php".
7 *
8 *
9 * LICENSE: This file is open source software (OSS) and may be copied under
10 *          certain conditions. See COPYING file for details or try to contact
11 *          the author(s) of this file in doubt.
12 *
13 * @license GPLv2 (http://www.gnu.org/licenses/gpl2.html)
14 * @author ARSAVA <dokuwiki@dev.arsava.com>
15 * @link https://www.dokuwiki.org/template:monobook
16 * @link https://www.dokuwiki.org/devel:templates
17 */
18
19//check if we are running within the DokuWiki environment
20if (!defined("DOKU_INC")){
21    die();
22}
23
24//detect rev
25$rev = (int)$INFO["rev"];
26if ($rev < 1){
27    $rev = (int)$INFO["lastmod"];
28}
29
30//set permanent URL
31$permurl = DOKU_URL.DOKU_SCRIPT."?id=".getID()."&rev=".$rev; //no wl() here to get absolute URLs working without URL rewriting and stuff
32
33?>
34<h1><a name="bibliographic_details" id="bibliographic_details"><?php echo hsc($lang["monobook_cite_bibdetailsfor"]); ?> &quot;<?php tpl_pagetitle(); ?>&quot;</a></h1>
35<div class="level2">
36  <ul>
37    <li class="level1">
38      <div class="li"><?php echo hsc($lang["monobook_cite_pagename"]); ?>: <?php tpl_pagetitle(); ?></div>
39    </li>
40    <li class="level1">
41      <div class="li"><?php echo hsc($lang["monobook_cite_author"]); ?>: <?php echo tpl_getConf("monobook_cite_author"); ?></div>
42    </li>
43    <li class="level1">
44      <div class="li"><?php echo hsc($lang["monobook_cite_publisher"]); ?>: <?php echo hsc($conf["title"]); ?>.</div>
45    </li>
46    <li class="level1">
47      <div class="li"><?php echo hsc($lang["monobook_cite_dateofrev"]); ?>: <?php echo gmdate("j F Y H:i T", $rev); ?></div>
48    </li>
49    <li class="level1">
50      <div class="li"><?php echo hsc($lang["monobook_cite_dateretrieved"]); ?>: <?php echo gmdate("j F Y H:i T"); ?></div>
51    </li>
52    <li class="level1">
53      <div class="li"><?php echo hsc($lang["monobook_cite_permurl"]); ?>: <a rel="nofollow" href="<?php echo hsc($permurl); ?>"><?php echo hsc($permurl); ?></a></div>
54    </li>
55    <li class="level1">
56      <div class="li"><?php echo hsc($lang["monobook_cite_pageversionid"]); ?>: <?php echo hsc($rev); ?></div>
57    </li>
58  </ul>
59  <p>
60    <?php echo hsc($lang["monobook_cite_checkstandards"]); ?>
61  </p>
62</div>
63
64
65<h2><a name="citation_styles_for" id="citation_styles_for"><?php echo hsc($lang["monobook_cite_citationstyles"]); ?> &quot;<?php tpl_pagetitle(); ?>&quot;</a></h2>
66
67<h3><a name="apa_style" id="apa_style">APA</a></h3>
68<div class="level3">
69  <p>
70     <?php tpl_pagetitle(); ?>. (<?php echo gmdate("Y, M j", $rev); ?>).
71     <?php echo hsc($lang["monobook_cite_in"]); ?> <em><?php echo hsc($conf["title"]); ?></em>.
72     <?php echo hsc($lang["monobook_cite_retrieved"])." ".gmdate("H:i, F j, Y,")." ".hsc($lang["monobook_cite_from"]); ?>
73     <a rel="nofollow" href="<?php echo hsc($permurl); ?>"><?php echo hsc($permurl); ?></a>.
74  </p>
75</div>
76
77<h3><a name="mla_style" id="mla_style">MLA</a></h3>
78<div class="level3">
79  <p>
80     <?php echo tpl_getConf("monobook_cite_author"); ?>.
81    "<?php tpl_pagetitle(); ?>".
82     <em><?php echo hsc($conf["title"]); ?></em>.
83     <?php echo gmdate("j M. Y", $rev); ?>. Web. <?php echo gmdate("j M. Y, H:i"); ?>
84  </p>
85</div>
86
87<h3><a name="mhra_style" id="mhra_style">MHRA</a></h3>
88<div class="level3">
89  <p>
90     <?php echo tpl_getConf("monobook_cite_author"); ?>,
91     '<?php tpl_pagetitle(); ?>',
92     <em><?php echo hsc($conf["title"]); ?></em>,
93     <?php echo gmdate("j F Y, H:i T", $rev); ?>,
94     &lt;<a rel="nofollow" href="<?php echo hsc($permurl); ?>"><?php echo hsc($permurl); ?></a>&gt; [<?php echo hsc($lang["monobook_cite_accessed"])." ".gmdate("j F Y"); ?>]
95  </p>
96</div>
97
98<h3><a name="chicago_style" id="chicago_style">Chicago</a></h3>
99<div class="level3">
100  <p>
101    <?php echo tpl_getConf("monobook_cite_author"); ?>,
102    "<?php tpl_pagetitle(); ?>",
103    <em><?php echo hsc($conf["title"]); ?></em>,
104    <a rel="nofollow" href="<?php echo hsc($permurl); ?>"><?php echo hsc($permurl); ?></a> (<?php echo hsc($lang["monobook_cite_accessed"])." ".gmdate("F j, Y"); ?>).
105  </p>
106</div>
107
108<h3><a name="cbe_cse_style" id="cbe_cse_style">CBE/CSE</a></h3>
109<div class="level3">
110  <p>
111    <?php echo tpl_getConf("monobook_cite_author"); ?>.
112    <?php tpl_pagetitle(); ?> [Internet].
113    <?php echo hsc($conf["title"])?>; <?php echo gmdate("Y M j, H:i T", $rev); ?> [<?php echo hsc($lang["monobook_cite_cited"])." ".gmdate("Y M j"); ?>].
114    <?php echo hsc($lang["monobook_cite_availableat"]); ?>: <a rel="nofollow" href="<?php echo hsc($permurl); ?>"><?php echo hsc($permurl); ?></a>.
115  </p>
116</div>
117
118<h3><a name="bluebook_style" id="bluebook_style">Bluebook</a></h3>
119<div class="level3">
120  <p>
121    <?php tpl_pagetitle(); ?>,
122    <a rel="nofollow" href="<?php echo hsc($permurl); ?>"><?php echo hsc($permurl); ?></a> (<?php echo hsc($lang["monobook_cite_lastvisited"])." ".gmdate("F j, Y"); ?>).
123  </p>
124</div>
125
126<h3><a name="ama_style" id="ama_style">AMA</a></h3>
127<div class="level3">
128  <p>
129    <?php echo tpl_getConf("monobook_cite_author"); ?>.
130    <?php tpl_pagetitle(); ?>.
131    <?php echo hsc($conf["title"])?>.
132    <?php echo gmdate("F j, Y, H:i T", $rev); ?>.
133    <?php echo hsc($lang["monobook_cite_availableat"]); ?>: <a rel="nofollow" href="<?php echo hsc($permurl); ?>"><?php echo hsc($permurl); ?></a>.
134    <?php echo hsc($lang["monobook_cite_accessed"])." ".gmdate("F j, Y"); ?>.
135  </p>
136</div>
137
138<h3><a name="bibtex_entry" id="bibtex_entry">BibTeX</a></h3>
139<div class="level3">
140  <pre>
141 @misc{ wiki:xxx,
142   author = &quot;<?php echo str_replace(",", "{,}", tpl_getConf("monobook_cite_author")); ?>&quot;,
143   title = &quot;<?php str_replace(",", "{,}", tpl_pagetitle()); ?> --- <?php echo str_replace(",", "{,}", hsc($conf["title"])); ?>&quot;,
144   year = &quot;<?php echo gmdate("Y", $rev); ?>&quot;,
145   url = &quot;<?php echo str_replace(",", "{,}", hsc($permurl)); ?>&quot;,
146   note = &quot;[Online; accessed <?php echo gmdate("j-F-Y"); ?>]&quot;
147 }
148  </pre>
149  <p>
150    <?php echo hsc($lang["monobook_cite_latexusepackagehint"]); ?>:
151  </p>
152  <pre>
153 @misc{ wiki:xxx,
154   author = &quot;<?php echo str_replace(",", "{,}", tpl_getConf("monobook_cite_author")); ?>&quot;,
155   title = &quot;<?php str_replace(",", "{,}", tpl_pagetitle()); ?> --- <?php echo str_replace(",", "{,}", hsc($conf["title"])); ?>&quot;,
156   year = &quot;<?php echo gmdate("Y", $rev); ?>&quot;,
157   url = &quot;\url{<?php echo str_replace(",", "{,}", hsc($permurl)); ?>}&quot;,
158   note = &quot;[Online; accessed <?php echo gmdate("j-F-Y"); ?>]&quot;
159
160
161   author = &quot;<?php echo tpl_getConf("monobook_cite_author"); ?>&quot;,
162   title = &quot;<?php tpl_pagetitle(); ?> --- <?php echo hsc($conf["title"]); ?>&quot;,
163   year = &quot;<?php echo gmdate("Y", $rev); ?>&quot;,
164   url = &quot;\url{<?php echo hsc($permurl); ?>}&quot;,
165   note = &quot;[Online; accessed <?php echo gmdate("j-F-Y"); ?>]&quot;
166 }
167  </pre>
168</div>
169
170<h3><a name="talk_pages" id="talk_pages"><?php echo hsc($lang["monobook_cite_discussionpages"]); ?></a></h3>
171<div class="level3">
172  <dl>
173    <dt><?php echo hsc($lang["monobook_cite_markup"]); ?></dt>
174    <dd>[[<?php echo hsc(getID()); ?>|<?php tpl_pagetitle(); ?>]] ([[<?php echo hsc(getID()."?rev=".$rev); ?>|<?php echo hsc($lang["monobook_cite_thisversion"]); ?>]])</dd>
175  </dl>
176  <dl>
177    <dt><?php echo hsc($lang["monobook_cite_result"]); ?></dt>
178    <dd><a rel="nofollow" class="wikilink1" href="<?php echo hsc(wl(cleanID(getId()))); ?>"><?php tpl_pagetitle(); ?></a> (<a rel="nofollow" class="wikilink1" href="<?php echo hsc($permurl); ?>"><?php echo hsc($lang["monobook_cite_thisversion"]); ?></a>)</dd>
179  </dl>
180</div>
181