ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Conditional styling for comments

September 19, 2012 12:25pm

Subscribe [2]
  • #1 / Sep 19, 2012 12:25pm

    Roi Agneta

    352 posts

    I am working on a site that is a redesign of an existing WordPress site, which includes a blog.  WordPress allows you to differentiate comments made by the blog author, so they stand out from comments made by readers.

    I do not see any obvious way to do this in EE, without resorting to some custom php or JavaScript. Am I missing something?

    Any clever ideas would be appreciated!

    Roi

  • #2 / Sep 21, 2012 1:27pm

    Shane Eckert

    7174 posts

    Hey Roi,

    Yikes! WordPress conversion! I actually really enjoy doing that, it’s fun.

    This could be done with conditional logic, like ...

    {if username == "ragneta"} show CSS to highlight entry[/if]

    and used with something slick like Threaded Comments could make for a really nice comment system.

    Or just go with Disqus. So many headaches avoided with that service. Love it.

    I hope this helps get you started.

    Cheers,

     

  • #3 / Sep 21, 2012 2:25pm

    Roi Agneta

    352 posts

    Hey Shane, thanks for the reply.  I did not want to use the username, since there are a number of bloggers and did not want to hard code for each one of them.  Having said that, I assume your idea could be altered to check the member_group to apply conditional styling.  Thanks!

    I have been looking at Disqus and just about to use it on a project for the first time.  Good to hear that others have had success with it - looks like an awesome solution.

    Best

    Roi

  • #4 / Sep 24, 2012 3:02pm

    Dan Decker

    7338 posts

    Hi Roi,

    Indeed, the conditional can check for member group(s) as well.

    I’m glad you like the suggestion of Disqus.

    If you have any other questions, please let us know!

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases