当前位置: 首页>>代码示例>>PHP>>正文


PHP mod_loadFunctions函数代码示例

本文整理汇总了PHP中mod_loadFunctions函数的典型用法代码示例。如果您正苦于以下问题:PHP mod_loadFunctions函数的具体用法?PHP mod_loadFunctions怎么用?PHP mod_loadFunctions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了mod_loadFunctions函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 function &art_getWriterNameFromIds($writer_ids, $linked = false)
 {
     if (!is_array($writer_ids)) {
         $writer_ids = array($writer_ids);
     }
     $userid = array_map("intval", array_filter($writer_ids));
     $myts =& MyTextSanitizer::getInstance();
     $users = array();
     if (count($userid) > 0) {
         $sql = 'SELECT writer_id, writer_name FROM ' . art_DB_prefix("writer") . ' WHERE writer_id IN(' . implode(",", array_unique($userid)) . ')';
         if (!($result = $GLOBALS['xoopsDB']->query($sql))) {
             //xoops_error("writer query error: " . $sql);
             return $users;
         }
         mod_loadFunctions("url", $GLOBALS["artdirname"]);
         while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) {
             $uid = $row["writer_id"];
             $users[$uid] = $myts->htmlSpecialChars($row["writer_name"]);
             if ($linked) {
                 $users[$uid] = '<a href="' . art_buildUrl(XOOPS_URL . "/modules/" . $GLOBALS["artdirname"] . "/view.writer.php", array("writer" => $uid)) . '">' . $users[$uid] . '</a>';
             }
         }
     }
     return $users;
 }
开发者ID:trabisdementia,项目名称:xuups,代码行数:25,代码来源:functions.author.php

示例2: getValidItems

 function getValidItems($mid, $id = 0)
 {
     static $suspension = array();
     $full_items = array();
     if (empty($mid)) {
         return $full_items;
     }
     mod_loadFunctions("user", "newbb");
     $uid = is_object($GLOBALS["xoopsUser"]) ? $GLOBALS["xoopsUser"]->getVar("uid") : 0;
     $ip = newbb_getIP(true);
     if (!empty($GLOBALS["xoopsModuleConfig"]['enable_usermoderate']) && !isset($suspension[$uid][$id]) && !newbb_isAdmin($id)) {
         $moderate_handler =& xoops_getmodulehandler('moderate', 'newbb');
         if ($moderate_handler->verifyUser($uid, "", $id)) {
             $suspension[$uid][$ip][$id] = 1;
         } else {
             $suspension[$uid][$ip][$id] = 0;
         }
     }
     $items = $this->getValidPerms();
     foreach ($items as $item) {
         /* skip access for suspended users */
         //if ( !empty($suspension[$uid][$ip][$id]) && in_array($item, array("post", "reply", "edit", "delete", "addpoll", "vote", "attach", "noapprove", "type")) ) continue;
         if (!empty($suspension[$uid][$ip][$id])) {
             continue;
         }
         $full_items[] = "'forum_{$item}'";
     }
     return $full_items;
 }
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:29,代码来源:permission.forum.php

示例3: xoops_module_update_tag

