Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Simple Guestbook module


Go to End


85 Posts   50233 Views

Avatar
Euphemismus

Community Member, 82 Posts

18 June 2010 at 6:16am

Hi Laura,

I've already fixed it ;-) Just wait till the v80 of the trunk appears or checkout directly.
And many thanks for testing! :-) :-) :-)

Kind regards,
Marc

Avatar
Euphemismus

Community Member, 82 Posts

19 January 2011 at 10:52pm

Good morning,

finally some news from me. Since I'm really burried in work for the past month, there wasn't too much new development for the guestbook module.
In december last year, the ReCaptcha was hacked or at least a vulnerability discovered, which allows spam-bots to post a lot of new entries. To quickly delete these in the backend, I'll need to do some refactoring in my data-model - this will be my next "larger project" and the ajax-stuff is postponed.
Also I've opened a maintenance-branch where the current development and bugfixing is taking place.
For all people stuck with ReCaptcha, I've implemented a simple "solution" into the current release which reduced the spam for my sites to around one a day.
Most spammers use mail.ru, gmail.com, yahoo.co.uk. So I've added a custom field to configuration where you can define email hosts to block. Not the best solution, but works (for me). I'm thinking of adding blocking by IP ranges from spamhaus or another provider like this. But implementing will take some time.
And I'm also happy to recieve feedback with other possible solutions ;-)

Kind regards,
Marc

Avatar
Bertjan

Community Member, 4 Posts

1 April 2011 at 8:38pm

Another quickfix is to filter the comment field of a new entry.

I've edit the /guestbook/code/Guestbook.php file.

1. add a new method:
public function contains($str, $content, $ignorecase){
if ($ignorecase){
$str = strtolower($str);
$content = strtolower($content);
}
return strpos($content,$str) ? true : false;
}

2. goto the existing method: public function doSubmitEntry( $data, $form )

3. add after the line $form->saveInto( $entry ); the following code:
/**
* spam check
*/
$stringValue = $entry->Comment;
if($this->contains("http://",$stringValue,true)){
echo "Yes, the comment $stringValue contains a spam message";
Director::redirectBack();
return;
} else {
echo "No, the comment $stringValue contains not a spam message";
}

I've used the string http:// because all spam message contains this string.

Bertjan

Avatar
Euphemismus

Community Member, 82 Posts

2 April 2011 at 8:38pm

Hi Bertjan,

I'll include it into the guestbook & thanks ;-)

// edit
I've added it to the current maintenance branch. If you'd like, you can test it.
Also the mailhost-block & the linkcheck for content-text could be (de-)activated via GB-config

http://svn.aschmann.org/svn/mod_guestbook/branches/maintenance/

Before releasing, I'll add the translations and do some beta-testing on my personal page which is regularly spammed.

Kind regards,
Marc

Avatar
s!m

Community Member, 9 Posts

19 June 2011 at 11:26pm

Edited: 19/06/2011 11:27pm

Hi Euphemismus,

I'vs attached some patches wich address the following problems/ enhancements for the guestbook:
- Enable PHPCaptcha-SpamProtection, useful if you just want an image as captcha, this also adds one language-string.
- Use DataObjectManager instead of ComplexTableField, probably just a personal preference...;)
- Get the right urlParams, as Director::urlParam( 'ID' ) is deprecated and could be replaced by Controller::curr()->urlParams['ID'], now it's also possible to comment on entries on subpages with a hierarchical url-scheme (e.g. example.com/home/guestbook)
- css now also works, if the silverstripe-root is not the webroot (e.g. example.com/silverstripe)
- template-patch, to remove message "delete comment" to display alongside the bin-image

The patches are split into four single patches, packed into one archive.

Regards,
s!m

Attached Files
Avatar
Euphemismus

Community Member, 82 Posts

19 June 2011 at 11:36pm

Hi s!m!

Thanks a lot for the improvements! I'll check into that and add them for the next version :-)

Kind regards,
Marc

Avatar
vogels

Community Member, 13 Posts

2 August 2011 at 8:46pm

Hi Euphemismus.

I'm using your Simple Guestbook module for some time. and it works great for me.

But sice a couple of weeks i have some trouble with spammers... i was reading this tread and saw that you where working on blocking spammers on input (yahoo.com etc.) Dit this work out ? whould like to update my guestbook with something like that.

Furter more i get alot of quiestions from the persons using my guestbook that they would like to add "emoticons" like in MSN messenger (http://messenger.msn.com/Resource/Emoticons.aspx) is this posible?

Regards,

Gijs

Avatar
Euphemismus

Community Member, 82 Posts

2 August 2011 at 9:14pm

Hi Gijs,

I'm already working on a new version based on s!m's changes. This will include some improvements on guestbook-entry handling (dataObject manager) and the integration of the spam protection module PHPCaptcha (which is strangely still not working on my system :( ). Also there's some testing with new Silverstripe versions ahead... which I was avoiding due to a lack of time, lately.
I'm really working to capacity with two rockbands (I'm a bass player) and buying a house with my girlfriend ;)

i get alot of quiestions from the persons using my guestbook that they would like to add "emoticons"

This emoticon-thing is, in my opinion, quite annoying ;) But I could implement something like that with an option to activate/deactivate, using some opensource-smilie set and only covering defaults like : - ), ; - ), : - D and so on.
This will be available with the next release. I'm on vacation right now, so it's really likely to find some time for that :D
whould like to update my guestbook with something like that. 

Your question concerning the Spam-Problems: I've tried a lot of different things and the filtering, supposed by Bertjan seemed to work better than email host filtering. So the current version you can download from the module's homepage should work fine.
But I am not offering any update-service for websites - this is something you'd have to do on your own, installing a new version of the guestbook. Just download the latest guestbook package and replace your current one with it. And don't forget to add any changes you previously made to the CSS :)

Kind regards,
Marc