1<?php
2
3/**
4 * "mnml-blog" entry template
5 *
6 * It displays the entry and adds comments and navigation elements.
7 *
8 * ATTENTION: this BlogTNG-template is designed for the DowkuWiki-template
9 *            "mnml-blog". It may uses styles out of it and may not work with
10 *            other DowkuWiki-templates!
11 *
12 *
13 * LICENSE: This file is open source software (OSS) and may be copied under
14 *          certain conditions. See COPYING file for details or try to contact
15 *          the author(s) of this file in doubt.
16 *
17 * @license GPLv2 (http://www.gnu.org/licenses/gpl2.html)
18 * @author ARSAVA <dokuwiki@dev.arsava.com>
19 * @link https://www.dokuwiki.org/template:mnml-blog
20 * @link https://www.dokuwiki.org/plugin:blogtng
21 */
22
23?>
24<div class="blogtng_entry">
25<?php
26    //show headline
27    echo "<h1 class=\"hspec\"><a href=\"";
28    $entry->tpl_link();
29    echo "\" class=\"postdate\">";
30    $entry->tpl_created("%Y-%m-%d");
31    echo "</a><a href=\"";
32    $entry->tpl_link();
33    echo "\"> // ".$entry->entry["title"]."</a></h1>";
34    //show entry
35    $entry->tpl_entry(//included
36                      true,
37                      //readmore (where to cut valid)
38                      false,
39                      //inc level
40                      false,
41                      //skip header
42                      true); ?>
43    <div class="clearer"></div>
44    <div class="blogtng_footer">
45        <div class="level1">
46            <?php $entry->tpl_created("%Y-%m-%d @ %H:%M"); ?> |
47            written by <?php $entry->tpl_author(); ?><br />
48            <?php if ($entry->has_tags()) { echo "Tags:"; $entry->tpl_tags(""); } ?>
49        </div>
50    </div>
51    <a id="the__comments"></a>
52    <?php
53    if ($entry->entry["commentstatus"] !== "disabled") {
54        //show existing comments
55        if (!$entry->commenthelper){
56            $entry->commenthelper =& plugin_load("helper", "blogtng_comments");
57        }
58        if ($entry->commenthelper->get_count() >= 1){
59            echo "\n    <div class=\"level2\">\n        <h2 class=\"hspec\">".$entry->getLang("comments")."</h2>\n";
60            $entry->tpl_comments($entry->entry["blog"]);
61            echo "\n    </div>\n";
62        }
63        //show form to leave a comment
64        if ($entry->entry["commentstatus"] !== "closed") {
65            echo "\n    <div class=\"level2\">\n        <h2 class=\"hspec\">Leave a comment…</h2>\n";
66            $entry->tpl_commentform();
67            echo  "        <div id=\"commentform_notes\">\n"
68                 ."            <ul id=\"commentform_notes_left\">\n"
69                 ."                <li>E-Mail address will not be published.</li>\n"
70                 ."                <li><strong>Formatting:</strong><br /><em>//italic//</em>&#160;&#160;<u>__underlined__</u><br /><strong>**bold**</strong>&#160;&#160;<code>''preformatted''</code></li>\n"
71                 ."                <li><strong>Links:</strong><br />[[http://example.com]]<br />[[http://example.com|Link Text]]</li>\n"
72                 ."                <li><strong>Quotation:</strong><br />&#62; This is a quote. Don't forget the space in front of the text: &#34;&#62; &#34;</li>\n"
73                 ."            </ul>\n"
74                 ."            <ul id=\"commentform_notes_right\">\n"
75                 ."                <li><strong>Code:</strong><br />&lt;code&gt;This is unspecific source code&lt;/code&gt;<br />&lt;code [lang]&gt;This is specifc [lang] code&lt;/code&gt;<br />&lt;code php&gt;&lt;?php echo 'example'; ?&gt;&lt;/code&gt;<br />Available: html, css, javascript, bash, cpp, …</li>\n"
76                 ."                <li><strong>Lists:</strong><br />Indent your text by two spaces and use a * for<br />each unordered list item or a - for ordered ones.</li>\n"
77                 ."            </ul>\n"
78                 ."            <div class=\"clear\"></div>\n"
79                 ."        </div>\n"
80                 ."        <div class=\"clear\"></div>\n";
81            echo "\n    </div>\n";
82        } else {
83            echo  "\n    <div class=\"level2\">\n        <h3>Comments are closed</h3>\n"
84                 ."\n    </div>\n";
85        }
86    } else {
87        echo  "\n    <div class=\"level2\">\n        <h3>Comments are disabled</h3>\n"
88             ."\n    </div>\n";
89    }
90    ?>
91</div>
92