Re: [xwiki-users] Comments spam

2007-09-03 Thread Antonio Goncalves
BTW, why can't I just delete the comments instead of changing the object
type ? I don't mind loosing these comments, can I damage any database key
constraint ?

2007/9/3, Raffaello Pelagalli [EMAIL PROTECTED]:

 Antonio Goncalves [EMAIL PROTECTED] writes:

  Hi,
 
  My XWiki website has been spammed with more than 200 (porn) comments on
 the
  main page. I didn't want to put any access restriction on comments
 thinking
  that the world was a better place and that anybody could comment
 :o)  Well, I
  was wrong and I'm gonna change the user rights.
 
  How can I safely delete all these comments (by hand it will take me
 ages) ?
 
  Thanks,

 Hi,

 An easy way to do that, without loosing anything is to change the object
 type of
 each spam comments.

 For exemple, you can execute something like that on your database server :

 update xwikiobjects, xwikilargestrings set
   XWO_CLASSNAME='XWiki.XWikiComments_spam' where
   XWO_CLASSNAME='XWiki.XWikiComments' and XWL_ID=XWO_ID and
   XWL_VALUE like '%viagra%';

 Best regards,
 --
 Raffaello Pelagalli
 XPertNet - XWiki.com
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Comments spam

2007-09-03 Thread Paul Armstrong
On Mon, Sep 03, 2007 at 05:17:30PM +0200, Antonio Goncalves wrote:
 BTW, is there a functionality to add simple captcha to add comments (like
 1+3=) ?

find dodo -exec grep -i captcha /dev/null {} \;
dodo/captcha.vm:#if ($captchaPlugin)
dodo/captcha.vm:  $captchaPlugin.displayCaptcha(edit,wiki_captcha)
dodo/wysiwyg.vm:#if ($captchaPlugin)
dodo/wysiwyg.vm:  $captchaPlugin.displayCaptcha(edit,wiki_captcha)
dodo/edit.vm:#if ($captchaPlugin)
dodo/edit.vm:  $captchaPlugin.displayCaptcha(edit,wiki_captcha)
dodo/comments.vm:#if ($captchaPlugin)
dodo/comments.vm: $captchaPlugin.displayCaptcha(comment,wiki_captcha)

Paul

-- 
End dual-measurement, let's finish going metric!
http://gometric.us/
http://www.metric.org/

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users