Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

We store the number of UGC comments on components within a separate system for performance reasons but need to update this when/if an editor deletes a comment from with the Tridion GUI.

My understanding is that there are no specific UGC events within the event system that can be subscribed to so that really only leaves extending the UGC extension itself to provide my own Delete Comment implementation (I've had a dig around and can see a Delete.js under \Tridion\web\WebUI\Editors\UGC\Scripts\Commands) to add an additional call to my own service which can update our external system.

Is it possible to extend UGC in this way?

I'm assuming it would be supported by SDL as Id be leveraging the GUI Extension framework rather than just hacking existing JS files.

share|improve this question

2 Answers 2

It is possible to extend commands in the GUI using a GUI extension please see the Nuno's answer here How to extend a GUI command. In that answer Nuno is extending the Save command but you can apply the same logic for UGC. Remember that since Nuno was extending the standard Save command he was applying the GUI extension to CME you have to apply it to UGC.

share|improve this answer

Indeed you can listen to Delete command, but then you'd have to track UGC item or items if the operation was successfully completed. As other option, you can track the item kind of directly.

If you are using version UGC 2013 GA or above:

1\ You can create extender for DeleteUgcItem command of UGC.svc service. Besides that, you can also listen to SaveUgcItem/SaveUgcNewItem if you need some more data to collect.

2\ You can create ItemType extender of Tridion.UGC.Model.Comment, and extend implementation of onDelete/onDeleteError as well as onSave/onSaveError.

If you are using version below UGC 2013 GA:

.. well I hope you are not using this version. But in this case, I`d go with the solution suggested by Eric.

share|improve this answer
    
As tagged, using version with 2011 SP1 HR1. –  Neil Feb 14 at 13:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.