Forum Replies Created

Viewing 15 replies - 1 through 15 (of 38 total)
  • Thread Starter shatterjack

    (@shatterjack)

    Hi James,

    Thanks a lot for your reply, the plugins didn’t make a difference, if I switch to another theme I see the posts so I’m pretty sure it’s the theme, the thing is that the theme is a pretty custom one I kind of scrapped together, and over time I think that some update eventually made it non-functioning. The header and footer appear, just none of the posts of the body. Is there a way to run an older version of wordpress to see if it will work? Or any other suggestion you have would be great. Thanks a lot

    yeah man come on that’s not helpful

    Thread Starter shatterjack

    (@shatterjack)

    Hey Shane thanks for the links but I am looking for the function of style of the facebook comments but not actually importing my facebook comments. That finosforum page shows a link below a post when, if clicked on, expands a list of comments for that post. Anything like that?

    Thread Starter shatterjack

    (@shatterjack)

    when there is an unapproved comment and I approve it in the dashboard, it updates the comment_count automatically for that post, but then if I post to it while I am logged in, it does not update it. What am I doing wrong with that code above? Thanks…

    Thread Starter shatterjack

    (@shatterjack)

    I’ve tried doing an INSERT to add the new comment, and an UPDATE to update the comment_count:

    mysql_query ("INSERT INTO wp_comments(comment_content, comment_author, comment_post_ID) VALUES ('$_POST[commenty]', '$_POST[author]', '$_POST[number_of_the_post]')");
                        mysql_query ("UPDATE wp_posts SET comment_count=comment_count+1 WHERE comment_post_ID = '$_POST[number_of_the_post]'");

    The comment gets added but the comment_count doesn’t increase…

    Thread Starter shatterjack

    (@shatterjack)

    does anyone know how comment_count gets its value?

    did you enable comments in settings?

    Thread Starter shatterjack

    (@shatterjack)

    I have been testing if the comments are being submitted with this code and variations of it. I have solved the string offset error, but now when I click submit, it just returns the same page as before, and no comment shows up. Also I just noticed, when I log in to the dashboard, it says I have 264 comments approved when there are only 11 appearing. When I click on the comments menu item on the left side in dashboard, it says “listing comments 1-200” but only shows they 11 comments that have displayed on the main page. I’m worried that the test comments are being inserted into the database but in the wrong place. How can I check this?

    Here is the latest form code:

    $post_id = $post['post_id'];
                        echo '<form method="POST" action='.$_SERVER['PHP_SELF'].' Comment <input type="text" name="comment"/>';
    
                        if ($user_ID) {
                             echo '<input type="text" name="author" style="display:none" value="$user_login"/>';
                             echo "  ready to comment as $user_login";
                        }
    
                        else echo 'Name <input type="text" name="author"/>';
                        echo '<input type="text" name="post_id" style="display: none;" value="'.$post_id.'"/>';
                        echo '<p><input name="submit_comment" type="submit" id="submit" value="submit" tabindex="5" /></p>';
    
                        if (empty($_POST['submit_comment']) || !(($post_id = (int) $_POST['submit_comment']) > 0)) {
                             # bad comment_ID;
                        }
    
                        if (isset($_POST['submit_comment'])) {
    
                             $_POST[author]=mysql_real_escape_string($_POST[author]);
                             $user_login=mysql_real_escape_string($user_login);
                             $_POST[comment]=mysql_real_escape_string($POST[comment]);
    
                             mysql_query("INSERT INTO wp_comments(comment_author, u.id, comment_content) VALUES ('$_POST[author]','$user_login', '$_POST[comment]')");
                        }
    
                        echo '</form>';

    check this page out about how to delete post revisions. I found that wordpress keeps all the draft versions of a post. There’s a value in the post table of the database for post_type=post for the actual post and draft for the drafts.

    Thread Starter shatterjack

    (@shatterjack)

    i switched method and action accidentally but it still won’t insert the comment. If I use

    action=’.$_SERVER[‘PHP_SELF’].’

    it gives me a fatal error – Cannot use string offset as an array

    for this line: $author[$row[‘user_nicename’]][] = $row;
    which is from an earlier part of the code and works fine until I click to submit a comment. Here is the newest form code:

    $post_id = $post['post_id'];
              echo '<form method="POST" action='.$_SERVER['PHP_SELF'].' Comment <input type="text" name="comment"/>';
    
              if ($user_ID) {
                   echo '<input type="text" name="author" style="display:none" value="$user_login"/>';
                   echo "logged in as $user_login";
              }
    
              else echo 'Name <input type="text" name="author"/>';
              echo '<input type="text" name="post_id" style="display: none;" value="'.$post_id.'"/>';
              echo '<p><input name="submit" type="submit" id="submit" value="submit" tabindex="5" /></p>';
    
              if (empty($_POST['comment_post_id']) || !(($post_id = (int) $_POST['comment_post_id']) > 0)) {
                   # bad comment_post_id;
              }
    
              $sql=("INSERT INTO wp_comments(comment_author, user_id, comment_content) VALUES ('$_POST[author]','$user_login', '$_POST[comment]')");
              echo '</form>';
    Thread Starter shatterjack

    (@shatterjack)

    I can hard-code the form field by inserting the form portion of the comments.php file into my index.php file, but when I click “submit” on the comment, I get a 404 error which says “wp-comments-post.php does not exist”

    Thread Starter shatterjack

    (@shatterjack)

    sorry to bump but I’ve been trying to fix this for almost a month and I’ve gotten nowhere and my posts just get buried…

    Thread Starter shatterjack

    (@shatterjack)

    shoot I was hoping if I posed it as a challenge I might get more responses…

    Thread Starter shatterjack

    (@shatterjack)

    I couldn’t find “have_comments” in my comments.php so I don’t think that’s it. I know it’s going through my comments.php file because I tweaked it and I got an error. It’s just, I don’t think I’m going about doing my page in the way that wordpress likes, and not the way anyone else has done so I’m having a real hard time finding help in past posts. Because I am customizing the order and arrangement of the posts, I have to output them in a similar way and I’ve gotten everything to output eventually except the field to type in your comment and register. It’s very elusive for me!

    Thread Starter shatterjack

    (@shatterjack)

    the thing is that my comments are outputting ok for each post, but just not the field to type in new comments (they were added before I changed my whole theme code around).

Viewing 15 replies - 1 through 15 (of 38 total)