Esempio n. 1
0
            $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());
$xoopsTpl->assign('lang_category_summary', sprintf(_MD_SS_CATEGORY_SUMMARY, $categoryObj->name()));
$xoopsTpl->assign('lang_category_summary_info', sprintf(_MD_SS_CATEGORY_SUMMARY_INFO, $categoryObj->name()));
$xoopsTpl->assign('lang_items_title', sprintf(_MD_SS_ITEMS_TITLE, $categoryObj->name()));
$xoopsTpl->assign('lang_items_info', _MD_SS_ITEMS_INFO);
$xoopsTpl->assign('module_home', ss_module_home($xoopsModuleConfig['linkedPath']));
$xoopsTpl->assign('categoryPath', $category['categoryPath']);