+
- notes/
+END_OF_NAVIGATION;
+ if (!$this->comments_enabled) {
+ $this->display_comment_link();
+ }
+ echo <<back to notes/
END_OF_NAVIGATION;
}
private function display_comment_link() {
- $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() {
echo "";
}
private function display_comment_form() {
+ $publickey = $this->recaptcha_publickey;
echo <<
-var RecaptchaOptions = {
- theme : 'custom',
- custom_theme_widget: 'recaptcha_widget'
- };
+Recaptcha.create("$publickey",
+ "recaptcha_div",
+ {
+ theme : 'custom',
+ custom_theme_widget: 'recaptcha_widget',
+ callback: Recaptcha.focus_response_field
+ });
END_CAPTCHA_STYLE;
require_once('includes/recaptchalib.php');
- // Trailing slash is necessary for reloads to work
- $url = $this->url . "verify/";
- echo "
-
+ $url = $this->url . "verify";
+ echo "
+
-
+