";
- echo "
$year_posted/$month_posted/$day_posted/$title
";
- if (!$this->comments_enabled) {
- $this->display_comment_link();
- }
- echo $entry['text'];
+ echo "
$this->year_posted/$this->month_posted/$this->day_posted/$this->title
";
+ echo $this->text;
}
private function write_navigation() {
@@ -380,6 +400,11 @@ class note extends cms {
+END_OF_NAVIGATION;
+ if (!$this->comments_enabled) {
+ $this->display_comment_link();
+ }
+ echo <<notes/
@@ -387,10 +412,17 @@ END_OF_NAVIGATION;
}
private function display_comment_link() {
- // somehow I should be checking if there are any first,
- // change to 'comment?'
- $url = $this->url . 'comments/';
- echo "";
+ if ($this->number_of_comments > 0) {
+ $anchor_text = "comments ($this->number_of_comments)";
+ } else {
+ $anchor_text = "comment?";
+ }
+ if (substr($this->url, (strlen($this->url)-1), strlen($this->url)) == '/') {
+ $url = $this->url . 'comments/';
+ } else {
+ $url = $this->url . '/comments/';
+ }
+ echo "";
}
private function display_comments() {
@@ -404,63 +436,79 @@ END_OF_NAVIGATION;
$author = $entry['author'];
$email = $entry['email'];
$text = htmlspecialchars($entry['text']);
+ if ($email == '') {
+ $head = "
$author
";
+ } else {
+ $head = "
";
+ }
echo <<
$author
+
END_OF_COMMENT;
- }
+ }
echo " ";
}
private function display_comment_form() {
+ $publickey = $this->recaptcha_publickey;
echo <<
-
+