Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #17214

    Hi,

    I have found a tutorial, how to highlight author’s comment. Unfortunately I can’t find any similar code parts in CORONA’s files, where I can add this functionality as mentioned in this tutorial at point 9. Hightlight Author’s Comment »».

    I have looked at loop-comments.php and comments.php, but I can’t find any similar to change this.

    I have created my CSS for it:

    .autorkommentar { background-color: #a882bd !important; }

    The tutorials suggests to look in the comments.php for something similar like this:

    <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">

    to replace it with this:

    <li class="<?php if ($comment->user_id == 1) $oddcomment = "authorstyle"; echo $oddcomment; ?>">

    But I cannot find any code like the one I should search for. Can you please help me out? Thanks a lot.

    #94591

    The code won’t work because it’s very limited (just the comments of the user with the id 1 would be affected but it will not work for all other users). However you can try plugins like: http://wordpress.org/extend/plugins/simple-author-highlighter/ or http://wordpress.org/extend/plugins/author-highlight/

    #94592

    thanks, Peter, for the plugin tips.

    But user ID1 would be ok, because I’m the only author at my blog – and in such simple cases I’m always trying to avoid (too many) plugins …

    #94593

    Hi colorit2,

    The same answer I gave here for Newscast should generally work for Corona as well: http://www.kriesi.at/support/topic/highlight-authors-comments-in-newscast

    The individual comment gets a class with the users name added to it which can be styled with css and will only effect that users comments.

    Regards,

    Devin

    #94594

    Hi Devin,

    this has no effect at all, I checked the php files, there’s no possibility set for using “.comment-author-…”

    I’ve checked my user ID, it’s just “1″.

    I have set this CSS, and tried another variant, too:

    .commentlist .comment-author-1 .comment_content {

    background-color: #a882bd;

    }

    #top .commentlist .comment-author-1 .comment {

    background-color: #a882bd;

    }

    but no effect at all … are you sure, that no PHP files need to be changed, too?

    #94595

    I’m not sure what the difference is but on my test install comments have the class name of the author within them ie on here my comments have the class name “Devin” and can be styled specifically.

    If we can inspect the site live I can go further with trying to offer a solution but otherwise I can only go by whats on my end.

    Regards,

    Devin

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Highlight Author’s Comment’ is closed to new replies.