Extension talk:Guestbook

Who marked the extension Abandoned?
--Mcmilk 21:56, 17 April 2010 (UTC)
 * it just works...why should I change it ?

Feature Request
Hey, I was wondering if there was a way to change the name of the guestbook on my personal wiki page. I'm trying to make an endorsement page for an organization that I run, and want to use the guestbook extension as an endorsement page, however I would like to change then mane from "guestbook" to "endorsements"
 * No problem, just do it ;)--Mcmilk 21:56, 17 April 2010 (UTC)

This is great, do you think it could be set up to make a questbook for each talk page?

Hi, i have problem with your goestbook. When i click on reply icon, it shows "no such special page"

- You need to adjust the following in your gbook.php: $GetRequestSeperator = "& a m p ;"; Without the spaces.. --KnusperGilb 10/04/2009

- User:Esteiger: another solution is to implement url rewriting such as described on Page_Title_--_.htaccess

Hi, (0.12a) I have a problem with my guestbook pages ; I deleted 1st-2nd message and I have 3-4-5-6-7-8-9-10 mess on page0 / 3-4-5-6 mess on page1 / 7-8-9-10-11-12 mess page2.

You can add these lines to you code :

line 359 : $b_change=$this->text('b_change'); and replace line 388 $moderate .= ""; by $moderate .= "";
 * Paul.D

XSS Lücke:
HTML Injection ist in diesem Formular möglich. Einfach folgendes in z.B "name:" eingeben und return drücken:

http://www.mcmilk.de/wiki/?title=Special:Guestbook&action=add

Code:

">

Help
I can't use the tools or the reply function please help. Thanks [mailto:webmaster@mymathnotebook.com webmaster@mymathnotebook.com]
 * Could you include more detail please? Also, this may be a better place to ask.  Mønobi 23:14, 24 February 2008 (UTC)

- see solution above. --KnusperGilb 10/04/2009

Edit and Reply Buttons do not function
I'm running version 1.12 of MediaWiki and when you click on either of the two buttons on a post you get this message:

