WordPress.org

Ready to get started?Download WordPress

Forums

Author Highlight (12 posts)

  1. Turnip
    Member
    Posted 9 years ago #

    I made a plugin: http://dev.wp-plugins.org/wiki/AuthorHighlight

    If you have any comments let me know on my blog.

  2. whooami
    Member
    Posted 9 years ago #

  3. Turnip
    Member
    Posted 9 years ago #

    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.

  4. Cypher
    Member
    Posted 9 years ago #

    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

  5. Turnip
    Member
    Posted 9 years ago #

    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.

  6. Cypher
    Member
    Posted 9 years ago #

    Hmm..completley missed it the first time around..that's what happens when I read too fast. :)

    Regards

  7. sithicus
    Member
    Posted 9 years ago #

    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?

  8. sithicus
    Member
    Posted 9 years ago #

    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>';} ?>

  9. 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

  • bigbny
    Member
    Posted 9 years ago #

    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.

  • jalenack
    Member
    Posted 9 years ago #

    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

  • Kafkaesqui

    Posted 9 years ago #

    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.

  • virtuallynicky
    Member
    Posted 8 years ago #

    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!)

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags