Comments Module: Date/Time Format String

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
6/1/2013 9:12:01 PM
Gravatar
Total Posts 216
Community Expert

mojoPortal Hosting & Design @ i7MEDIA!

Comments Module: Date/Time Format String

Hey Joe,

I've been messing around with the comments module lately and I noticed that there is no way to change the date/time format string from the module settings. In the past you've put inputs in the module settings for the blog and similar things to change this. Could you add one for the comments module?

If not, is there a way to set the date/time format string for the comments module in the theme.skin?

I looked in the CommentsConfiguration.cs file and I saw this:

 

private string dateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat.FullDateTimePattern;
public string DateTimeFormat {
     get { return dateTimeFormat; }
}

So I tried something like this:

<portal:CommentsWidget runat="server"
    DateTimeFormat="dd/MM/yyyy"
    />

In the theme.skin but it had no effect. Am I doing something wrong or is that just not something we can change at the moment?

Thanks,
-Isaac

 





 

6/3/2013 2:30:10 PM
Gravatar
Total Posts 18439

Re: Comments Module: Date/Time Format String

Hi Isaac,

I just looked into this and found that the logic for the setting already exists, I just had not added it to the feature definition and created an entry in the resx file for it.

You can make it work now by  adding this in the feature definition file under /Setup/applications/comments/FeatureDefinitions

<featureSetting
            resourceFile="CommentResources"
            grouNameKey=""
            resourceKey="DateTimeFormat"
            defaultValue=""
            controlType="TextBox"
            controlSrc=""
            helpKey="BlogDateTimeFormat-help"
            sortOrder="7000"
            regexValidationExpression=""
            />

Then visit the setup page. The only thing you won't have until the next release is a good label format on the settings page.

Thanks,

Joe

6/3/2013 8:40:46 PM
Gravatar
Total Posts 216
Community Expert

mojoPortal Hosting & Design @ i7MEDIA!

Re: Comments Module: Date/Time Format String

Thanks, that's exactly what I needed.

On another note, it seems that even when you uncheck the "Allow Web Site Url For Comments?" box in the comments module settings the input and label still shows up on the page for the URL.

Also, when the 'Allow comment titles" box is unchecked, it hides the input & label for the title but if you click "edit", the "title" field is still there in the colorbox window that comes up. So you know, I've tested both of those issues on the mojo demo site and it behaves exactly as it does on my installation.

Thanks again for all your hard work!

-Isaac

6/4/2013 2:21:03 PM
Gravatar
Total Posts 18439

Re: Comments Module: Date/Time Format String

These problems should now be fixed in the source code repository and on the demo site, so they will be fixed in the next release.

Thanks,

Joe

6/4/2013 11:05:51 PM
Gravatar
Total Posts 216
Community Expert

mojoPortal Hosting & Design @ i7MEDIA!

Re: Comments Module: Date/Time Format String

Thanks!

You must sign in to post in the forums. This thread is closed to new posts.