Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Turnip

    (@turnip)

    whooami, I was aware that this could be easily hacked in (although I wasn’t aware of that post), but I thought it’s just as easy to make a plugin for it, and perhaps those who aren’t so technically inclined will find it easier to do.

    It’s also *way* cleaner.

    Do you do not have any add_filter/add_action commands to invoke your highlight_author function. How does this code get called/executed?

    Is merely activating it from the Plugins page enough?

    Regards

    Thread Starter Turnip

    (@turnip)

    Cypher: Please see the Wiki page for instructions. If they are not clear enough please let me know.

    The code in the plugin is a function. Therefore, it will do its magic wherever that function is called.

    Hmm..completley missed it the first time around..that’s what happens when I read too fast. 🙂

    Regards

    I was trying to figure out how to make scriptygodess author highlight work for more then one author.. basically all i want to do is highlight the comments with different backgrounds depending on the author.. i see how she did it for two when it came to adding a picture.. but i wasn’t sure how to alter this code

    <?php
    $isByAuthor = false;
    if($comment->comment_author_email == ‘YOUR-EMAIL’) {
    $isByAuthor = true;
    }
    ?>

    so it would work with two authors… any help?

    More Information:

    <?php foreach ($comments as $comment) { ?>
    <?php
    if ($comment->comment_author_email == ‘fak1@gmail.com’) {
    echo ‘<img src=”/images/author1.gif” width=”64″ height=”9″>’;
    } else if ($comment->comment_author_email == ‘fake2@gmail.com’) {
    echo ‘<img src=”/images/author2.gif” width=”64″ height=”9″>’;
    }
    ?>
    <li id=”comment-<?php comment_ID() ?>”>
    <?php if($isByAuthor ) { echo ‘<div class=”authorcomment”>’;} ?>
    <?php comment_text() ?>
    <cite><?php comment_type(__(‘Comment’), __(‘Trackback’), __(‘Pingback’)); ?> <?php _e(“by”); ?> <?php comment_author_link() ?> — <?php comment_date() ?> @ “><?php comment_time() ?></cite>
    <?php if($isByAuthor ) { echo ‘</div>’;} ?>

    It seems to me this works fine when it comes to calling seperate images and one class=”” but what if I want seperate class’s for each author.. that is what i’m trying to get all

    What am I missing? Sorry only been using for 1 day, but I cannot find the wp-comments.php file to edit as in your instructions.

    Hey,

    I think that wp-comments.php file refers to an old version of WordPress, 1.2 .

    WordPress 1.5 makes it even easier to highlight author comments. I’ve just written up a draft tutorial on the Codex, perhaps you could test drive it for me?

    http://codex.wordpress.org/User:Jalenack/Comment_Loop_Beauty

    You can post questions/comments here. Thanks

    wp-comments.php was the comments template in WordPress 1.2 and below. For 1.5, look for comments.php in your theme’s directory. If it does not have one, it uses the comments.php in the default theme.

    Ok, no doubt I am being really thick (it’s Monday morning…) but I can’t get this plugin to work. I’m sure I have put the tag within the comments loop, added the correct css and I know I have activated the plugin… but nada!

    There are no errors. Could it be something to do with a tag that allows the comments to be alternate colours? (Using WP2.0… all suggestions gratefully recieved!)

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Author Highlight’ is closed to new replies.