function parseText($txt) { user_error(__CLASS__ . '::' . __FUNCTION__ . '(): Deprecated', E_USER_NOTICE); kimport('html.parser'); return KunenaParser::parseText($txt); }
/** * Pulls together data and options and outputs the build feed. * Header and mime is automaticly set. * * @access private * @param array $items */ private function buildFeed($items = array()) { // Build items for feed foreach ($items as $data) { $item = new JFeedItem(); // Calcution to define the last page of the topic $threadPages = ceil($data->msgcount / $this->config->messages_per_page); // Build unique direct linking url for each item (htmlspecialchars_decode because FeedCreator uses htmlspecialchars on input) $url = CKunenaLink::GetThreadPageURL('view', $data->catid, $data->thread, $threadPages, $this->config->messages_per_page, $data->id); // Extract the data, we want to present and store it in $tmp $tmp = array(); $tmp['title'] = $data->subject; // Remove confidential information from message $data->message = preg_replace('/\\[confidential\\](.*?)\\[\\/confidential\\]/s', '', $data->message); $data->message = preg_replace('/\\[hide\\](.*?)\\[\\/hide\\]/s', '', $data->message); $data->message = preg_replace('/\\[spoiler\\]/s', '[spoilerlight]', $data->message); $data->message = preg_replace('/\\[\\/spoiler\\]/s', '[/spoilerlight]', $data->message); $data->message = preg_replace('/\\[code\\](.*?)\\[\\/code]/s', '', $data->message); $tmp['text'] = $data->message; $tmp['date'] = $data->time; $tmp['email'] = $data->email; $tmp['name'] = $data->name; $tmp['cat_name'] = $data->catname; // Link and source is always the same $tmp['link'] = $this->uri->toString(array('scheme', 'host', 'port')) . $url; $tmp['source'] = $this->uri->toString(array('scheme', 'host', 'port')) . $url; // Determine title format if ($this->old_titles) { $tmp['title'] = JText::_('COM_KUNENA_GEN_SUBJECT') . ': ' . $tmp['title']; } // Determine author format switch ($this->author_format) { case 'both': $tmp['author'] = $tmp['email'] . ' (' . $tmp['name'] . ')'; break; case 'email': $tmp['author'] = $tmp['email']; break; case 'name': default: $tmp['author'] = $tmp['name']; } // Do we want author in item titles? if ($this->author_in_title) { $tmp['title'] .= ' - ' . JText::_('COM_KUNENA_GEN_BY') . ': ' . $tmp['name']; } // Limit number of words if ($this->word_count) { $Newmessage = ''; $t_newString = explode(" ", $tmp['text']); foreach ($t_newString as $key => $word) { if ($key < $this->word_count) { $Newmessage .= $word . ' '; } } // Append userfriendly '...' string if (strlen($tmp['text']) != strlen($Newmessage)) { $Newmessage .= ' ...'; } $tmp['text'] = $Newmessage; } if ($this->allow_html) { // Not nessecary to convert specialchars or use parsetext. // ParseBBCode does it for us $tmp['text'] = KunenaParser::parseBBCode($tmp['text']); } else { // Not nessecary to convert specialchars. // FeedCreator does it for us $tmp['text'] = KunenaParser::parseText($tmp['text']); } // Assign values to feed item $item->title = $tmp['title']; $item->link = $tmp['link']; $item->description = $tmp['text']; $item->date = $tmp['date']; $item->source = $tmp['source']; $item->author = $tmp['author']; $item->category = $tmp['cat_name']; // Finally add item to feed $this->document->addItem($item); } }
echo CKunenaLink::GetProfileLink(intval($leaf->userid), $useravatar); ?> </span> <?php } ?> <?php } ?> <!-- /Avatar --> <!-- Latest Post --> <span class="ktopic-latest-post"> <?php if ($this->topic_ordering == 'ASC') { $threadPages = ceil($leaf->msgcount / $this->config->messages_per_page); echo JText::_('COM_KUNENA_GEN_LAST_POST') . ': ' . CKunenaLink::GetThreadPageLink('view', intval($leaf->catid), intval($leaf->thread), $threadPages, intval($this->config->messages_per_page), KunenaParser::parseText($leaf->subject), intval($leaf->msgid)); } else { echo CKunenaLink::GetThreadPageLink('view', intval($leaf->catid), intval($leaf->thread), 1, intval($this->config->messages_per_page), JText::_('COM_KUNENA_GEN_LAST_POST'), intval($leaf->msgid)); } if ($leaf->uname) { echo ' ' . JText::_('COM_KUNENA_GEN_BY') . ' ' . CKunenaLink::GetProfileLink(intval($leaf->userid), $this->escape($leaf->uname), '', 'nofollow'); } ?> </span> <!-- /Latest Post --> <br /> <!-- Latest Post Date --> <span class="ktopic-date" title="<?php echo CKunenaTimeformat::showDate($leaf->time, 'config_post_dateformat_hover'); ?> ">
echo JHTML::_('form.token'); ?> </form> <?php } else { ?> <table> <?php foreach ($dataspollresult as $row) { ?> <tr class="krow<?php echo ($i ^= 1) + 1; ?> "> <td class="kcol-option"><?php echo KunenaParser::parseText($row->text); ?> </td> <td class="kcol-bar"><img class = "jr-forum-stat-bar" src = "<?php echo KUNENA_JLIVEURL . "components/com_kunena/template/default/images/bar.png"; ?> " height = "10" width = "<?php echo isset($row->votes) ? $row->votes * 25 / 5 : "0"; ?> " /></td> <td class="kcol-number"><?php if (isset($row->votes) && $row->votes > 0) { echo $row->votes; } else { echo JText::_('COM_KUNENA_POLL_NO_VOTE'); }
<?php foreach ($this->toptitles as $toptitle) { $k = 1 - $k; if ($toptitle->hits == $this->toptitlehits) { $barwidth = 100; } else { $barwidth = round($toptitle->hits * 100 / $this->toptitlehits); } ?> <tr class = "k<?php echo $this->escape($tabclass[$k]); ?> "> <td class="kcol-first"> <?php echo CKunenaLink::GetThreadLink('view', intval($toptitle->catid), intval($toptitle->id), KunenaParser::parseText($toptitle->subject), ''); ?> </td> <td class="kcol-mid"> <img class = "kstats-bar" src = "<?php echo KUNENA_TMPLTMAINIMGURL . 'images/bar.png'; ?> " alt = "" height = "10" width = "<?php echo intval($barwidth); ?> %" /> </td> <td class="kcol-last"> <?php echo intval($toptitle->hits); ?>
function display($mode = '') { $message = $this->msg; $this->id = $message->id; $this->catid = $message->catid; $this->thread = $message->thread; // Link to individual message if ($this->config->ordering_system == 'replyid') { $this->numLink = CKunenaLink::GetSamePageAnkerLink($this->id, '#' . $this->replynum); } else { $this->numLink = CKunenaLink::GetSamePageAnkerLink($this->id, '#' . $this->id); } // New post suffix for class if ($message->new) { $this->msgsuffix = '-new'; } // Add attachments if (!empty($message->attachments)) { $this->attachments = $message->attachments; } $subject = $message->subject; $this->resubject = JString::strtolower(JString::substr($subject, 0, JString::strlen(JText::_('COM_KUNENA_POST_RE')))) == JString::strtolower(JText::_('COM_KUNENA_POST_RE')) ? $subject : JText::_('COM_KUNENA_POST_RE') . ' ' . $subject; $this->subjectHtml = KunenaParser::parseText($subject); $this->messageHtml = KunenaParser::parseBBCode($message->message, $this); //Show admins the IP address of the user: if ($message->ip && (CKunenaTools::isAdmin() || CKunenaTools::isModerator($this->my->id, $this->catid) && !$this->config->hide_ip)) { $this->ipLink = CKunenaLink::GetMessageIPLink($message->ip); } $this->profile = KunenaFactory::getUser($message->userid); // Modify profile values by integration $triggerParams = array('userid' => $message->userid, 'userinfo' => &$this->profile); $integration = KunenaFactory::getProfile(); $integration->trigger('profileIntegration', $triggerParams); // Choose username $this->userid = $this->profile->userid; $this->username = $this->config->username ? $this->profile->username : $this->profile->name; if ((!$this->username || !$message->userid || $this->config->changename) && $message->name) { $this->username = $message->name; } if ($this->params->get('avatarPosition') == 'left' || $this->params->get('avatarPosition') == 'right') { $avatar = $this->profile->getAvatarLink('kavatar', 'post'); } else { $avatar = $this->profile->getAvatarLink('kavatar', 'welcome'); } if ($avatar) { $this->avatar = '<span class="kavatar">' . $avatar . '</span>'; } if ($this->config->showuserstats) { $activityIntegration = KunenaFactory::getActivityIntegration(); if ($this->config->userlist_usertype) { $this->usertype = $this->profile->getType($this->catid); } $this->userrankimage = $this->profile->getRank($this->catid, 'image'); $this->userranktitle = $this->profile->getRank($this->catid, 'title'); $this->userposts = $this->profile->posts; $this->userpoints = $activityIntegration->getUserPoints($this->profile->userid); $this->usermedals = $activityIntegration->getUserMedals($this->profile->userid); } //karma points and buttons $this->userkarma_minus = $this->userkarma_plus = ''; if ($this->config->showkarma && $this->profile->userid) { $this->userkarma = JText::_('COM_KUNENA_KARMA') . ": " . $this->profile->karma; if ($this->my->id && $this->my->id != $this->profile->userid) { $this->userkarma_minus = CKunenaLink::GetKarmaLink('decrease', $this->catid, $this->id, $this->userid, '<span class="kkarma-minus" alt="Karma-" border="0" title="' . JText::_('COM_KUNENA_KARMA_SMITE') . '"> </span>'); $this->userkarma_plus = CKunenaLink::GetKarmaLink('increase', $this->catid, $this->id, $this->userid, '<span class="kkarma-plus" alt="Karma+" border="0" title="' . JText::_('COM_KUNENA_KARMA_APPLAUD') . '"> </span>'); } } $this->profilelink = $this->profile->profileIcon('profile'); $this->personaltext = $this->profile->personalText; $this->signatureHtml = KunenaParser::parseBBCode($this->profile->signature); //Thankyou info and buttons if ($this->config->showthankyou && $this->profile->userid && $mode != 'threaded') { require_once KPATH_SITE . '/lib/kunena.thankyou.php'; $thankyou = new CKunenaThankyou(); $this->total_thankyou = $thankyou->getThankYouUser($this->id); $this->thankyou = array_slice($this->total_thankyou, 0, $this->config->thankyou_max); if ($this->my->id && $this->my->id != $this->profile->userid) { $this->message_thankyou = CKunenaLink::GetThankYouLink($this->catid, $this->id, $this->userid, CKunenaTools::showButton('thankyou', JText::_('COM_KUNENA_BUTTON_THANKYOU')), JText::_('COM_KUNENA_BUTTON_THANKYOU_LONG'), 'kicon-button kbuttonuser btn-left'); } } if (!$message->hold && (CKunenaTools::isModerator($this->my->id, $this->catid) || !$this->topicLocked)) { //user is allowed to reply/quote $this->captcha = KunenaSpamRecaptcha::getInstance(); if ($this->my->id && (CKunenaTools::isModerator($this->my->id, $this->catid) || $this->me->posts >= $this->config->captcha_post_limit)) { $this->message_quickreply = CKunenaLink::GetTopicPostReplyLink('reply', $this->catid, $this->id, CKunenaTools::showButton('reply', JText::_('COM_KUNENA_BUTTON_QUICKREPLY')), 'nofollow', 'kicon-button kbuttoncomm btn-left kqreply', JText::_('COM_KUNENA_BUTTON_QUICKREPLY_LONG'), ' id="kreply' . $this->id . '"'); } $this->message_reply = CKunenaLink::GetTopicPostReplyLink('reply', $this->catid, $this->id, CKunenaTools::showButton('reply', JText::_('COM_KUNENA_BUTTON_REPLY')), 'nofollow', 'kicon-button kbuttoncomm btn-left', JText::_('COM_KUNENA_BUTTON_REPLY_LONG')); $this->message_quote = CKunenaLink::GetTopicPostReplyLink('quote', $this->catid, $this->id, CKunenaTools::showButton('quote', JText::_('COM_KUNENA_BUTTON_QUOTE')), 'nofollow', 'kicon-button kbuttoncomm btn-left', JText::_('COM_KUNENA_BUTTON_QUOTE_LONG')); } else { //user is not allowed to write a post if ($this->topicLocked) { $this->message_closed = JText::_('COM_KUNENA_POST_LOCK_SET'); } else { $this->message_closed = JText::_('COM_KUNENA_VIEW_DISABLED'); } } $this->msgclass = 'kmsg'; //Offer an moderator a few tools if (CKunenaTools::isModerator($this->my->id, $this->catid)) { unset($this->message_closed); $this->message_edit = CKunenaLink::GetTopicPostReplyLink('edit', $this->catid, $this->id, CKunenaTools::showButton('edit', JText::_('COM_KUNENA_BUTTON_EDIT')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_EDIT_LONG')); $this->message_moderate = CKunenaLink::GetTopicPostReplyLink('moderate', $this->catid, $this->id, CKunenaTools::showButton('moderate', JText::_('COM_KUNENA_BUTTON_MODERATE')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_MODERATE_LONG')); if ($message->hold == 1) { $this->message_publish = CKunenaLink::GetTopicPostLink('approve', $this->catid, $this->id, CKunenaTools::showButton('approve', JText::_('COM_KUNENA_BUTTON_APPROVE')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_APPROVE_LONG')); $this->msgclass .= ' kunapproved'; } if ($message->hold == 2 || $message->hold == 3) { $this->msgclass .= ' kunapproved kdeleted'; $this->message_undelete = CKunenaLink::GetTopicPostLink('undelete', $this->catid, $this->id, CKunenaTools::showButton('undelete', JText::_('COM_KUNENA_BUTTON_UNDELETE')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_UNDELETE_LONG')); $this->message_permdelete = CKunenaLink::GetTopicPostLink('permdelete', $this->catid, $this->id, CKunenaTools::showButton('permdelete', JText::_('COM_KUNENA_BUTTON_PERMDELETE')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_PERMDELETE_LONG')); } else { $this->message_delete = CKunenaLink::GetTopicPostLink('delete', $this->catid, $this->id, CKunenaTools::showButton('delete', JText::_('COM_KUNENA_BUTTON_DELETE')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_DELETE_LONG')); } } else { if ($this->config->useredit && $this->my->id && $this->my->id == $this->profile->userid) { //Now, if the viewer==author and the viewer is allowed to edit his/her own post then offer an 'edit' link if ($message->hold != 2 && CKunenaTools::editTimeCheck($message->modified_time, $message->time)) { $this->message_edit = CKunenaLink::GetTopicPostReplyLink('edit', $this->catid, $this->id, CKunenaTools::showButton('edit', JText::_('COM_KUNENA_BUTTON_EDIT')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_EDIT_LONG')); if ($this->config->userdeletetmessage == '1') { if ($this->replynum == $this->replycnt) { $this->message_delete = CKunenaLink::GetTopicPostLink('delete', $this->catid, $this->id, CKunenaTools::showButton('delete', JText::_('COM_KUNENA_BUTTON_DELETE')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_DELETE_LONG')); } } else { if ($this->config->userdeletetmessage == '2') { $this->message_delete = CKunenaLink::GetTopicPostLink('delete', $this->catid, $this->id, CKunenaTools::showButton('delete', JText::_('COM_KUNENA_BUTTON_DELETE')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_DELETE_LONG')); } } } } } $this->class = 'class="' . $this->msgclass . '"'; if (!$mode) { $templatefile = '/view/message.php'; } else { $templatefile = "/view/message.{$mode}.php"; } CKunenaTools::loadTemplate($templatefile, false, $this->templatepath); }
} ?> <?php // FIXME: we need a better way to add http/https ?> <li><?php if (!empty($this->profile->websiteurl)) { ?> <span class="kicon-profile kicon-profile-website"></span><?php } ?> <a href="http://<?php echo $this->escape($this->profile->websiteurl); ?> " target="_blank"><?php echo KunenaParser::parseText($this->profile->websitename); ?> </a></li> </ul> </div> <div class="kprofile-rightcol1"> <h4><?php echo JText::_('COM_KUNENA_MYPROFILE_SIGNATURE'); ?> </h4> <div class="kmsgsignature"><div><?php echo KunenaParser::parseBBCode($this->signature); ?> </div></div> </div>
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.kunena.org **/ // Dont allow direct linking defined('_JEXEC') or die; ?> <!-- ANNOUNCEMENTS BOX --> <div class="kblock kannouncement"> <div class="kheader"> <span class="ktoggler"><a class="ktoggler close" title="<?php echo JText::_('COM_KUNENA_TOGGLER_COLLAPSE'); ?> " rel="kannouncement"></a></span> <h2><?php echo CKunenaLink::GetAnnouncementLink('read', $this->id, KunenaParser::parseText($this->announcement->title), JText::_('COM_KUNENA_ANN_READMORE'), 'follow'); ?> </h2> </div> <div class="kcontainer" id="kannouncement"> <?php if ($this->canEdit) { ?> <div class="kactions"> <?php echo CKunenaLink::GetAnnouncementLink('edit', $this->id, JText::_('COM_KUNENA_ANN_EDIT'), JText::_('COM_KUNENA_ANN_EDIT')); ?> | <?php echo CKunenaLink::GetAnnouncementLink('delete', $this->id, JText::_('COM_KUNENA_ANN_DELETE'), JText::_('COM_KUNENA_ANN_DELETE')); ?>
/** * Display results * @param string actionstring */ function show() { extract($this->params); $this->quser = $this->get_searchusername(); $this->selected = ' selected="selected"'; $this->checked = ' checked="checked"'; $this->advsearch_hide = 1; if ($this->int_kunena_errornr) { $this->advsearch_hide = 0; } $this->tabclass = array("row1", "row2"); $searchdatelist = array(); $searchdatelist[] = JHTML::_('select.option', 'lastvisit', JText::_('COM_KUNENA_SEARCH_DATE_LASTVISIT')); $searchdatelist[] = JHTML::_('select.option', '1', JText::_('COM_KUNENA_SEARCH_DATE_YESTERDAY')); $searchdatelist[] = JHTML::_('select.option', '7', JText::_('COM_KUNENA_SEARCH_DATE_WEEK')); $searchdatelist[] = JHTML::_('select.option', '14', JText::_('COM_KUNENA_SEARCH_DATE_2WEEKS')); $searchdatelist[] = JHTML::_('select.option', '30', JText::_('COM_KUNENA_SEARCH_DATE_MONTH')); $searchdatelist[] = JHTML::_('select.option', '90', JText::_('COM_KUNENA_SEARCH_DATE_3MONTHS')); $searchdatelist[] = JHTML::_('select.option', '180', JText::_('COM_KUNENA_SEARCH_DATE_6MONTHS')); $searchdatelist[] = JHTML::_('select.option', '365', JText::_('COM_KUNENA_SEARCH_DATE_YEAR')); $searchdatelist[] = JHTML::_('select.option', 'all', JText::_('COM_KUNENA_SEARCH_DATE_ANY')); $this->searchdatelist = JHTML::_('select.genericlist', $searchdatelist, 'searchdate', 'class="ks"', 'value', 'text', $this->params['searchdate']); $beforeafterlist = array(); $beforeafterlist[] = JHTML::_('select.option', 'after', JText::_('COM_KUNENA_SEARCH_DATE_NEWER')); $beforeafterlist[] = JHTML::_('select.option', 'before', JText::_('COM_KUNENA_SEARCH_DATE_OLDER')); $this->beforeafterlist = JHTML::_('select.genericlist', $beforeafterlist, 'beforeafter', 'class="ks"', 'value', 'text', $this->params['beforeafter']); $sortbylist = array(); $sortbylist[] = JHTML::_('select.option', 'title', JText::_('COM_KUNENA_SEARCH_SORTBY_TITLE')); //$sortbylist[] = JHTML::_('select.option', 'replycount', JText::_('COM_KUNENA_SEARCH_SORTBY_POSTS') ); $sortbylist[] = JHTML::_('select.option', 'views', JText::_('COM_KUNENA_SEARCH_SORTBY_VIEWS')); //$sortbylist[] = JHTML::_('select.option', 'threadstart', JText::_('COM_KUNENA_SEARCH_SORTBY_START') ); $sortbylist[] = JHTML::_('select.option', 'lastpost', JText::_('COM_KUNENA_SEARCH_SORTBY_POST')); //$sortbylist[] = JHTML::_('select.option', 'postusername', JText::_('COM_KUNENA_SEARCH_SORTBY_USER') ); $sortbylist[] = JHTML::_('select.option', 'forum', JText::_('COM_KUNENA_SEARCH_SORTBY_FORUM')); $this->sortbylist = JHTML::_('select.genericlist', $sortbylist, 'sortby', 'class="ks"', 'value', 'text', $this->params['sortby']); $limitlist = array(); $limitlist[] = JHTML::_('select.option', '5', JText::_('COM_KUNENA_SEARCH_LIMIT5')); $limitlist[] = JHTML::_('select.option', '10', JText::_('COM_KUNENA_SEARCH_LIMIT10')); $limitlist[] = JHTML::_('select.option', '15', JText::_('COM_KUNENA_SEARCH_LIMIT15')); $limitlist[] = JHTML::_('select.option', '20', JText::_('COM_KUNENA_SEARCH_LIMIT20')); $this->limitlist = JHTML::_('select.genericlist', $limitlist, 'limit', 'class="ks"', 'value', 'text', $this->limit); //category select list $options = array(); $options[] = JHTML::_('select.option', '0', JText::_('COM_KUNENA_SEARCH_SEARCHIN_ALLCATS')); $this->categorylist = CKunenaTools::forumSelectList('searchlist', explode(',', $this->params['catids']), $options, 'class="inputbox" size="8" multiple="multiple"', true); CKunenaTools::loadTemplate('/search/advsearch.php'); $this->results = $this->get_results(); $this->pagination = $this->getPagination($this->func, $this->q, $this->getUrlParams(), floor($this->limitstart / $this->limit) + 1, $this->limit, floor($this->total / $this->limit) + 1, 7); if (defined('KUNENA_DEBUG')) { echo '<p style="background-color:#FFFFCC;border:1px solid red;">' . $this->str_kunena_errormsg . '</p>'; } $searchlist = $this->get_searchstrings(); foreach ($this->results as $i => $result) { // Clean up subject $ressubject = KunenaParser::parseText($result->subject); // Strip smiles and bbcode out of search results; they look ugly $resmessage = KunenaParser::parseBBCode($result->message); foreach ($searchlist as $searchword) { if (empty($searchword)) { continue; } $ressubject = preg_replace("/" . preg_quote($searchword, '/') . "/iu", '<span class="searchword" >' . $searchword . '</span>', $ressubject); // FIXME: enable highlighting, but only after we can be sure that we do not break html //$resmessage = preg_replace ( "/" . preg_quote ( $searchword, '/' ) . "/iu", '<span class="searchword" >' . $searchword . '</span>', $resmessage ); } $this->results[$i]->htmlsubject = $ressubject; $this->results[$i]->htmlmessage = $resmessage; } CKunenaTools::loadTemplate('/search/search.php'); }
?> <tr class="krow<?php echo $k; ?> "> <td class="kcol-first kcol-annid"><?php echo intval($ann->id); ?> </td> <td class="kcol-mid kcol-anndate"><?php echo CKunenaTimeformat::showDate($ann->created, 'date_today'); ?> </td> <td class="kcol-mid kcol-anntitle"> <div class="overflow"><?php echo CKunenaLink::GetAnnouncementLink('read', intval($ann->id), KunenaParser::parseText($ann->title), KunenaParser::parseText($ann->title), 'follow'); ?> </div> </td> <?php if ($this->canEdit) { ?> <td class="kcol-mid kcol-annpublish"> <?php if ($ann->published > 0) { echo JText::_('COM_KUNENA_ANN_PUBLISHED'); } else { echo JText::_('COM_KUNENA_ANN_UNPUBLISHED'); } ?> </td>
* @package Kunena * * @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.kunena.org **/ // Dont allow direct linking defined('_JEXEC') or die; $document = JFactory::getDocument(); $document->setTitle(JText::_('COM_KUNENA_ANN_ANNOUNCEMENTS') . ' - ' . $this->config->board_title); ?> <div class="kblock kannouncement"> <div class="kheader"> <h2> <span><?php echo KunenaParser::parseText($this->announcement->title); ?> </span> </h2> </div> <div class="kcontainer" id="kannouncement"> <?php if ($this->canEdit) { ?> <div class="kactions"> <?php echo CKunenaLink::GetAnnouncementLink('edit', $this->id, JText::_('COM_KUNENA_ANN_EDIT'), JText::_('COM_KUNENA_ANN_EDIT')); ?> | <?php echo CKunenaLink::GetAnnouncementLink('delete', $this->id, JText::_('COM_KUNENA_ANN_DELETE'), JText::_('COM_KUNENA_ANN_DELETE'));
?> </li> <?php } } else { ?> <li> <input class="kpoll-boxvote" type="radio" name="kpollradio" id="radio_name<?php echo $i; ?> " value="<?php echo intval($result->id); ?> " /><?php echo KunenaParser::parseText($result->text); ?> </li> <?php } } ?> </ul> <input type="hidden" name="kpoll-id" value="<?php echo intval($this->id); ?> "> <?php echo JHTML::_('form.token'); ?> </fieldset>
if ($useravatar) { ?> <span class="klatest-avatar"> <?php echo CKunenaLink::GetProfileLink(intval($category->userid), $useravatar); ?> </span> <?php } ?> <!-- /Avatar --> <?php } ?> <div class="klatest-subject ks"> <?php echo JText::_('COM_KUNENA_GEN_LAST_POST') . ': ' . CKunenaLink::GetThreadPageLink('view', intval($category->catid), intval($category->thread), intval($category->page), intval($this->config->messages_per_page), KunenaParser::parseText($category->subject, 30), intval($category->id_last_msg)); ?> </div> <div class="klatest-subject-by ks"> <?php echo JText::_('COM_KUNENA_BY') . ' '; if (!empty($category->userid)) { echo CKunenaLink::GetProfileLink(intval($category->userid), $this->escape($this->config->username ? $category->username : $category->uname)); } else { echo CKunenaLink::GetProfileLink(intval($category->userid), $this->escape($category->mname)); } echo '<br /><span class="nowrap" title="' . CKunenaTimeformat::showDate($category->time_last_msg, 'config_post_dateformat_hover') . '">' . CKunenaTimeformat::showDate($category->time_last_msg, 'config_post_dateformat') . '</span>'; ?> </div> </td>
$threadPages = ceil($message->msgcount / $this->config->messages_per_page); $unreadPage = ceil($curMessageNo / $this->config->messages_per_page); if ($message->attachments) { echo CKunenaTools::showIcon('ktopicattach', JText::_('COM_KUNENA_ATTACH')); } ?> <div class="ktopic-title-cover"> <?php echo CKunenaLink::GetThreadLink('view', intval($message->catid), intval($message->id), KunenaParser::parseText($message->subject, 30), KunenaParser::stripBBCode($message->message), 'follow', 'ktopic-title km'); ?> </div> </td> <td class="kcol-mid ktopictittle"> <?php echo CKunenaLink::GetThreadLink('view', intval($firstpost->catid), intval($firstpost->id), KunenaParser::parseText($firstpost->subject, 20), KunenaParser::stripBBCode($firstpost->message), 'follow', 'ktopic-title km'); ?> <?php if ($message->favcount) { if ($message->myfavorite) { echo CKunenaTools::showIcon('kfavoritestar', JText::_('COM_KUNENA_FAVORITE')); } else { echo CKunenaTools::showIcon('kfavoritestar-grey', JText::_('COM_KUNENA_FAVORITE')); } } ?> <?php if ($message->unread) { echo CKunenaLink::GetThreadPageLink('view', intval($message->catid), intval($message->id), $unreadPage, intval($this->config->messages_per_page), '<sup class="knewchar"> (' . intval($message->unread) . ' ' . JText::_('COM_KUNENA_A_GEN_NEWCHAR') . ')</sup>', intval($message->lastread)); } if ($message->locked != 0) {
?> <span class="kpost-userposts"><?php echo JText::_('COM_KUNENA_AUP_POINTS') . intval($this->userpoints); ?> </span> <?php } ?> </div> </li> <?php if ($this->personaltext) { ?> <li class="kpost-personal"> <?php echo KunenaParser::parseText($this->personaltext); ?> </li> <?php } ?> <?php } ?> <?php if ($this->avatar) { ?> <li class="kpost-avatar"> <?php echo CKunenaLink::GetProfileLink(intval($this->profile->userid), $this->avatar); ?>
function getAnnouncement($id = 0, $mode = 0) { if ($mode) { $published = "AND published='1'"; } else { $published = ""; } if (!$id) { $query = "SELECT * FROM #__kunena_announcement WHERE published='1' ORDER BY created DESC"; } else { $query = "SELECT * FROM #__kunena_announcement WHERE id={$this->db->Quote($id)} {$published}"; } $this->db->setQuery($query, 0, 1); $announcement = $this->db->loadObject(); if (KunenaError::checkDatabaseError()) { return; } if (!$announcement) { return; } // TODO: deprecated $this->id = $announcement->id; $this->title = KunenaParser::parseText($announcement->title); $this->sdescription = KunenaParser::parseBBCode($announcement->sdescription); $this->description = KunenaParser::parseBBCode($announcement->description); $this->created = $announcement->created; $this->published = $announcement->published; $this->showdate = $announcement->showdate; // end deprecated $this->announcement = $announcement; }
?> <?php if (is_array($userban->comments)) { foreach ($userban->comments as $comment) { ?> <tr class="krow2"> <td colspan="2" class="kcol-first kcommentby-label"><b><?php echo JText::sprintf('COM_KUNENA_BAN_COMMENT_BY', CKunenaLink::GetProfileLink(intval($comment->userid))); ?> </b> :</td> <td colspan="1" class="kcol-mid kcommenttime-field"><?php echo CKunenaTimeFormat::showDate($comment->time); ?> </td> <td colspan="3" class="kcol-mid kcomment-field"><?php echo KunenaParser::parseText($comment->comment); ?> </td> </tr> <?php } } ?> <?php } ?> <?php } else { ?> <tr class="krow1"> <td colspan="6" class="kcol-first"><?php