示例#1
0
 function getCategoryName()
 {
     if (!isset($this->_category)) {
         $this->_category = new ssCategory($this->getVar('categoryid'));
     }
     return $this->_category->name();
 }
示例#2
0
$thiscategory_itemcount = isset($totalItem[$categoryid]) ? $totalItem[$categoryid] : 0;
$category['total'] = $thiscategory_itemcount + $total_items;
if (count($itemsObj) > 0) {
    $userids = array();
    if ($itemsObj) {
        foreach ($itemsObj as $key => $thisitem) {
            $itemids[] = $thisitem->getVar('itemid');
            $userids[$thisitem->uid()] = 1;
        }
    }
    $member_handler =& xoops_gethandler('member');
    $users = $member_handler->getUsers(new Criteria('uid', "(" . implode(',', array_keys($userids)) . ")", "IN"), true);
    // Adding the items of the selected category
    for ($i = 0; $i < $totalItemOnPage; $i++) {
        $item = $itemsObj[$i]->toArray();
        $item['categoryname'] = $categoryObj->name();
        $item['categorylink'] = "<a href='" . SMARTSECTION_URL . "category.php?categoryid=" . $itemsObj[$i]->categoryid() . "'>" . $categoryObj->name() . "</a>";
        $item['who_when'] = $itemsObj[$i]->getWhoAndWhen($users);
        $xoopsTpl->append('items', $item);
    }
    //var_dump( $last_itemObj[$categoryObj->getVar('categoryid')]);
    if (isset($last_itemObj[$categoryObj->getVar('categoryid')]) && $last_itemObj[$categoryObj->getVar('categoryid')]) {
        $category['last_itemid'] = $last_itemObj[$categoryObj->getVar('categoryid')]->getVar('itemid');
        $category['last_title_link'] = "<a href='item.php?itemid=" . $last_itemObj[$categoryObj->getVar('categoryid')]->getVar('itemid') . "'>" . $last_itemObj[$categoryObj->getVar('categoryid')]->title($lastitemsize) . "</a>";
    }
}
// Language constants
$xoopsTpl->assign(array('lang_on' => _MD_SS_ON, 'lang_postedby' => _MD_SS_POSTEDBY, 'lang_total' => $totalItemOnPage, 'lang_title' => _MD_SS_TITLE, 'lang_datesub' => _MD_SS_DATESUB, 'lang_hits' => _MD_SS_HITS));
$xoopsTpl->assign('sectionname', $myts->displayTarea($xoopsModule->getVar('name')));
$xoopsTpl->assign('whereInSection', $myts->displayTarea($xoopsModule->getVar('name')));
$xoopsTpl->assign('modulename', $xoopsModule->dirname());