Ejemplo n.º 1
0
 function &loadPermData($perm_name = "forum_access")
 {
     if (!($perms = mod_loadCacheFile("permission_{$perm_name}", "newbb"))) {
         $perms = $this->createPermData($perm_name);
     }
     return $perms;
 }
         }
         $type_obj =& $types_obj[$key];
         echo "<tr class='even' align='left'>";
         echo "<td><em style='color:" . $type_obj->getVar("type_color") . "'>" . $type_obj->getVar("type_name") . "</em></td>";
         echo "<td>" . $order . "</td>";
         echo "<td>" . $type_obj->getVar("type_description") . "</td>";
         echo "</tr>";
         unset($types_obj[$key]);
     }
     echo "</table>";
     echo "<br />";
     $fmform->display();
     echo "</fieldset>";
     break;
 case "save_apply":
     if (!($templates = mod_loadCacheFile("type_template"))) {
         redirect_header(xoops_getenv("PHP_SELF") . "?op=template", 2, _AM_NEWBB_TYPE_TEMPLATE);
         exit;
     }
     foreach ($_POST["forums"] as $forum) {
         if ($forum < 1) {
             continue;
         }
         $type_handler->updateByForum($forum, array_flip($templates));
     }
     redirect_header(xoops_getenv("PHP_SELF"), 2, _MD_DBUPDATED);
     break;
 case "forum":
     $category_handler =& xoops_getmodulehandler('category', 'newbb');
     $criteria_category = new CriteriaCompo(new criteria('1', 1));
     $criteria_category->setSort('cat_order');
Ejemplo n.º 3
0
function newbb_getParentForum($forum_id = 0, $refresh = false)
{
    static $list = null;
    if (!isset($list)) {
        require_once XOOPS_ROOT_PATH . '/Frameworks/art/functions.cache.php';
        $list = mod_loadCacheFile("forum_parent", "newbb");
    }
    if (!is_array($list) || $refresh) {
        $list = newbb_createParentForumList();
    }
    if ($forum_id == 0) {
        return $list;
    } else {
        return @$list[$forum_id];
    }
}
Ejemplo n.º 4
0
 /**
  * Get structured categories
  *
  * @int integer     $pid    parent category ID
  *
  * @return array
  */
 function art_getSubCategory($pid = 0, $refresh = false)
 {
     $list = @mod_loadCacheFile("category", $GLOBALS["artdirname"]);
     if (!is_array($list) || $refresh) {
         $list = art_createSubCategoryList();
     }
     if ($pid == 0) {
         return $list;
     } else {
         return @$list[$pid];
     }
 }
Ejemplo n.º 5
0
    function &getTemplate()
    {
		$perms = mod_loadCacheFile("perm_template", "xforum");
		return $perms;
    }
Ejemplo n.º 6
0
 function newbb_getParentForum($forum_id = 0, $refresh = false)
 {
     static $list = null;
     if (!isset($list)) {
         load_functions("cache");
         $list = mod_loadCacheFile("forum_parent", "newbb");
     }
     if (!is_array($list) || $refresh) {
         $list = newbb_createParentForumList();
     }
     if ($forum_id == 0) {
         return $list;
     } else {
         return @$list[$forum_id];
     }
 }