24-Oct-2014, 07:05 PM
Hi,
I added Commentics to my website and thanks to documentation guides each page has it's own separate comment box. But I have a problem with one page - list of articles. This page is loaded dynamically with the while loop. My code:
$q = "SELECT * FROM articles ORDER BY id DESC";
$result = mysqli_query($dbc_connection, $q);
while($list = mysqli_fetch_array($result)){ ?>
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<h2><?php echo $list['title'] ?><br /></h2>
<p> <?php echo $list['header'] ?><p>
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne<?php echo $list['id'] ?>">Read</a>
</div>
<div id="collapseOne<?php echo $list['id'] ?>" class="panel-collapse collapse out">
<div class="panel-body">
<p><?php echo $list['body'] ?></p>
<p>
</p>
</div>
</div>
</div>
</div>
<?php
}
As you can see there's an empty <p> </p> where I would like to paste comment box so each article has it's own. I've read that it's impossible to have more than one per page but I wonder if there's a way to somehow get around this. For example using one of the variables (id, title...) as identifier. But so far nothing seems to work.
Can this be done?
Thanks!
I added Commentics to my website and thanks to documentation guides each page has it's own separate comment box. But I have a problem with one page - list of articles. This page is loaded dynamically with the while loop. My code:
$q = "SELECT * FROM articles ORDER BY id DESC";
$result = mysqli_query($dbc_connection, $q);
while($list = mysqli_fetch_array($result)){ ?>
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<h2><?php echo $list['title'] ?><br /></h2>
<p> <?php echo $list['header'] ?><p>
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne<?php echo $list['id'] ?>">Read</a>
</div>
<div id="collapseOne<?php echo $list['id'] ?>" class="panel-collapse collapse out">
<div class="panel-body">
<p><?php echo $list['body'] ?></p>
<p>
</p>
</div>
</div>
</div>
</div>
<?php
}
As you can see there's an empty <p> </p> where I would like to paste comment box so each article has it's own. I've read that it's impossible to have more than one per page but I wonder if there's a way to somehow get around this. For example using one of the variables (id, title...) as identifier. But so far nothing seems to work.
Can this be done?
Thanks!