This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

form-comments order
#1

Hi,

Very-vey great script. I planned to integrate 1-2 years earlier, but there were some speed issues, but maybe just because I migrated tens of thousands of old comments (I hope now it is fast - 
if not, would you do custom work - caching, if that is possible?). 

I would have 2 questions (I donated :Big Grin), I hope you can help me, and these are not too time-consuming modifications for you. 

1. How can I change the order of the form and the comments? So first: comments, then: comment form. In previous versions, as I remember, there was a way for that. 

I was phisically able to change at  commentics/feltoltes/frontend/view/default/template/main/page.tpl (maybe in a bad way, i am not good at php) But if I  do that, cannot comment: either nothing happens if I click to comment, or I get "form security token is invalid" notice if I mofiy other way. 

Code:
<div id="cmtx_container" class="cmtx_container">
    <?php echo $header; ?>

    <?php if ($maintenance_mode) { ?>
        <h3><?php echo $lang_heading_maintenance; ?></h3>

        <div class="cmtx_maintenance_mode"><?php echo $maintenance_message; ?></div>
    <?php } else { ?>
        

        <?php if ($display_parsing) { ?>
            <div class="cmtx_parsing_box cmtx_clear">
                <div><?php echo $lang_text_generated_in; ?> <?php echo $generated_time; ?> <?php echo $lang_text_seconds; ?></div>
                <div><b>PHP</b>: <?php echo $php_time; ?>s | <b>SQL</b>: <?php echo $query_time; ?>s (<?php echo $query_count; ?> <?php echo $lang_text_queries; ?>)</div>
            </div>
        <?php } ?>

        <?php if ($order_parts == '1,2') { ?>
            <div class="cmtx_comment_section"><?php echo $comments; ?></div>
            <div class="cmtx_form_section"><?php echo $form; ?></div>
        
        <?php } else { ?>
            
        <?php } ?>
    <?php } ?>

    <?php echo $footer; ?>
</div>


(This is important because at version 2.5, it was relatively easily migrate my comments from gentlesource. But at 3.1 it doesn't seem to be possible, admin shows them, but frontend not. So I have to hardcode my old comments to html. Therefore, at Commentics, comments must be first, and then the form. But migration is not I ask for help, because that would be very complicated)

2. I don't ike commenter's name on the header. Can I put it somehow before date, to 

Code:
<div class="cmtx_date_area">
 ?

I am pretty sure I should modify commentics/feltoltes/frontend/view/default/template/main/comment.tpl. 

3. (maybe, not that important): is there a way to be writtten #1, #2.. before comment date, I mean the order of the comment of a page? However, I would only use it if I can specify the number of the first comment (because of the old comments, first comment shoulc be, for example, #92). 

Thanks! Smile
Reply
#2

Hi,

I made it live, it is very great, seems that it will be very good and not slow at all.
Just one more question now that it is on server: was it tested with OPCACHE turned on?
If I turn on OPCACHE at my hosting provider admin area, it doesn't work, script doesn't load, I see nothing. Nothing is written in php_error_log.txt.

Thank you!
Reply
#3

(15-Feb-2018, 04:05 AM)tibor Wrote:  Hi,

I made it live, it is very great, seems that it will be very good and not slow at all.
Just one more question now that it is on server: was it tested with OPCACHE turned on?
If I turn on OPCACHE at my hosting provider admin area, it doesn't work, script doesn't load, I see nothing. Nothing is written in php_error_log.txt.

Thank you!

(backend works with OPCACHE turned on, but frontend not. So maybe it is not a problem of the script. Interesting fact, that my last comment script didn't work with OPCACHE turned on, either. So maybe some problem with my site? But it is just html, only PHP is Commentics.  Or because the extension is .html? )
Reply
#4

Message again - I am sorry. Smile
But I just want to write that" 2. I don't ike commenter's name on the header. Can I put it somehow before date, to - I solved it.
So I would ask help from you only to be the form below the comments.
Thank you!
The OPCACHE problem - it turns out now maybe that it must be a hosting problem, because turning on OPCACHE it only doesn't work if the extension is .html, it works if the extension is .php. Turning off OPCACHE works .html and .php, too.
Reply
#5

I am sorry, it is my last message, but things can change quickly that I installed the script to live server (and I can't delete or edit previous messages).
Hosting provider says the problem can't be theirs, because they did every setup phpinfo works for them in a .html file.
So do you have any idea for the solution? Why frontend only loads with php 5.6, but not with php 5.6+opcache, not with php 7.2, not with php 7.2+opcache. Of course, I can donate again or pay for custom work.
Reply
#6

Doesn't send comments after a while, button doesn't work Sad
Can it be changed to a "simple", not jquery send button somehow? Can ajax, and fancy stuffs be disabled? Smile
Reply
#7

Hi tibor,

Thanks for your donation!

In the admin area, if you go to 'Extensions -> Themes', you can "drag & drop" the order of the Form/Comments.

Is it still the case that you can get OpCache to work when your file extension is .php? If so, I'd say it's a server issue rather than a script issue. One option might be to change the file extension to .php and use .htaccess to rewrite the extension back to .html like below:

Code:
RewriteEngine on
RewriteRule ^(.*).php$ http://exampledomain.com/$1.html [R=301,L]

There's no ability to disable ajax. There must be some type of error preventing it from working. If you provide your URL I'll take a look.

Have you completed the interview?
Reply
#8

Dear Stever,

Thanks for the answer! I don't know how I couldn't find that Smile I spent a lot of time in admin.

301 to .php wouldn't be a soluton, it is an old, big site, deep in the Google, I wouldn't just redirect evertyhing to .php.

Yes, Rewrite engine, and everything is already OK. I am also think that this is a hosting problem. But hosting provider said that that because they could run in .html this:
<?php
echo phpinfo();
?>
for their part, it should be OK, and the script should be the problem. Also, I didn't write that, but it does the same, if I switch to PHP 7.2 (frontend simply not loaded if extension is .html, loaded the very same page if it is .php)

Thanks, I will send a link with the sending error (it just happens after some comments) once, but first of all I will need to figure out this .html + opcache + php 7.2 issue with a developer.
Reply
#9

With the solution I posted, it's not a redirect, it's a rewrite. So if your file is called comments.html, it would still be called comments.html afterwards, it's just that internally it's a PHP file.

Anyway I'll see if I can enable OpCache on my own environment to test. I'll let you know.

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Tim
06-Jan-2021, 08:56 PM
Last Post by Tim
18-Oct-2019, 11:45 AM
Last Post by Gevill
23-Jul-2019, 01:17 AM
Last Post by Wendon
20-Nov-2017, 03:36 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)