Post Reply 
New Comments on first page
13-Jul-2012, 03:41 PM
Post: #1
Tongue New Comments on first page
Hello everyone,

I've used Commentics for a couple months now and it works greatTongue! But on one page i now have more comments then fit on one page. unfortunatly, the newest comment shows on the second page, instead of the oldest one sliding onto that second page. How can i change that?

http://amadeocompositions.com/tutorials.html

Thanks in advance

Aurel
Find all posts by this user
Quote this message in a reply
13-Jul-2012, 04:44 PM
Post: #2
RE: New Comments on first page
Hi,

I think it's just because it's a reply. The replies always appear either underneath the original comment or on the next page if the original comment is the last one on the page. If you submit a new comment (which isn't a reply) then it should appear at the top of the first page and the oldest comment will slide onto the second page as expected.

By the way, the like/dislike and flag buttons aren't working.

Have you completed the interview?
Find all posts by this user
Quote this message in a reply
13-Jul-2012, 05:08 PM
Post: #3
RE: New Comments on first page
It may be because you're using MooTools and there's a conflict with jQuery.

Can you let me know what Commentics version you're on.

Have you completed the interview?
Find all posts by this user
Quote this message in a reply
14-Jul-2012, 11:46 AM
Post: #4
RE: New Comments on first page
Thanks Steven,

I should have noticed that it's a reply -.- sorry bout that...

Under Reports->version it says 1.6 installed in september - They do not work indeed.

Thanks

Aurel
Find all posts by this user
Quote this message in a reply
16-Jul-2012, 05:23 PM
Post: #5
RE: New Comments on first page
Would you mind letting me know if the following works.

In /comments/includes/template/comments.php

Find this:

Code:
<?php if ($settings->show_like || $settings->show_dislike) { ?>
<script type="text/javascript">
// <![CDATA[
$(function() {
$(".vote").click(function()
{
var id = $(this).attr("id");
var name = $(this).attr("name");
var dataString = 'id='+ id ;
var parent = $(this);

if (name == 'up') {
$.ajax({
type: "POST",
url: "<?php echo $path_to_comments_folder . "vote.php?type=up"?>",
data: dataString,
cache: false,

success: function(html) {
parent.html(html);
}
});
} else {
$.ajax({
type: "POST",
url: "<?php echo $path_to_comments_folder . "vote.php?type=down"?>",
data: dataString,
cache: false,

success: function(html) {
parent.html(html);
}
});
}
return false;
});
});
// ]]>
</script>
<?php } ?>

<?php if ($settings->show_flag) { ?>
<script type="text/javascript">
// <![CDATA[
$(function() {
$(".flag").click(function()
{
var id = $(this).attr("id");
var name = $(this).attr("name");
var dataString = 'id='+ id ;
var parent = $(this);
var proceed = true;

var answer = confirm("<?php echo CMTX_FLAG_CONFIRM; ?>");
if (!answer) { proceed = false; }

if (proceed) {
var text = prompt("<?php echo CMTX_FLAG_REASON; ?>","");
if (text == null) {
proceed = false;
}
}

if (name == 'flag' && proceed) {
$.ajax({
type: "POST",
url: "<?php echo $path_to_comments_folder . "flag.php?reason="?>" + text,
data: dataString,
cache: false,

success: function(html) {
parent.html(html);
}
});
}
return false;
});
});
// ]]>
</script>
<?php } ?>

Replace with:

Code:
<?php if ($settings->show_like || $settings->show_dislike) { ?>
<script type="text/javascript">
// <![CDATA[
var $cmtx_jQuery = jQuery;
$cmtx_jQuery(document).ready(function() {
$cmtx_jQuery(".vote").click(function()
{
var id = $(this).attr("id");
var name = $(this).attr("name");
var dataString = 'id='+ id ;
var parent = $(this);

if (name == 'up') {
$cmtx_jQuery.ajax({
type: "POST",
url: "<?php echo $path_to_comments_folder . "vote.php?type=up"?>",
data: dataString,
cache: false,

success: function(html) {
parent.html(html);
}
});
} else {
$cmtx_jQuery.ajax({
type: "POST",
url: "<?php echo $path_to_comments_folder . "vote.php?type=down"?>",
data: dataString,
cache: false,

success: function(html) {
parent.html(html);
}
});
}
return false;
});
});
// ]]>
</script>
<?php } ?>

<?php if ($settings->show_flag) { ?>
<script type="text/javascript">
// <![CDATA[
var $cmtx_jQuery = jQuery;
$cmtx_jQuery(document).ready(function() {
$cmtx_jQuery(".flag").click(function()
{
var id = $(this).attr("id");
var name = $(this).attr("name");
var dataString = 'id='+ id ;
var parent = $(this);
var proceed = true;

var answer = confirm("<?php echo CMTX_FLAG_CONFIRM; ?>");
if (!answer) { proceed = false; }

if (proceed) {
var text = prompt("<?php echo CMTX_FLAG_REASON; ?>","");
if (text == null) {
proceed = false;
}
}

if (name == 'flag' && proceed) {
$cmtx_jQuery.ajax({
type: "POST",
url: "<?php echo $path_to_comments_folder . "flag.php?reason="?>" + text,
data: dataString,
cache: false,

success: function(html) {
parent.html(html);
}
});
}
return false;
});
});
// ]]>
</script>
<?php } ?>

Have you completed the interview?
Find all posts by this user
Quote this message in a reply
16-Jul-2012, 09:55 PM
Post: #6
RE: New Comments on first page
I did as you said, but it didn't change anything... I don't know much about php, so maybe i made a mistake, but i don't think so!
Right now the comments.php on the server is the one with the correction, but it doesn't make a difference. I did however comment out the mootools part, and that made it work. But as soon as mootool is back on it screws it up ;/

Thanks for you efforts

Aurel
Find all posts by this user
Quote this message in a reply
17-Jul-2012, 05:17 PM
Post: #7
RE: New Comments on first page
I managed to replicate your setup. I tried a few workarounds but the only way that I could resolve it was to load jQuery after MooTools. This may be something which you could try.

If it doesn't work, it seems logical to disable the features in Layout -> Comments -> Enabled:

"Like"
"Dislike"
"Flag"

Have you completed the interview?
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  How to automatically make a new page. Hobittual 1 331 26-Mar-2013 09:13 PM
Last Post: Steven
  Notifications about new comments for Admin lol 2 496 13-Mar-2013 10:17 PM
Last Post: lol
  Cannot post comments archangeljess 1 630 14-Feb-2013 02:30 PM
Last Post: Steven
  Page id ""page one m1155 2 1,027 22-Dec-2012 04:32 PM
Last Post: m1155
  Delete old comments besric 7 1,328 29-Nov-2012 10:14 PM
Last Post: besric
  Smilies and bb not showing on comments ppiper 1 469 22-Nov-2012 03:06 PM
Last Post: ppiper
  Page distinction? kustungu 3 943 22-Oct-2012 06:58 PM
Last Post: Steven
  Subscriptions: 1) Why re-activate function and 2) How subscribe to specific comments nilsingvarsson 7 1,276 10-Oct-2012 09:32 AM
Last Post: nilsingvarsson
  Form and comments Display cruiseman 2 748 05-Sep-2012 10:32 PM
Last Post: cruiseman
Bug Page loading stops after comment submission useful4u 3 1,119 14-Jul-2012 06:18 AM
Last Post: useful4u

Forum Jump:


User(s) browsing this thread: 1 Guest(s)