'''No such special page

You have requested an invalid special page.

A list of valid special pages can be found at Special:Specialpages.

I have rechecked that the files are in their proper places and so forth, I am assuming that there is some PHP code wrong?

TeraS

- see solution above. --KnusperGilb 10/04/2009

Solution was to change my wiki to short URLs and then it works fine...

TeraS

Captcha does not work
although I have the gd installed and working the captcha das not show. What can I do know --DaSch 15:22, 14 December 2008 (UTC)
 * by now the captcha is working, there is a picture displayed, but there are no numbers or characters --DaSch 20:53, 16 December 2008 (UTC)

Blocking users with the built-in $wgUser->isBlocked function
To ensure blocked users or IP addresses cannot edit/post in the guestbook you can add the following few easy lines to 2 files in the extensions/guestbook folder. I used version 0.13 of the extension.

First backup the $wiki/extensions/guestbook/gbook.php and gbook.i18n-en.php files.

Then open gbook.php within a text editor and replace the following block of text:

function ParseUserInput { require_once("captcha-class.php"); global $wgRequest, $want_captcha; /* we are called the first time */

with the following block of text:

function ParseUserInput { require_once("captcha-class.php"); global $wgRequest, $want_captcha; // following if statement was added by moorej 31st Aug 2010 to ensure blocked users cannot use guestbook global $wgUser; if ( $wgUser->isBlocked ) { $this->error($this->text("err_blocked")); return; }  /* we are called the first time */

Then open gbook.i18n-en.php and replace the following block of text:

'err_captcha'    => "Sorry, the captcha is epmty!" );

with the following block of text:

'err_captcha'    => "Sorry, the captcha is epmty!", 'err_blocked'    => "Sorry, you are not permitted to edit this guestbook!" );

Upload the files to the server.

Test. You can block your own IP address and Username for 2 hours as part of the test unless you have multiple IPs to play with. To block users and IPs browse to your Special:Block page. Any questions email me at james at futureofmankind dot co dot uk

Blocking spam specified by $wgSpamRegex global variable
Hi I have modified this extension to reject guestbook spam. It will now compare the name, entry, origin, email address and homepage to the $wgSpamRegex global variable that has values usually defined in the localsettings.php file. If there is a match then the submitted guestbook entry will be rejected and a message displayed at the top saying "Sorry, no spam permitted!".

If you want to do the same then simply edit gbook.php and after the following code segment...

 if ($this->gbEntry == "") { $this->error($this->text("err_entry")); return; }

...insert the following code...

 global $wgSpamRegex; if ( $wgSpamRegex ) { if ( preg_match( $wgSpamRegex, $this->gbName ) || preg_match( $wgSpamRegex, $this->gbEntry ) || preg_match( $wgSpamRegex, $this->gbOrigin ) || preg_match( $wgSpamRegex, $this->gbEmail ) || preg_match( $wgSpamRegex, $this->gbHomepage ) ) { $this->error($this->text("err_spam")); return; } }
 * 1) 05/10/2010 MooreJ - Run everything through $wgSpamRegex if it has been specified

Then you can specify your error message in the gbook.i18n-en.php by locating the following line...

 'err_captcha'    => "Sorry, the captcha is empty!"

...then insert the following line just after it...

 'err_spam'	 => "Sorry, no spam permitted!"

So the last 9 lines or so might look like this:

 'err_name'       => "Sorry, your name is needed!", 'err_entry'      => "Sorry, your entry seems empty!", 'err_noentry'    => "Sorry, this entry doesn't exist!", 'err_captcha'    => "Sorry, the captcha is empty!", 'err_spam'	 => "Sorry, no spam permitted!" );

?>

reCaptcha
Hi,

the Captcha didn't work for me, so I used reCaptcha. If you want to see it in action, go here: http://mietek-pemper.de/wiki/Spezial:Guestbook?action=add

Some information about reCaptcha:
 * ReCAPTCHA
 * http://code.google.com/intl/de-DE/apis/recaptcha/docs/php.html
 * https://www.google.com/recaptcha

Perhaps you would like to implement this in the official software as it causes less problems. --MartinThoma 15:42, 18 February 2011 (UTC)

...extract the archiv and delete it...
I tried to extract it. I got an error:


 * Der Befehl "tar" ist entweder falsch geschrieben oder kann nicht gefunden werden (The command either was typed wrong or can't be found)

The OS is Windows 7. Why is this file packed in such an exotic file format? --Wgkderdicke 20:35, 28 March 2011 (UTC)

2 Guestbooks
Hello,

I successfully installed one guestbook. Is it possible to run 2 guestbooks in one MW Installation?

Your Help is highly appreciated.

....

I figured it out myself (with some help from Tino):


 * 1) rename the gbook folder to gbook2
 * 2) rename gbook.php into gbook2.php
 * 3) rename the language files from "gbook.i18n-**.php" to "gbook2.i18n-**.php"
 * 4) rename the 2 png files from gbook_reply.png to gbook2_reply.png and gbook_tool.png to gbook2_tool.png
 * 5) rename the css file from gbook.css to gbook2.css
 * 6) open gbook2.css and change line 2 from gbook to gbook2
 * 7) open gbook2.php and search / replace everything from "guestbook" to "guestbook2" and from "gbook" to "gbook2"
 * 8) open the language files and change line 56 from "Guestbook" to "Guestbook2"
 * 9) upload everything to your extensions/gbook2/... folder
 * 10) point to your url: http://www.domain.tld/w/index.php/Spezial:Guestbook2

Note: If you get trouble with css, just copy gbook.css into /gbook2/ folder and gbook2.css into /gbook/ folder. Dont know why I had trouble there, but this works for me.

Doing the same to gbook3.php and so on you can build thousands of guestbooks on one mediawiki installation if needed.

That's it :)

--Mcmilk (talk) 15:09, 3 June 2012 (UTC)
 * since version 0.14 multiple guestbooks are supported out of the box ;)

Y-m-d @ H:6:s
Hello,

$ts=date("Y-m-d @ H:m:s", $obj->gb_timestamp); always gives out "Y-m-d @ H:6:s"

So evewn if it is 13:23 or 17:45 it gives out the correct Hour but the fals minute. What can i do?