Hot answers tagged

11

I think only with settings is impossible to mantain the line breaks in the textarea. The exactly point where the line breaks are cleaned is the class "Jsoup.clean" in the validation of the input text to avoid XSS (Cross Site Scripting) Jsoup.clean(comment.getContent(), UGCConfigurationLoader.getCommentWhiteList()); in the service where the comments are ...


8

It might be easier to use the installation scripts to generate a new UGC database and simply drop (backing up first of course :)) the old db all together?


7

My understanding is that Excel supports oData natively. I think that you just need to provide the oData endpoint for UGC in order to get the UGC data like comments and ratings (item stats) into Excel.


6

Both dates are way out of range for Unix dates. 1446786426000 = Sat, 02 Nov 47816 06:20:00 GMT; and -62135596800000 = Invalid Date Have a look at where they were generated or how they were formatted. If you drop the "000" from the end of both dates then they become valid: 1446786426 = Fri, 06 Nov 2015 05:07:06 GMT and -62135596800 = Mon, 01 Jan 1 00:00:00 ...


5

Q1. Does UGC have a delivery-side API? UGC does not appear to have a documented API (I couldn't find one on SDLTridionWorld or within SDLLiveContent), other than a predefined set of server control tags. These can be found in the online documentation here. For example: <ugc:Comments runat="server" OrderDescending="true"> <ugc:ForEachComment ...


5

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.


4

You need to take it slowly and test first with saving comments from the GUI. Save a comment for a page in the GUI. Check the UGC WebService logs and check if anything is logged at current time. If nothing is there, you need to remove the WebDav handler from your UGC WebService webApp. If something is logged but it seems to just hang, make sure you have ...


4

Please try using emailAddress instead of email: <ugc:ContextVariable runat="server" Var="ugcComment.user.emailAddress"/> Hope this helps.


4

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 ...


4

For examples you gave, using DataExtenders would be probably an easiest solution. "Usual" data extenders behavior was added in UGC 2013 GA


4

If you prefer server-side solution, you could do as following (in .net): <% DateTime commentCreateionDate = (DateTime) Tridion.ContentDelivery.UGC.Web.UI.When.EvaluateVariable("ugcComment.CreationDate", HttpContext.Current); %> // add your desired format <% =commentCreateionDate.ToString("dd MM yyy") %>


4

To give format to the date fields in UGC we usually use the following code using javascript: <script type="text/javascript"> var date = "<tcdl:ContextVariable var="ugcComment.creationDate"/>"; var d = new Date(date.replace(/CES?T/," ")); var curr_date = ('0' + d.getDate()).slice(-2); var curr_month = ('0' + (d.getMonth() + 1))...


3

UGC comments can be bound to Pages and Components, so indeed as you already found, there is no OOTB support for commenting on a Comment, since the Comment is not a item in the API to which you can bind a Comment. I wouldn't directly have an idea on how you could easily implement this at the moment.


3

I would strongly advise against modifying the UGC database. As well as invalidating your support agreement, the UGC database is no longer separate in Tridion 2013, and the upgrade script may fail to work, or you may lose your custom data. If you need additional information, then I would suggest you store this in a separate database (or similar) With ...


3

You can configure RatingMinimum and RatingMaximum values for specific dataSource in DataSources.xml file. 5 starts does not necessarily mean rating of 5 possible points. It just indicates maximum rating value. If RatingMaximum configured as 10, the 5 starts will indicate rating of 10. From your example I can assume that maximum rating is configured as 6 (5/...


3

Okay, so the reason why I was getting the above error was because I used ugc_taglib.jar from hotfix #2 and the remaining jars from 2011 SP1. Once I replaced all the jars from the hotfix, the error is gone.


3

I noticed that, when you open the filter options, and select the publications where comments are added, you will see all comments and ratings for those publications.


3

Looking at the API documentation, you can get the item ratings using the following API call: ItemStatsRetriever.RetrieveItemStats(PageUri) This will return an ItemStats object. The AverageRating property of this is a double. I haven't tested this, but I'd assume, therefore, that this supports decimal values. public double AverageRating { get; set; } ...


2

If you created your Component Template using a DWT Template Building Block, then the ${ syntax will have been stripped in there most likely. To get the original output like this again: <ugc:Choose> <ugc:When test="ugcUser equals ugcComment.User.Id"> <!-- If the user is the comment author, show a form to edit the comment --> <...


2

While in a UGC ForEach loop you can use HttpContext.Current.Items to get the current rendered comment like this: HttpContext.Current.Items["ugcComment"] Hope this helps.


2

I added the class called "WordsSpamFilter" which inherits the SpamFilter class in App_Code folder. The issue resolved when I change the "Build Action" property of my class from "Content" to "Compile". Thanks Meenakshi


2

The problem was from my end. I have a class UGCSpamFilter (implements SpamFilter) that couldn't find email address or username when resubmitting an existing comment. This class should have thrown SpamFilterException but I couldn't find the exception anywhere.


2

There are no events triggered when a UGC comment is posted that you can handle in for example Tridion. However, since you are posting from a web page, you can (and should) handle additional functionality directly from there.


1

I am unable to find UGC_2013.1.0.88319 hotfix in SDL Tridion World. I am also getting the same issue, but can anyone point me to right direction where to get the correct dll that needs to replaced. Note - I am using SDL Tridion 2013 SP1.


1

For future reference, the hotfix mentioned is UGC_2013.1.0.88319, applicable to 2013 SP1.


1

We have contacted SDL support for this, and they provided a hotfix. Once the hotfix (a dll that needs to be replaced on the CM server) is applied, editing works fine.


1

I don't think that web service is meant to be used by you (i.e. it's not a public API). I think you're only supposed to use the UI to moderate/delete the comments. All of the documentation I could find on the matter talks about the web service being needed for the moderation UI -- but not about how you can use it in your own code. To get a definitive ...


1

From your response to my questions in the comments, it seems that you're hoping that ASP.NET will first render ugc:ContextVariable and then update myTest.Val with the result? If so, I'm afraid it doesn't work that way. The user control will not be rendered when you put it as a string variable (how would it know that it isn't just a random string?). It ...


1

By default the UGC database is called Tridion_Ugc so you can open it in SQL Management Studio. There is a USERS table. I think there is a trick to pass the authenticated Audience Manager contact as the user posting the comment (via the Ambient Data Framework), else you only get Anonymous as the user name. You can do this by calling SyncUGCUserWithContact() ...


1

I just gave this a quick try. Apparently if you create a new Group of users and give this group the UGC management right from the Publication security tab, it is not enough for your users to be able to access the Publication node, hence no way to see Comments or Ratings, neither from the UGC node nor from the control room. I was able to enable UGC by also ...


Only top voted, non community-wiki answers of a minimum length are eligible