Fork me on GitHub

News module 2.4.1 and "comments" setting  Bottom

  • I'm not sure if I am missing something, but if I tag a news item as being able to add a comment, no comment input boxes appear. Is there something I should be adding?

    Marc
  • You must enable the EZComments hook for News if you have not done that already (commenting is only with EZComments). The checkbox is mostly there to prevent articles from being commented on, since commenting is on by default.
    You can switch of commenting for a specific article when you want that.

    See also http://code.zikula.org/ezcomments/wiki/installation



    edited by: espaan, datetimebrief

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • Thanks for the help.

    Is there a way to program the code so that when a comment is added that the author of the comment is shown under the subject line rather than on the right hand side of the comment? It would be great if the comments were formatted the same way as the news articles where the poster's name is show under the subject line. This would be more consistent with the format of the news module.

    When a comment is longer in length, the scroll bars come up and it looks a little untidy. It would also be preferable that the wording follow the same format at the news article submitter where it says: "Posted by Admin on Jul 04, 2009 - 11:26 AM" This seems a little more eloquent that the wording of the comment: "Author: Admin Jul 05, 2010". As you can also see in the example, I posted a comment for another person and in this case am not the "author" of the comment but rather the person who "posted" the comment. The avatar should also not show in this section as it takes up too much space and also makes the comment section look untidy.

    You can see an example of this here: http://www.musiqueancienne.org/NotaBene/index.php?module=News&func=display&sid=12

    The news module is a wonderful module. I make quite extensive use of it here: http://EarlyMusicNews.org (I know, the theme needs to be improved considerably, but I still have to move it to Zikula 1.1.2)



    edited by: marc@marcpare.com, datetimebrief
  • Hi, the template used for the comments is in EZComments. You can find it in ezcomments/pntemplates/Standard/ezcomments_user_view.htm and the style.css there.

    You can place a copy of this template in YOURTHEME/templates/EZComments/TEMPLATESETNAME/ezcomments_user_view.htm and the style sheet there.
    By default the templatesetname is Standard as you see above in the default EZComments template. You can then modify this template into whatever you like. It requires some knowledge on CSS as well, since the author column is floated to the right (see .ezc_info -> float:right in style.css).

    Maybe a set of templates that would mimic the default styling of News would not be a bad idea anyway. I don't use avatars for instance on my site, so I could also use a "smaller" styling.

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • Thanks for the note. I placed the files in my theme folder but it didn't seem to make a difference. I have modified the ezcomments_user_view.htm and the style.css and this seems to work just as well. I'm using the naturalist theme.

    The only thing that I was wondering about is how to close the gap (space) between the "Posted by ... " and comment body. Would you have a suggestion as to how to do this?

    I have also removed the "Add a comment" line as the input fields show when you are logged in anyway.

    Yes, it would be nice if there were a set of templates that would mimic the default styling of News.

    BTW ... the date posted in the "Posted by .... Jul 5 2010" shows an incorrect date but if I remove the "pndate format from the line "$comment.date|pndate_format" returns the right date but with the "hours:sec:minutes" which is too much information. Not sure if this is something I did. Is there a way to get the right date but without the time (hour ....) attached to it?
  • The gap between posted by and the body is probably there since there is a min-height of 100px for the ezc_info style. Try to comment that out /* .. */ or removing it.

    For the dateformat, there have been changes in that area going to 1.2.0.
    $comment.date|pndate_format:'%b %d %Y' might do the trick.

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • Thanks for the help. Works great.

This list is based on users active over the last 60 minutes.