$rp_user_name2 = CurrentUserData::getUserName($row2->LR_UserID); //Display how long ago this was posted echo " Last Reply by <br> <a href='" . DIR . "Profile/{$row2->LR_UserID}/' style='font-weight: bold'>{$rp_user_name2}</a><br> " . TimeDiff::dateDiff("now", "{$row2->LR_TimeStamp}", 1) . " ago "; } echo "</div>"; echo "</div>"; // For small devices hides extra info echo "<div id='Bar{$f_p_id}' class='collapse hidden-sm hidden-md hidden-lg'>"; echo "<div class='col-xs-12'>"; // Display total replys // Display total topic replys echo "<div class='btn btn-info btn-xs'>"; echo "Replies <span class='badge'>{$row2->total_topic_replys}</span>"; echo "</div>"; // Display total sweets echo Sweets::getTotalSweets($f_p_id, 'Forum_Topic', 'Forum_Topic_Reply'); // Display total views echo "<div class='btn btn-info btn-xs'> Views <span class='badge'>"; echo PageViews::views('false', $f_p_id, 'Forum_Topic', $data['current_userID']); echo "</span></div>"; // Check to see if there has been a reply for this topic. If not then don't show anything. if (isset($row2->LR_UserID)) { // Display Last Reply User Name $rp_user_name2 = CurrentUserData::getUserName($row2->LR_UserID); //Display how long ago this was posted echo "<Br> Last Reply by <a href='" . DIR . "Profile/{$row2->LR_UserID}/' style='font-weight: bold'>{$rp_user_name2}</a> " . TimeDiff::dateDiff("now", "{$row2->LR_TimeStamp}", 1) . " ago "; } echo "</div>"; echo "</div>"; echo "</div></td></tr>"; }
echo "</div>"; echo "<div class='panel-footer' style='text-align:right'>"; echo "<div class='row'>"; echo "<div class='col-lg-6 col-md-6 col-sm-6' style='text-align:left'>"; if ($rf_p_edit_date != NULL) { // Display how long ago this was posted $timestart = "{$rf_p_edit_date}"; //Time of post echo " <font color=red>Edited</font> <font color=red> " . TimeDiff::dateDiff("now", "{$timestart}", 1) . " ago</font> "; } echo "</div>"; echo "<div class='col-lg-6 col-md-6 col-sm-6' style='text-align:right'>"; //Start Sweet $sweet_url = "Topic/" . $data['topic_id'] . "/" . $data['current_page'] . "/#topicreply" . $rf_p_main_id; echo Sweets::displaySweetsButton($data['topic_id'], 'Forum_Topic_Reply', $data['current_userID'], $rf_p_main_id, $sweet_url); echo Sweets::getSweets($data['topic_id'], 'Forum_Topic_Reply', $rf_p_main_id); // If user owns this content show forum buttons for edit and delete // Hide button if they are currently editing this reply if ($data['action'] != "edit_reply" && $data['action'] != "edit_topic" && $data['current_userID'] == $rf_p_user_id && $rf_p_allow == "TRUE") { echo Form::open(array('method' => 'post', 'action' => '#topicreply' . $rf_p_main_id, 'style' => 'display:inline')); // Topic Reply Edit True echo "<input type='hidden' name='action' value='edit_reply' />"; // Topic Reply ID for editing echo "<input type='hidden' name='edit_reply_id' value='" . $rf_p_main_id . "' />"; // CSRF Token echo "<input type='hidden' name='csrf_token' value='" . $data['csrf_token'] . "' />"; // Display Submit Button echo "<button class='btn btn-xs btn-info' name='submit' type='submit'>Edit Reply</button>"; echo Form::close(); } // Display Admin Hide/UnHide Button