Hello XwikiUsers,
Greetings for the day. Need to know the best approach form your experience in Xwiki to implement comment moderation .I could not find any topic in forum related to this . The appoach i've taken is this Initiating a new boolean property isApproved in XwikiComments Class Modifying inlinecomments.vm to have an approve link in similar way to delete I'm getting stuck in the second point being not sure what would be the URL to update that property . Thanks in advance Regards, Anjankumar Panda E-mail Disclaimer: http://www.csscorp.com/common/email-disclaimer.php _______________________________________________ users mailing list [hidden email] http://lists.xwiki.org/mailman/listinfo/users |
Update 1:
For the time being on click of approve link i am redirecting to the object editor where a moderator can change isApproved Property to true and save. Though it is a workaround ,this is not user friendly . Probably a panel showing all un-moderated comment and with a trigger to approve or reject may be the correct way. |
In reply to this post by akp
On 03/22/2011 06:45 AM, [hidden email] wrote:
> Hello XwikiUsers, > > Greetings for the day. > > Need to know the best approach form your experience in Xwiki to > implement comment moderation .I could not find any topic in forum related > to this . > > The appoach i've taken is this > > Initiating a new boolean property isApproved in XwikiComments Class > > Modifying inlinecomments.vm to have an approve link in similar way to > delete > > I'm getting stuck in the second point being not sure what would be the URL > to update that property . You can use: #set($commentIndex = 0) <a href="$doc.getURL('save', "XWiki.XWikiComments_${commentIndex}_isApproved=1&xredirect=$request.requestURL")">Approve</a> If JavaScript is enabled you can prevent the link from triggering and send and AJAX request instead to the same URL, displaying a loading animation while the request is processed. Hope this helps, Marius > > > Thanks in advance > > Regards, > Anjankumar Panda > > > > E-mail Disclaimer: http://www.csscorp.com/common/email-disclaimer.php > > _______________________________________________ > users mailing list > [hidden email] > http://lists.xwiki.org/mailman/listinfo/users users mailing list [hidden email] http://lists.xwiki.org/mailman/listinfo/users |
Hi Marius Thanks . That worked nicely .
|
Hi Marius,
please let me know how do i implement this ajax based , like delete , showing a modal yes, no box and progresses messages in the bottom. |
On 04/21/2011 02:26 PM, akp wrote:
> Hi Marius, > > please let me know how do i implement this ajax based , like delete , > showing a modal yes, no box and progresses messages in the bottom. You can check for instance how comments are removed from a page. You can see the detailed code in https://github.com/xwiki/xwiki-platform/raw/master/xwiki-platform-core/xwiki-platform-web/src/main/webapp/resources/uicomponents/viewers/comments.js . Basically, you use XWiki.widgets.ConfirmedAjaxRequest widget. Hope this helps, Marius > > -- > View this message in context: http://xwiki.475771.n2.nabble.com/Comment-Moderation-Right-approach-tp6195006p6293805.html > Sent from the XWiki- Users mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > [hidden email] > http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list [hidden email] http://lists.xwiki.org/mailman/listinfo/users |
Yes this did help Marius .Thanks . One more Question in this context . Will u kindly help me in knowing where are the texts like core.viewers.comments.commentDeleted are defined and accessed as $msg.get('core.viewers.comments.commentDeleted') ? Now for approval part i have hard coded them in comments.js file which i assume is not the best approach and may have issue in localization and maintenance . |
On 04/22/2011 02:59 PM, akp wrote:
> > Marius Dumitru Florea wrote: >> >> Basically, you use XWiki.widgets.ConfirmedAjaxRequest widget. >> >> Hope this helps, >> > > Yes this did help Marius .Thanks . > > One more Question in this context . > > Will u kindly help me in knowing where are the texts like > core.viewers.comments.commentDeleted are defined and accessed as > $msg.get('core.viewers.comments.commentDeleted') ? This should help http://platform.xwiki.org/xwiki/bin/view/DevGuide/InternationalizingApplications Marius > > Now for approval part i have hard coded them in comments.js file which i > assume is not the best approach and may have issue in localization and > maintenance . > > -- > View this message in context: http://xwiki.475771.n2.nabble.com/Comment-Moderation-Right-approach-tp6195006p6296895.html > Sent from the XWiki- Users mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > [hidden email] > http://lists.xwiki.org/mailman/listinfo/users users mailing list [hidden email] http://lists.xwiki.org/mailman/listinfo/users |
Free forum by Nabble | Edit this page |