Topic: Comment form above comments

Hello guys!

I'm not a good web programmer, so I have some problems to place the comment form inside a div.

I thought if I put the commentform above comments, I could solve this problem.

I searched the forum but could not find a solution that would help me, I'm quite noob with php!

And besides, my English is not very good. https://cutephp.com/forum/style_emoticons/default/sad.gif

Could anyone help me?

Re: Comment form above comments

Open inc/shows.inc.php and find these lines (580-607) :

        $template_form = str_replace("{config_http_script_dir}", "$config_http_script_dir", $template_form);
    //----------------------------------
    // Check if the remember script exists
    //----------------------------------
    $CN_remember_include = '';
    $CN_remember_form = '';
    if(file_exists("$cutepath/remember.js")){
            $CN_remember_include = "<script type=\"text/javascript\" src=\"$config_http_script_dir/remember.js\"></script><script>CNreadCookie();</script>";
            $CN_remember_form = "onsubmit=\"return CNSubmitComment()\"";
    }


    $smilies_form = "n<script type=\"text/javascript\">
        //<![CDATA[
        function insertext(text){
        document.comment.commentsbox.value+=\" \"+ text;
        document.comment.commentsbox.focus();
        }
        //]]></script>
        <noscript>Your browser is not Javascript enable or you have turn it off. We recommend you to activate, otherwise you will have to enter the emoticons representations manually.
        </noscript>".insertSmilies('short', FALSE);

    $template_form = str_replace("{smilies}", $smilies_form, $template_form);

    echo"<form  $CN_remember_form  method=\"post\" name=\"comment\" id=\"comment\" action=\"\">".$template_form."<div><input type=\"hidden\" name=\"subaction\" value=\"addcomment\" /><input type=\"hidden\" name=\"ucat\" value=\"$ucat\" /><input type=\"hidden\" name=\"show\" value=\"$show\" />$user_post_query</div></form>
                    n $CN_remember_include";

}

Move this code after this :

//################################################################################
####################################
//                 Show Comments
//################################################################################
####################################
if($allow_comments){

3 (edited by 2012-03-03 16:03:01)

Re: Comment form above comments

there's a hack for this
in case the above doesn't work.