Experiencing Website Comments Plugin Issues

2 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: July 30, 2012   (RSS)

Re: [steve99] Experiencing Website Comments Plugin Issues

By Jason - July 30, 2012

Hi Steve,

This is actually a "bug" in the theme file. The issue here is that the code is referencing "createdBy.username", which is a pseudo field generated by getRecords(). This field always refers back to the "accounts" section of CMSB.

Try this change:

<?php foreach ($commentsRecords as $comment): ?>
<div class="wsc_comment">

<?php foreach ($comment['attachments'] as $upload): ?>
Attachment: <a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>
<?php endforeach ?><br/>

<?php echo nl2br(htmlspecialchars($comment['comment'])) ?><br/>
<?php $user = mysql_get($GLOBALS['WSM_ACCOUNTS_TABLE'], $comment['createdByUserNum']);?>
<strong><?php echo htmlspecialchars($user['username']) ?></strong> -
<span class="wsc_date"><?php echo prettyDate($comment['createdDate']) ?></span>
</div><hr size="1"/>
<?php endforeach ?>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/