<?php defined('_JEXEC') or die('Restricted access'); ?> <div id="phocagallery-comments"> <?php echo '<div style="font-size:1px;height:1px;margin:0px;padding:0px;"> </div>'; //because of IE bug if (!empty($this->commentitem)) { $userImage = JHTML::_('image.site', 'components/com_phocagallery/assets/images/icon-user.' . $this->tmpl['formaticon'], '', '', '', '', ''); $smileys = PhocaGalleryHelperComment::getSmileys(); foreach ($this->commentitem as $itemValue) { $date = JHTML::_('date', $itemValue->date, JText::_('DATE_FORMAT_LC2')); $comment = $itemValue->comment; $comment = PhocaGalleryHelperComment::bbCodeReplace($comment); foreach ($smileys as $smileyKey => $smileyValue) { $comment = str_replace($smileyKey, JHTML::_('image.site', 'components/com_phocagallery/assets/images/' . $smileyValue . '.' . $this->tmpl['formaticon'], '', '', '', '', ''), $comment); } echo '<fieldset>' . '<legend>' . $userImage . ' ' . $itemValue->username . '</legend>' . '<p><strong>' . PhocaGalleryHelperFront::wordDelete($itemValue->title, 50, '...') . '</strong></p>' . '<p style="overflow:auto;width:' . $this->tmpl['commentwidth'] . 'px;">' . $comment . '</p>' . '<p style="text-align:right"><small>' . $date . '</small></p>' . '</fieldset>'; } } echo '<fieldset>' . '<legend>' . JText::_('Add comment') . '</legend>'; if ($this->tmpl['alreadycommented']) { echo '<p>' . JText::_('You have already submitted comment') . '</p>'; } else { if ($this->tmpl['notregistered']) { echo '<p>' . JText::_('Only registered and logged in user can submit a comment') . '</p>'; } else { ?> <form action="<?php