Viewing 5 replies - 1 through 5 (of 5 total)
  • Define “easy.”

    A quick and dirty php way of working this — could probably do something with javascript, but for that I’d have to do some looking up — add the following code block into the comment form textarea tag (<textarea> <em>here</em> </textarea>) of the comments.php template for your theme:

    <?php
    if(isset($_GET['reply-quote'])) :
    $reply_quote = $_GET['reply-quote'];
    $quote_comment = $wpdb->get_row("SELECT comment_author, comment_content FROM $wpdb->comments WHERE comment_ID = $reply_quote LIMIT 1");

    echo "<blockquote>\n<cite>" .
    $quote_comment->comment_author .
    " said:</cite>\n" .
    apply_filters('get_comment_text', $quote_comment->comment_content) .
    "\n</blockquote>\n\n";
    endif;
    ?>

    And in an appropriate place in the comment loop, if you use default permalinks (/?p=#) on your blog, add this:

    <a href="?<?php echo $_SERVER['QUERY_STRING']; ?>&reply-quote=<?php comment_ID() ?>#postcomment">quote in comment</a>

    If you use custom permalinks, go with:

    <a href="?reply-quote=<?php comment_ID() ?>#postcomment">quote in comment</a>

    Thread Starter injinuity

    (@injinuity)

    Hey thanks for the tip my friend.. I shall try and let you know how successful I was…

    Thread Starter injinuity

    (@injinuity)

    Kafkaesqui,

    Absolutely brilliant my friend. I am implementing it, and its 80% perfect, the only thing is to have the text quoted inside the textarea input box…

    https://www.arrogantly.com/2005/03/24/helloing-again/?reply-quote=8#postcomment

    Thread Starter injinuity

    (@injinuity)

    it works.. it works.. it works.. I had just placed the code, on the wrong line… now its perfect.. I just have to get the mouse focus corrected thats all.. else works perfectly.

    THIS IS SOOOO MUCH EASIER THAN THE THREADED THING…lol

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Reply with quote’ is closed to new replies.