Jump to:

10845 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Simple Guestbook module

Discuss all other Modules here.

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

Page: 1 2 3 4 5 6 7 8 9 10 11
Go to End
Author Topic: 25680 Views
  • Euphemismus
    Avatar
    Community Member
    82 Posts

    Re: Simple Guestbook module Link to this post

    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

  • Euphemismus
    Avatar
    Community Member
    82 Posts

    Re: Simple Guestbook module Link to this post

    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

  • Bertjan
    Avatar
    Community Member
    4 Posts

    Re: Simple Guestbook module Link to this post

    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

  • Euphemismus
    Avatar
    Community Member
    82 Posts

    Re: Simple Guestbook module Link to this post

    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

  • s!m
    Avatar
    Community Member
    9 Posts

    Re: Simple Guestbook module Link to this post

    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
  • Euphemismus
    Avatar
    Community Member
    82 Posts

    Re: Simple Guestbook module Link to this post

    Hi s!m!

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

    Kind regards,
    Marc

  • vogels
    Avatar
    Community Member
    13 Posts

    Re: Simple Guestbook module Link to this post

    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

  • Euphemismus
    Avatar
    Community Member
    82 Posts

    Re: Simple Guestbook module Link to this post

    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

    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

    25680 Views
Page: 1 2 3 4 5 6 7 8 9 10 11
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.