/** * get a list of parsed sponsors of the topic * * @return array */ function &getSponsor() { $ret = art_parseLinks($this->getVar("top_sponsor", "e")); return $ret; }
} } $categories[] =& $cat; unset($cat); } $topic_handler =& xoops_getmodulehandler("topic", $GLOBALS["artdirname"]); $criteria = new CriteriaCompo(new Criteria("top_expire", time(), ">")); $criteria->setSort("top_time"); $criteria->setOrder("DESC"); $tags = array("top_title"); $topics_obj =& $topic_handler->getByCategory(array_keys($categories_obj), $xoopsModuleConfig["topics_max"], 0, $criteria, $tags); foreach ($topics_obj as $topic) { $topics[] = array("id" => $topic->getVar("top_id"), "title" => $topic->getVar("top_title")); } unset($topics_obj); } $sponsors = array(); if (!empty($xoopsModuleConfig["sponsor"])) { $sponsors = art_parseLinks($xoopsModuleConfig["sponsor"]); } unset($articles_obj, $categories_obj); $xoopsTpl->assign("header", $xoopsModuleConfig["header"]); $xoopsTpl->assign_by_ref("spotlight", $spotlight); $xoopsTpl->assign_by_ref("features", $features); $xoopsTpl->assign_by_ref("articles", $articles_index); $xoopsTpl->assign_by_ref("categories", $categories); $xoopsTpl->assign_by_ref("topics", $topics); $xoopsTpl->assign_by_ref("sponsors", $sponsors); // Loading module meta data, NOT THE RIGHT WAY DOING IT $xoopsTpl->assign("xoops_module_header", $xoopsOption["xoops_module_header"]); include_once "footer.php";
// Keywords $article_data["keywords"] = trim($p_keywords); // text of page $article_data["text"] = array("title" => $p_subtitile, "body" => $p_text); require_once XOOPS_ROOT_PATH . "/class/pagenav.php"; $count_page = $art_id > 0 ? $article_obj->getPagecount(true) : 1; if (!empty($newpage)) { $count_page++; $curr_page = $newpage - 1; } else { $curr_page = $page; } $nav = new XoopsPageNav($count_page, 1, $curr_page, "page", "category=" . $cat_id . "&article=" . $art_id); $article_data["pages"] = $nav->renderNav(5); // elinks $elinks = art_parseLinks($p_elinks); $template = $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST["art_template"])); $_template = art_getTemplate("article", $template); $module_header = art_getModuleHeader($_template); $xoopsTpl->assign("xoops_module_header", $module_header); require_once XOOPS_ROOT_PATH . "/class/template.php"; $tpl = new XoopsTpl(); $tpl->assign("article", $article_data); $tpl->assign("dirname", $GLOBALS["artdirname"]); $tpl->assign("modulename", $xoopsModule->getVar("name")); $tpl->assign("elinks", $elinks); $tpl->assign("page", $page); $tpl->assign("xoops_url", XOOPS_URL); $tpl->display("db:" . $_template); } foreach (array("art_title", "uid", "writer_id", "art_source", "art_keywords", "art_elinks", "art_image_caption", "art_template", "art_summary", "trackbacks", "subtitle", "text", "dohtml", "dosmiley", "doxcode", "dobr", "editor") as $tag) {
/** * get a list of parsed sponsors of the category * * @return array */ function &getSponsor() { $sponsors = art_parseLinks($this->getVar("cat_sponsor", "e")); return $sponsors; }
if (!empty($xoopsModuleConfig["sibling_length"])) { $articles_sibling["previous"]["title"] = xoops_substr($articles_sibling["previous"]["title"], 0, $xoopsModuleConfig["sibling_length"]); } } if (!empty($articles_sibling["next"])) { $articles_sibling["next"]["url"] = XOOPS_URL . "/modules/" . $GLOBALS["artdirname"] . "/view.article.php" . URL_DELIMITER . $articles_sibling["next"]["id"] . "/c" . $idCategorized; $articles_sibling["next"]["title"] = $myts->htmlSpecialChars($articles_sibling["next"]["title"]); if (!empty($xoopsModuleConfig["sibling_length"])) { $articles_sibling["next"]["title"] = xoops_substr($articles_sibling["next"]["title"], 0, $xoopsModuleConfig["sibling_length"]); } } } $xoopsTpl->assign("modulename", $xoopsModule->getVar("name")); $xoopsTpl->assign("copyright", sprintf($xoopsModuleConfig["copyright"], !empty($article_data["writer"]["name"]) ? $article_data["writer"]["name"] : $article_data["author"])); $xoopsTpl->assign("tracks", $category_handler->getTrack($category_obj, true)); $xoopsTpl->assign("links", art_parseLinks($article_obj->getVar("art_elinks", "E"))); // related external links $xoopsTpl->assign_by_ref("article", $article_data); $xoopsTpl->assign_by_ref("categories", $categories); $xoopsTpl->assign_by_ref("topics", $topics); $xoopsTpl->assign_by_ref("trackbacks", $trackbacks); $xoopsTpl->assign_by_ref("sibling", $articles_sibling); $xoopsTpl->assign("isadmin", $isAdmin); $xoopsTpl->assign("isauthor", $isAuthor); $xoopsTpl->assign("do_counter", $xoopsModuleConfig["do_counter"]); $xoopsTpl->assign("do_trackback", $xoopsModuleConfig["do_trackback"]); $xoopsTpl->assign("canRate", !empty($xoopsModuleConfig["do_rate"]) && $category_handler->getPermission($category_obj, "rate")); $xoopsTpl->assign("page", $page); $xoopsTpl->assign("sponsors", $category_obj->getSponsor()); if (@(include_once XOOPS_ROOT_PATH . "/modules/tag/include/tagbar.php")) { $xoopsTpl->assign('tagbar', tagBar($article_obj->getVar("art_keywords", "n")));