function xoops_module_update_tag(&$module, $prev_version = null)
{
    load_functions("config");
    mod_clearConfg($module->getVar("dirname", "n"));
    if ($prev_version <= 150) {
        $GLOBALS['xoopsDB']->queryFromFile(XOOPS_ROOT_PATH . "/modules/" . $module->getVar("dirname") . "/sql/mysql.150.sql");
    }
    /* Do some synchronization */
    mod_loadFunctions("recon", $module->getVar("dirname"));
    tag_synchronization();
    return true;
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:12,代码来源:action.module.php

示例4: getTime

 function getTime($format = "")
 {
     if (empty($format)) {
         if (!is_object($GLOBALS["xoopsModule"]) || $GLOBALS["xoopsModule"]->getVar("dirname") != $GLOBALS["artdirname"]) {
             $module_handler =& xoops_gethandler("module");
             $artModule =& $module_handler->getByDirname($GLOBALS["artdirname"]);
             $config_handler =& xoops_gethandler("config");
             $artConfig =& $config_handler->getConfigsByCat(0, $artModule->getVar("mid"));
             $format = $artConfig["timeformat"];
         } else {
             $format = $GLOBALS["xoopsModuleConfig"]["timeformat"];
         }
     }
     mod_loadFunctions("time", $GLOBALS["artdirname"]);
     $time = art_formatTimestamp($this->getVar("sp_time"), $format);
     return $time;
 }
开发者ID:trabisdementia,项目名称:xuups,代码行数:17,代码来源:spotlight.php

示例5: getPermission

 function getPermission($forum, $topic_locked = 0, $type = "view")
 {
     global $xoopsUser, $xoopsModule;
     static $_cachedTopicPerms;
     mod_loadFunctions("user", "newbb");
     if (newbb_isAdmin($forum)) {
         return 1;
     }
     $forum_id = is_object($forum) ? $forum->getVar('forum_id') : intval($forum);
     if ($forum_id < 1) {
         return false;
     }
     if ($topic_locked && 'view' != $type) {
         $permission = 0;
     } else {
         $perm_handler =& xoops_getmodulehandler('permission', 'newbb');
         $permission = $perm_handler->getPermission("forum", $type, $forum_id);
     }
     return $permission;
 }
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:20,代码来源:topic.php

示例6: array

    $articles_count = $article_handler->getCount($criteria);
    $tags = array("cat_id", "art_summary", "art_title", "art_time_submit", "art_time_publish", "art_summary", "uid");
    $criteria->setStart($start);
    $criteria->setLimit($xoopsModuleConfig["articles_perpage"]);
    $articles_array = $article_handler->getAll($criteria, $tags, false);
}
$articles = array();
if (count($articles_array) > 0) {
    $author_array = array();
    foreach ($articles_array as $id => $artcile) {
        if ($artcile["uid"] > 0) {
            $author_array[$artcile["uid"]] = 1;
        }
    }
    if (!empty($author_array)) {
        mod_loadFunctions("author");
        $users = art_getAuthorNameFromId(array_keys($author_array), true, true);
    }
    foreach ($articles_array as $id => $article) {
        $_article = array("id" => $article["art_id"], "cat_id" => empty($article["basic_cat_id"]) ? $article["cat_id"] : $article["basic_cat_id"], "title" => $article["art_title"], "submit" => art_formatTimestamp(@$article["art_time_submit"]), "publish" => art_formatTimestamp(@$article["art_time_publish"]), "register_category" => art_formatTimestamp(@$article["ac_register"]), "time_topic" => art_formatTimestamp(@$article["at_time"]), "summary" => $article["art_summary"], "author" => $users[$article["uid"]]);
        if (!empty($article["ac_feature"])) {
            $_article["feature_category"] = art_formatTimestamp($article["ac_feature"]);
        }
        if (!empty($article["ac_publish"])) {
            $_article["publish_category"] = art_formatTimestamp($article["ac_publish"]);
        }
        if (!empty($category_obj)) {
            $_article["category"] = array("id" => $category_obj->getVar("cat_id"));
        } else {
            $_article["category"] = array("id" => $article["cat_id"], "title" => $categories_obj[$article["cat_id"]]->getVar("cat_title"));
        }
开发者ID:trabisdementia,项目名称:xuups,代码行数:31,代码来源:cp.article.php

示例7: mod_loadFunctions

/**
 * CBB 4.0, or newbb, the forum module for XOOPS project
 *
 * @copyright	The XOOPS Project http://xoops.sf.net
 * @license		http://www.fsf.org/copyleft/gpl.html GNU public license
 * @author		Taiwen Jiang (phppp or D.J.) <phppp@users.sourceforge.net>
 * @since		4.00
 * @version		$Id $
 * @package		module::newbb
 */
if (!defined('XOOPS_ROOT_PATH')) {
    exit;
}
include_once XOOPS_ROOT_PATH . '/modules/newbb/include/functions.ini.php';
mod_loadFunctions("session", "newbb");
// NewBB cookie structure
/* NewBB cookie storage
	Long term cookie: (configurable, generally one month)
		LV - Last Visit
		M - Menu mode
		V - View mode
		G - Toggle
	Short term cookie: (same as session life time)
		ST - Stored Topic IDs for mark
		LP - Last Post
		LF - Forum Last view
		LT - Topic Last read
		LVT - Last Visit Temp
*/
/* -- Cookie settings -- */
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:30,代码来源:vars.php

示例8: newbb_displayImage

        $thread_buttons['reply']['name'] = _MD_REPLY;
    }
    if (!$isadmin && $xoopsModuleConfig['reportmod_enabled']) {
        $thread_buttons['report']['image'] = newbb_displayImage('p_report', _MD_REPORT);
        $thread_buttons['report']['link'] = "report.php?forum=" . $post->getVar('forum_id') . "&amp;topic_id=" . $post->getVar('topic_id');
        $thread_buttons['report']['name'] = _MD_REPORT;
    }
    $thread_action = array();
    $xoopsTpl->append('posts', array('post_id' => $post->getVar('post_id'), 'topic_id' => $post->getVar('topic_id'), 'forum_id' => $post->getVar('forum_id'), 'post_date' => newbb_formatTimestamp($post->getVar('post_time')), 'post_image' => $post_image, 'post_title' => $post_title, 'post_text' => $post_text, 'post_attachment' => $post_attachment, 'post_edit' => $post->displayPostEdit(), 'post_no' => $start + $pn, 'post_signature' => $post->getVar('attachsig') ? @$poster["signature"] : "", 'poster_ip' => $isadmin && $xoopsModuleConfig['show_ip'] ? long2ip($post->getVar('poster_ip')) : "", 'thread_action' => $thread_action, 'thread_buttons' => $thread_buttons, 'poster' => $poster));
    unset($thread_buttons);
    unset($poster);
}
unset($viewtopic_users);
unset($forums);
if (!empty($xoopsModuleConfig['show_jump'])) {
    mod_loadFunctions("forum", "newbb");
    $xoopsTpl->assign('forum_jumpbox', newbb_make_jumpbox($forum_id));
}
if ($postCount > $post_perpage) {
    include XOOPS_ROOT_PATH . '/class/pagenav.php';
    $nav = new XoopsPageNav($postCount, $post_perpage, $start, "start", 'forum=' . $forum_id . '&amp;viewmode=' . $viewmode . '&amp;status=' . $status . '&amp;uid=' . $uid . '&amp;order=' . $order . "&amp;mode=" . $mode);
    $xoopsTpl->assign('pagenav', $nav->renderNav(4));
} else {
    $xoopsTpl->assign('pagenav', '');
}
$xoopsTpl->assign('lang_forum_index', sprintf(_MD_FORUMINDEX, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));
switch ($status) {
    case 'active':
        $lang_title = _MD_VIEWALLPOSTS . ' [' . _MD_TYPE_ADMIN . ']';
        break;
    case 'pending':
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:viewpost.php

示例9: newbb_trackback_response

if (count($valid_forums) == 0) {
    newbb_trackback_response(1, _NOPERM);
}
$charset = 'UTF-8';
header('Content-Type:text/xml; charset=' . $charset);
$tpl = new XoopsTpl();
$tpl->caching = 2;
$tpl->cache_lifetime = $xoopsModuleConfig['rss_cachetime'] * 60;
if (!empty($xoopsConfig['rewrite'])) {
    $tpl->load_filter('output', 'xoRewriteModule');
}
mod_loadFunctions("cache");
$xoopsCachedTemplateId = md5(mod_generateCacheId_byGroup() . str_replace(XOOPS_URL, '', $_SERVER['REQUEST_URI']));
$compile_id = NULL;
if (!$tpl->is_cached('db:newbb_rss.html', $xoopsCachedTemplateId, $compile_id)) {
    mod_loadFunctions("time", "newbb");
    $xmlrss_handler =& xoops_getmodulehandler('xmlrss', 'newbb');
    $rss = $xmlrss_handler->create();
    $rss->setVarRss('channel_title', $xoopsConfig['sitename'] . ' :: ' . _MD_FORUM);
    $rss->channel_link = XOOPS_URL . '/';
    $rss->setVarRss('channel_desc', $xoopsConfig['slogan'] . ' :: ' . $xoopsModule->getInfo('description'));
    // There is a "bug" with xoops function formatTimestamp(time(), 'rss')
    // We have to make a customized function
    //$rss->channel_lastbuild = formatTimestamp(time(), 'rss');
    $rss->setVarRss('channel_lastbuild', newbb_formatTimestamp(time(), 'rss'));
    $rss->channel_webmaster = $xoopsConfig['adminmail'];
    $rss->channel_editor = $xoopsConfig['adminmail'];
    $rss->setVarRss('channel_category', $xoopsModule->getVar('name'));
    $rss->channel_generator = "CBB " . $xoopsModule->getInfo('version');
    $rss->channel_language = _LANGCODE;
    $rss->xml_encoding = $charset;
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:rss.php

示例10: loadUserOnline

 function loadUserOnline()
 {
     if (empty($this->users) || !$this->enableOnline) {
         return;
     }
     mod_loadFunctions("render", "newbb");
     $image_online = newbb_displayImage('online', _MD_ONLINE);
     $image_offline = newbb_displayImage('offline', _MD_OFFLINE);
     $online_handler =& xoops_getmodulehandler('online', 'newbb');
     $onlines = $online_handler->checkStatus(array_keys($this->users));
     foreach (array_keys($this->users) as $uid) {
         $this->userlist[$uid]["status"] = empty($onlines[$uid]) ? $image_offline : $image_online;
     }
 }
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:14,代码来源:user.php

示例11: mod_loadFunctions

// it under the terms of the GNU General Public License as published by     //
// the Free Software Foundation; either version 2 of the License, or        //
// (at your option) any later version.                                      //
//                                                                          //
// You may not change or alter any portion of this comment or credits       //
// of supporting developers from this source code or any supporting         //
// source code which is considered copyrighted (c) material of the          //
// original comment or credit authors.                                      //
//                                                                          //
// This program is distributed in the hope that it will be useful,          //
// but WITHOUT ANY WARRANTY; without even the implied warranty of           //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
// GNU General Public License for more details.                             //
//                                                                          //
// You should have received a copy of the GNU General Public License        //
// along with this program; if not, write to the Free Software              //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------ //
// Author: phppp (D.J., infomax@gmail.com)                                  //
// URL: http://xoopsforge.com, http://xoops.org.cn                          //
// Project: Article Project                                                 //
// ------------------------------------------------------------------------ //
include "../../../include/cp_header.php";
include XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/include/vars.php";
mod_loadFunctions();
load_functions("admin");
// include the default language file for the admin interface
if (!@(include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/language/" . $xoopsConfig['language'] . "/main.php")) {
    include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/language/english/main.php";
}
$myts =& MyTextSanitizer::getInstance();
开发者ID:trabisdementia,项目名称:xuups,代码行数:31,代码来源:header.php

示例12: cleanOrphan

 /**
  * clean orphan links from database
  * 
  * @return 	bool	true on success
  */
 function cleanOrphan()
 {
     mod_loadFunctions("recon");
     return tag_cleanOrphan();
     return true;
 }
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:11,代码来源:tag.php

示例13: mod_loadFunctions

<?php

/**
 * Article module for XOOPS
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         http://www.fsf.org/copyleft/gpl.html GNU public license
 * @package         article
 * @since           1.0
 * @author          Taiwen Jiang <phppp@users.sourceforge.net>
 * @version         $Id: header.php 2178 2008-09-26 08:34:09Z phppp $
 */
include_once '../../mainfile.php';
include XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/include/vars.php";
mod_loadFunctions("", $xoopsModule->getVar("dirname"));
art_define_url_delimiter();
$myts =& MyTextSanitizer::getInstance();
开发者ID:trabisdementia,项目名称:xuups,代码行数:24,代码来源:header.php

示例14: strtolower

 /**
  * get text content of a specified page of the article
  *
  * @param int $page page no
  * @param string $format text format
  * @return array
  */
 function &getText($page = -1, $format = "s")
 {
     global $xoopsModuleConfig;
     $format = strtolower($format);
     $text = $this->_getText($page, $format);
     if (empty($text)) {
         return $text;
     }
     if ($format == "e" || $format == "edit" || $format == "n" || $format == "none") {
         return $text;
     }
     if ($format == "raw") {
         mod_loadFunctions("render", $GLOBALS["artdirname"]);
         $ret = array("title" => art_htmlSpecialChars($text["title"]), "body" => art_displayTarea($text["body"]));
         return $ret;
     }
     $body =& $text["body"];
     $body = $this->parseNotes($body);
     $body = $this->parseHeadings($body);
     $ret = array("title" => $text["title"], "body" => $body);
     return $ret;
 }
开发者ID:trabisdementia,项目名称:xuups,代码行数:29,代码来源:article.php

示例15: mod_loadFunctions

 /**
  * Deprecated
  */
 function &show_online()
 {
     mod_loadFunctions("render", "newbb");
     mod_loadFunctions("user", "newbb");
     if ($this->topic_id) {
         $criteria = new Criteria('online_topic', $this->topic_id);
     } elseif ($this->forum_id) {
         $criteria = new Criteria('online_forum', $this->forum_id);
     } else {
         $criteria = null;
     }
     $users =& $this->getAll($criteria);
     $num_total = count($users);
     $num_user = 0;
     $users_id = array();
     $users_online = array();
     for ($i = 0; $i < $num_total; $i++) {
         if (empty($users[$i]['online_uid'])) {
             continue;
         }
         $users_id[] = $users[$i]['online_uid'];
         $users_online[$users[$i]['online_uid']] = array("link" => XOOPS_URL . "/userinfo.php?uid=" . $users[$i]['online_uid'], "uname" => $users[$i]['online_uname']);
         $num_user++;
     }
     $num_anonymous = $num_total - $num_user;
     $online = array();
     $online['image'] = newbb_displayImage('whosonline');
     $online['num_total'] = $num_total;
     $online['num_user'] = $num_user;
     $online['num_anonymous'] = $num_anonymous;
     $administrator_list = newbb_isModuleAdministrators($users_id);
     $moderator_list = array();
     if ($member_list = array_diff($users_id, array_keys($administrator_list))) {
         if (is_object($this->forum_object)) {
             $moderator_list = $this->forum_object->getVar("forum_moderator");
         } else {
             $moderator_list = newbb_isForumModerators($member_list);
         }
     }
     foreach ($users_online as $uid => $user) {
         if (in_array($uid, $administrator_list)) {
             $user['level'] = 2;
         } elseif (in_array($uid, $moderator_list)) {
             $user['level'] = 1;
         } else {
             $user['level'] = 0;
         }
         $online["users"][] = $user;
     }
     return $online;
 }
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:54,代码来源:online.php


注:本文中的mod_loadFunctions函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。