";
- 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 +403,14 @@ class note extends cms {
+END_OF_NAVIGATION;
+ if ($this->failed_captcha) {
+ echo "sorry, reCAPTCHA said you're not human.
";
+ }
+ if (!$this->comments_enabled) {
+ $this->display_comment_link();
+ }
+ echo <<notes/
@@ -387,10 +418,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() {
@@ -410,56 +448,56 @@ END_OF_NAVIGATION;
END_OF_COMMENT;
- }
+ }
echo "
";
}
private function display_comment_form() {
+ $publickey = $this->recaptcha_publickey;
echo <<