include 'components/com_discussions/includes/countryselect.php'; echo "</div>"; echo "</div>"; echo "</div>"; echo "<div class='cofiProfileStatusBox'>"; echo "<div class='cofiProfileStatusHeader'>"; echo "<div class='cofiProfileHeader'>"; echo JText::_('COFI_FORUM_STATUS'); echo "</div>"; echo "</div>"; echo "<div class='cofiProfileStatusRow'>"; echo "<div class='cofiProfileStatusLabel'>"; echo JText::_('COFI_POSTS') . ": "; echo "</div>"; echo "<div class='cofiProfileStatusValue'>"; echo $CofiUser->getPosts(); echo "</div>"; echo "</div>"; echo "<div class='cofiProfileStatusRow'>"; echo "<div class='cofiProfileStatusLabel'>"; echo JText::_('COFI_MODERATED') . ": "; echo "</div>"; echo "<div class='cofiProfileStatusValue'>"; if ($CofiUser->isRookie() || $CofiUser->isModerated()) { echo JText::_('COFI_YES'); } else { echo JText::_('COFI_NO'); } echo "</div>"; echo "</div>"; echo "</div>";
echo "<a href='" . $linkPrimezilla . "' title='" . JText::_('COFI_MESSAGE_TO') . " " . $opUserUsername . "' >"; echo "<img src='" . $_root . "components/com_discussions/assets/icons/pn_16.png' style='margin: 10px 5px 10px 5px;' />"; echo "</a>"; } } echo "</div>"; } else { echo "<br />"; } // display username echo "<b>"; echo $opUserUsername; echo "</b>"; echo "<br />"; echo "<div class='cofiAvatarColumnPosts'>"; $_posts = $CofiUser->getPosts(); if ($_posts == 1) { echo $_posts . " " . JText::_('COFI_POST'); } else { echo $_posts . " " . JText::_('COFI_POSTSCOUNTER'); } echo "</div>"; // online status echo "<div class='cofiAvatarColumnOnlineStatus'>"; if ($user->guest) { // user is not logged in echo "<div class='cofiAvatarColumnOnlineStatusOffline'>"; echo JText::_('COFI_OFFLINE_GUEST'); echo "</div>"; } else { // user is logged in
function acceptPost($post_id) { $db =& JFactory::getDBO(); // set WFM to 0 and published to 1 $sql = "UPDATE " . $db->nameQuote('#__discussions_messages') . " SET wfm = '0'" . "," . " published = '1'" . " WHERE id = '" . $post_id . "'"; $db->setQuery($sql); $db->query(); // update the stats now // get user id of this post $sql = "SELECT user_id FROM " . $db->nameQuote('#__discussions_messages') . " WHERE id='" . $post_id . "'"; $db->setQuery($sql); $_user_id = $db->loadResult(); // get thread id of this post $sql = "SELECT thread FROM " . $db->nameQuote('#__discussions_messages') . " WHERE id='" . $post_id . "'"; $db->setQuery($sql); $_thread_id = $db->loadResult(); // get category id of this post $sql = "SELECT cat_id FROM " . $db->nameQuote('#__discussions_messages') . " WHERE id='" . $post_id . "'"; $db->setQuery($sql); $_cat_id = $db->loadResult(); // set user post counter ++ $result = $this->increaseUserPostCounter($_user_id); // todo check if user is no rookie any more $postUser = new CofiUser($_user_id); // get Rookie Mode setting from com_discussions parameters $params = JComponentHelper::getParams('com_discussions'); $rookie = $params->get('rookie', '0'); if ($postUser->isRookie()) { // check if he is now no rookie any more if ($postUser->getPosts() >= $rookie) { $postUser->setRookie(0); } } // update thread stats $result = $this->updateThreadStats($_thread_id); // update category stats $result = $this->updateCategoryStats($_cat_id); return 0; }
if ($CofiUser->getAvatar() == "") { // display default avatar echo "<img src='" . $_root . "components/com_discussions/assets/users/user.png' class='cofiAvatar' alt='{$opUserUsername}' />"; } else { // display uploaded avatar echo "<img src='" . $_root . "images/discussions/users/" . $posting->user_id . "/large/" . $CofiUser->getAvatar() . "' class='cofiAvatar' alt='{$opUserUsername}' />"; } echo "</div>"; // display username echo "<br />"; echo "<b>"; echo $opUserUsername; echo "</b>"; echo "<br />"; echo "<div class='cofiAvatarColumnPosts'>"; echo $CofiUser->getPosts() . " posts"; echo "</div>"; // location echo "<div class='cofiAvatarColumnLocation'>"; echo "Location:"; echo "<br />"; $city = $CofiUser->getCity(); $country = $CofiUser->getCountry(); if ($city != "" || $country != "") { if ($city != "") { echo $city; if ($country != "") { echo "<br />"; } } if ($country != "") {