public function category() { $sCategory = str_replace('-', ' ', $this->httpRequest->get('name')); $sOrder = $this->httpRequest->get('order'); $sSort = $this->httpRequest->get('sort'); $this->iTotalNotes = $this->oNoteModel->category($sCategory, true, $sOrder, $sSort, null, null); $this->view->total_pages = $this->oPage->getTotalPages($this->iTotalNotes, 10); $this->view->current_page = $this->oPage->getCurrentPage(); $oSearch = $this->oNoteModel->category($sCategory, false, $sOrder, $sSort, $this->oPage->getFirstItem(), $this->oPage->getNbItemsByPage()); $this->setMenuVars(); $sCategoryTxt = substr($sCategory, 0, 60); if (empty($oSearch)) { $this->sTitle = t('Not found "%0%" category!', $sCategoryTxt); $this->notFound(); } else { $this->sTitle = t('Search by Category: "%0%" Note', $sCategoryTxt); $this->view->page_title = $this->sTitle; $this->view->h2_title = $this->sTitle; $this->view->h3_title = nt('%n% Note Result!', '%n% Notes Result!', $this->iTotalNotes); $this->view->meta_description = t('Search Note Post by Category %0% - Dating Social Community Note', $sCategoryTxt); $this->view->meta_keywords = t('search,post,blog,note,dating,social network,community,news'); $this->view->posts = $oSearch; } $this->manualTplInclude('index.tpl'); $this->output(); }
public function category() { $sCategory = str_replace('-', ' ', $this->httpRequest->get('name')); $sOrder = $this->httpRequest->get('order'); $sSort = $this->httpRequest->get('sort'); $this->iTotalGames = $this->oGameModel->category($sCategory, true, $sOrder, $sSort, null, null); $this->view->total_pages = $this->oPage->getTotalPages($this->iTotalGames, 10); $this->view->current_page = $this->oPage->getCurrentPage(); $oSearch = $this->oGameModel->category($sCategory, false, $sOrder, $sSort, $this->oPage->getFirstItem(), $this->oPage->getNbItemsByPage()); $this->setMenuVars(); $sCategoryTxt = substr($sCategory, 0, 60); if (empty($oSearch)) { $this->sTitle = t('No "%0%" category found.', $sCategoryTxt); $this->_notFound(); } else { $this->sTitle = t('Search by Category: "%0%" Game', $sCategoryTxt); $this->view->page_title = $this->sTitle; $this->view->h2_title = $this->sTitle; $this->view->h3_title = nt('%n% Game Result!', '%n% Games Result!', $this->iTotalGames); $this->view->meta_description = t('Search the Flash Game in the Category %0% - Community Dating Social Games', $sCategoryTxt); $this->view->games = $oSearch; } $this->manualTplInclude('index.tpl'); $this->output(); }
/** * Return the alias and name for this category of content * * @param object $publication Current publication * @return array */ public function &onPublicationSubAreas($publication) { $areas = array(); if ($publication->category()->_params->get('plg_related', 1) == 1) { $areas = array('related' => Lang::txt('PLG_PUBLICATION_RELATED')); } return $areas; }
/** * Return the alias and name for this category of content * * @param object $publication Current publication * @return array */ public function &onPublicationSubAreas($publication) { $areas = array(); if ($publication->category()->_params->get('plg_recommendations', 1) == 1) { $areas = array('recommendations' => Lang::txt('PLG_PUBLICATION_RECOMMENDATIONS')); } return $areas; }
/** * Return the alias and name for this category of content * * @param object $publication Current publication * @return array */ public function &onPublicationSubAreas($publication) { $areas = array(); if ($publication->category()->_params->get('plg_groups', 1) == 1) { $areas['groups'] = Lang::txt('PLG_PUBLICATIONS_GROUPS'); } return $areas; }
/** * Return the alias and name for this category of content * * @param object $publication Current publication * @return array */ public function &onPublicationSubAreas($publication) { $areas = array(); if ($publication->category()->_params->get('plg_watch', 1) == 1) { $areas['watch'] = Lang::txt('PLG_PUBLICATION_WATCH'); } return $areas; }
/** * Show supplementary info * * @param object $publication Publication model * @return string HTML */ public static function showSubInfo($publication) { $action = $publication->isPublished() ? Lang::txt('COM_PUBLICATIONS_LISTED_IN') : Lang::txt('COM_PUBLICATIONS_IN'); $html = '<p class="pubinfo">' . $action . ' ' . ' <a href="' . Route::url($publication->link('category')) . '">' . $publication->category()->name . '</a>'; // Publication belongs to group? if ($publication->groupOwner()) { $html .= ' | ' . Lang::txt('COM_PUBLICATIONS_PUBLICATION_BY_GROUP') . ' <a href="/groups/' . $publication->groupOwner('cn') . '">' . $publication->groupOwner('description') . '</a>'; } $html .= '</p>' . "\n"; return $html; }