Forum Replies Created

Viewing 15 replies - 256 through 270 (of 271 total)
  • Forum: Plugins
    In reply to: Comment Leader Hack

    MtDew, do you write all the hacks around here? πŸ˜‰ Or just know everything? ‘Cuz you are all over the board helping everyone. What a guy! =)
    Thanks for all your help!

    Forum: Plugins
    In reply to: Comment Leader Hack

    I love this hack. I would like to make som modifications to it, but I’m unsure how. I’d like my output to look like this:
    Jess – 184 total
    last commented: (date of last comment)
    on entry: (entry title last commented on w/link to entry)
    Is there a way to do this?

    Ah. Okay. Now I am starting to get the hang of some of this. Can anyone suggest any good reads that would help me learn more about PHP and how it works? I know the very basics, but would love to learn more.
    And thanks MtDew! You have been a life-saver!

    Ugh. And by adding it to the SELECT query, this is something I need to do within the database? I’m sorry, I feel so stupid. I’m just so new at SQL.

    I’m placing it under this line:
    foreach ($comments as $comment)
    This is what the whole thing looks like:
    function get_recent_comments($no_comments = 6, $comment_lenth = 10, $before = ”, $after = ‘
    ‘) {
    global $wpdb, $tablecomments, $tableposts;
    $comments = $wpdb->get_results(“SELECT ID, comment_ID, comment_content, comment_author FROM $tableposts, $tablecomments WHERE $tableposts.ID=$tablecomments.comment_post_ID ORDER BY $tablecomments.comment_date DESC LIMIT $no_comments”);
    $output = ”;
    foreach ($comments as $comment) {
    $comment_author = stripslashes($comment->comment_author);
    $comment_author_url = stripslashes($comment->comment_author_url);
    $comment_content = strip_tags($comment->comment_content);
    $comment_content = stripslashes($comment_content);
    $words=split(” “,$comment_content);
    $comment_excerpt = join(” “,array_slice($words,0,$comment_lenth));
    $permalink = get_permalink($comment->ID).”#comment-“.$comment->comment_ID;
    $output .= $before . ‘‘ . $comment_author . ‘: ‘ . $comment_excerpt . ‘…
    $output .= ‘” title=”View the entire comment by ‘ . $comment_author . ‘”>’ . (read) . ‘‘ . $after;
    }
    echo $output;

    I am trying to make one last tweak to this hack. I want the comment author link to show up, linked to the comment author’s name and then the excerpt of the comment to follow. I’ve added the following line:
    $comment_author_url = stripslashes($comment->comment_author_url);
    And for my output I have:
    $output .= $before . ‘‘ . $comment_author . ‘: ‘ . $comment_excerpt.’…
    $output .= ‘” title=”View the entire comment by ‘ . $comment_author.'”>’ . (read).’‘ . $after;
    And while a link is showing up, it’s not the link to the comment author’s page. Any ideas on how I can fix this?
    Thanks,
    Daisyhead

    Thank you Allusion. I can never seem to find what I want in the Wiki. =(
    -Daisyhead

    Thread Starter daisyhead

    (@daisyhead)

    It sure did work. Thanks GamerZ! =)
    -Daisyhead

    Forum: Fixing WordPress
    In reply to: Comment links

    What if you’re not using B2? I would like to change my comment orders as well from ascending to descending. Any clues on how I can do this?

    Thanks! I’m still having problems with tweaking it, but I’m going to try tomorrow when I’m not so freaking tired.
    -Daisyhead

    Forum: Plugins
    In reply to: WordPress Blogs Stats

    I must be dense because I can’t get it to work. I’ve uploaded the file “wp-stats.php” to my folder but don’t I need to call it in my template?
    Thanks,
    Daisyhead

    Forum: Plugins
    In reply to: Recent Posts

    Thank you so much for the help! I implemented it and it works like a dream! I am really loving WP!

    Forum: Plugins
    In reply to: Recent Posts

    Any idea how to use this so it will display the recent posts that have scrolled off the main blog page?
    Thanks,
    Daisyhead

    Can anyone help a novice like myself tweak the output of this. I’d like a little exerpt of the comment followed by 3 elipses and then “(g0)” linked with the link for the entry. Unfortunately I’m still learning PHP so I have no clue how to tweak it so my output looks different.
    Thanks,
    Daisyhead

    Oops! I just figured it out. I guess I should have taken the time to scour the Internet first. πŸ˜‰
    -Daisyhead

Viewing 15 replies - 256 through 270 (of 271 total)