Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Anyone? Anyone? Bueller?

    This is from the comment-functions.php – I’m not sure if this is what you’re referring to oriecat, but I couldn’t find a file called “popup-comments template”:

    function comments_popup_link($zero=’No Comments’, $one=’1 Comment’, $more=’% Comments’, $CSSclass=”, $none=’Comments Off’) {
    global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb;
    global $comment_count_cache;

    if (! is_single() && ! is_page()) {
    if (” == $comment_count_cache[“$id”]) {
    $number = $wpdb->get_var(“SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = ‘1’;”);
    } else {
    $number = $comment_count_cache[“$id”];
    }
    if (0 == $number && ‘closed’ == $post->comment_status && ‘closed’ == $post->ping_status) {
    echo $none;
    return;
    } else {
    if (!empty($post->post_password)) { // if there’s a password
    if ($_COOKIE[‘wp-postpass_’.COOKIEHASH] != $post->post_password) { // and it doesn’t match the cookie
    echo(‘Enter your password to view comments’);
    return;
    }
    }
    echo ‘<a href=”‘;
    if ($wpcommentsjavascript) {
    if ( empty($wpcommentspopupfile) )
    $home = get_settings(‘home’);
    else
    $home = get_settings(‘siteurl’);
    echo $home . ‘/’ . $wpcommentspopupfile.’?comments_popup=’.$id;
    echo ‘” onclick=”wpopen(this.href); return false”‘;
    } else {
    // if comments_popup_script() is not in the template, display simple comment link
    comments_link();
    echo ‘”‘;
    }
    if (!empty($CSSclass)) {
    echo ‘ class=”‘.$CSSclass.'”‘;
    }
    echo ‘>’;
    comments_number($zero, $one, $more, $number);
    echo ‘‘;
    }
    }
    }

    I’m a bit of a novice at this – I do maintain my own web site, but this coding is far more complicated that what I use for my site – so, I can’t really make heads or tails of it to see where I should be looking!

    The “default” theme is installed for the most part – I’ve only kept the index.php, wp-config.php, wp-layout.css, and wp-comments.php from the previous version. Is it possible my old files are conflicting with the new “default” theme?

    Thanks for any assistance you may be able to provide!

    Well, I’ve searched the forums, and followed the advice, and I’m having no luck at all. I just want to remove (or edit) whatever code (where-ever it is) that instructs the pop-up comment function to load the page background (which I don’t want loading in the comment window) and side menu (which covers over and hides the actual comment form in the pop-up comment window). I’m completely flummoxed! To see what happens when clicking the “comments” link, here’s the URL to my ‘blog: https://www.marylayton.net/blog/ Any more ideas? Eeee, my brain hurts! ??

    Thread Starter rhiamon

    (@rhiamon)

    How sad is it to answer your own question? LOL! Still, I’m doing it anyway, in case it’s of use to others!

    Under “else :” edit these two lines:

    $exists = $wpdb->get_row(“SELECT * FROM $tablepost2cat WHERE post_id = $post_id AND category_id = 1”);

    and

    if (!$exists) $wpdb->query(“INSERT INTO $tablepost2cat (post_id, category_id) VALUES ($post_id, 1) “);

    It’s the last part of each line that wants editing: in the first line, “category_id=1”, change the number to the number of the specific category you wish the post to be filed under (ie 2 or 3 or 84, or whatever). Do the same in the “$post_id, 1” field on the second line.

Viewing 4 replies - 1 through 4 (of 4 total)