Whoops. Forgot to ask about that. Then, you're stuck with the $xwiki.search() method. Looks something like this: #set($hql = "from BaseObject as obj, LargeStringProperty as s where obj.className = 'XWiki.XWikiComments' and obj.id = s.id.id") #foreach($comment in $xwiki.search($hql)) #foreach($field in $comment) #if($velocityCount == 1) $field.name #else $field #end #end #end The class names from the xwp_classtype queries I gave you are the ones that you need to use in HQL, which is an SQL-like syntax on the object hierarchy persisted by Hibernate. I think the results are easier to deal with using groovy, but haven't done that lately. There's a better way, I think, than simply counting the fields and working on the values, but I've forgotten it if I ever knew. Of course, once you've found them, you have to remove them from their respective documents, which is something I haven't done, but I think it's XWikiDocument.addObjectsToRemove(Object) and then Document.saveDocument(). brain[sic]
-----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Tuesday, October 17, 2006 10:22 AM To: [email protected] Subject: RE: [xwiki-users] delete spam comments
Hi, Brian, Thanks a lot. My site is on Xwiki.com, can I do all these steps? Is there a way just to stop showing comments right now? Wei-hsing