• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP xoops_load函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: b_mylinks_random_show

/**
 * Mylinks Random Term Block
 *
 * Xoops Mylinks - a links module
 *
 * 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::    mylinks
 * @subpackage:: blocks
 * @author::     hsalazar
 * @author::     zyspec (owners@zyspec)
 * @version::    $Id$
 * @since::      File available since Release 3.11
 */
function b_mylinks_random_show()
{
    global $xoopsDB, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsUser;
    $mylinksDir = basename(dirname(dirname(__FILE__)));
    xoops_load('mylinksUtility', $mylinksDir);
    $myts =& MyTextSanitizer::getInstance();
    $block = array();
    $result = $xoopsDB->query("SELECT l.lid, l.cid, l.title, l.url, l.logourl, l.status, l.date, l.hits, l.rating, l.votes, l.comments, t.description FROM " . $xoopsDB->prefix("mylinks_links") . " l, " . $xoopsDB->prefix("mylinks_text") . " t WHERE l.lid=t.lid AND status>0 ORDER BY RAND() LIMIT 0,1");
    if ($result) {
        list($lid, $cid, $ltitle, $url, $logourl, $status, $time, $hits, $rating, $votes, $comments, $description) = $xoopsDB->fetchRow($result);
        $link = $myts->displayTarea(ucfirst($ltitle));
        $description = $myts->displayTarea(mb_substr($description, 0, 100)) . "...";
        $mylinksCatHandler = xoops_getmodulehandler('category', $mylinksDir);
        $catObj = $mylinksCatHandler->get($cid);
        if (is_object($catObj) && !empty($catObj)) {
            $categoryName = $catObj->getVar('title');
            $categoryName = $myts->displayTarea($categoryName);
        } else {
            $cid = 0;
            $categoryName = '';
        }
        $block['title'] = _MB_MYLINKS_RANDOMTITLE;
        $block['content'] = "<div style=\"font-size: 12px; font-weight: bold; background-color: #ccc; padding: 4px; margin: 0;\"><a href=\"" . XOOPS_URL . "/modules/{$mylinksDir}/category.php?cid={$cid}\">{$categoryName}</a></div>";
        $block['content'] .= "<div style=\"padding: 4px 0 0 0; color: #456;\"><h5 style=\"margin: 0;\"><a href=\"" . XOOPS_URL . "/modules/{$mylinksDir}/entry.php?lid={$lid}\">{$link}</a></h5><div>{$description}</div>";
        unset($catObj, $mylinksCatHandler);
        $block['content'] .= "<div style=\"text-align: right; font-size: x-small;\"><a href=\"" . XOOPS_URL . "/modules/{$mylinksDir}/index.php\">" . _MB_MYLINKS_SEEMORE . "</a></div>";
    }
    return $block;
}
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:50,代码来源:mylinks_rand.php


示例2: loadHandler

 /**
  * Load object handler
  *
  * @access public
  * @param object $ohandler reference to {@link XoopsPersistableObjectHandler}
  * @param string $name handler name
  * @param mixed $args args
  * @return object of handler
  */
 function loadHandler($ohander, $name, $args = null)
 {
     static $handlers;
     if (!isset($handlers[$name])) {
         if (file_exists($file = dirname(__FILE__) . '/' . $name . '.php')) {
             include_once $file;
             $className = 'XoopsModel' . ucfirst($name);
             $handler = new $className();
         } else {
             if (xoops_load('model', 'framework')) {
                 $handler = XoopsModel::loadHandler($name);
             }
         }
         if (!is_object($handler)) {
             trigger_error('Handler not found in file ' . __FILE__ . 'at line ' . __LINE__, E_USER_WARNING);
             return null;
         }
         $handlers[$name] = $handler;
     }
     $handlers[$name]->setHandler($ohander);
     if (!empty($args) && is_array($args) && is_a($handlers[$name], 'XoopsModelAbstract')) {
         $handlers[$name]->setVars($args);
     }
     return $handlers[$name];
 }
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:34,代码来源:xoopsmodel.php


示例3: getFormInfofields

 /**
  * Get form
  *
  * @param bool|mixed $action
  * @return XoopsThemeForm
  */
 public function getFormInfofields($action = false)
 {
     global $xoopsUser;
     if ($action === false) {
         $action = $_SERVER['REQUEST_URI'];
     }
     // Title
     $title = $this->isNew() ? sprintf(_AM_WGTEAMS_INFOFIELD_ADD) : sprintf(_AM_WGTEAMS_INFOFIELD_EDIT);
     // Get Theme Form
     xoops_load('XoopsFormLoader');
     $form = new XoopsThemeForm($title, 'form', $action, 'post', true);
     $form->setExtra('enctype="multipart/form-data"');
     // Infofields handler
     //$infofieldsHandler = $this->wgteams->getHandler('infofields');
     // Form Text AddField_name
     $form->addElement(new XoopsFormText(_AM_WGTEAMS_INFOFIELD_NAME, 'infofield_name', 50, 255, $this->getVar('infofield_name')), true);
     // Form Select User
     $submitter = $this->isNew() ? $xoopsUser->getVar('uid') : $this->getVar('infofield_submitter');
     $form->addElement(new XoopsFormSelectUser(_AM_WGTEAMS_SUBMITTER, 'infofield_submitter', false, $submitter, 1, false));
     // Form Text Date Select
     $form->addElement(new XoopsFormTextDateSelect(_AM_WGTEAMS_DATE_CREATE, 'infofield_date_created', '', $this->getVar('infofield_date_created')));
     // Send
     $form->addElement(new XoopsFormHidden('op', 'save'));
     $form->addElement(new XoopsFormButtonTray('', _SUBMIT, 'submit', '', false));
     return $form;
 }
开发者ID:ggoffy,项目名称:wgteams,代码行数:32,代码来源:infofields.php


示例4: publisher_pagewrap_upload

/**
 * @param $errors
 *
 * @return bool
 */
function publisher_pagewrap_upload(&$errors)
{
    //    include_once PUBLISHER_ROOT_PATH . '/class/uploader.php';
    xoops_load('XoopsMediaUploader');
    $publisher =& PublisherPublisher::getInstance();
    $postField = 'fileupload';
    $maxFileSize = $publisher->getConfig('maximum_filesize');
    $maxImageWidth = $publisher->getConfig('maximum_image_width');
    $maxImageHeight = $publisher->getConfig('maximum_image_height');
    if (!is_dir(publisherGetUploadDir(true, 'content'))) {
        mkdir(publisherGetUploadDir(true, 'content'), 0757);
    }
    $allowedMimeTypes = array('text/html', 'text/plain', 'application/xhtml+xml');
    $uploader = new XoopsMediaUploader(publisherGetUploadDir(true, 'content') . '/', $allowedMimeTypes, $maxFileSize, $maxImageWidth, $maxImageHeight);
    if ($uploader->fetchMedia($postField)) {
        $uploader->setTargetFileName($uploader->getMediaName());
        if ($uploader->upload()) {
            return true;
        } else {
            $errors = array_merge($errors, $uploader->getErrors(false));
            return false;
        }
    } else {
        $errors = array_merge($errors, $uploader->getErrors(false));
        return false;
    }
}
开发者ID:trabisdementia,项目名称:publisher,代码行数:32,代码来源:pw_upload_file.php


示例5: publisher_search

/**
 * @param        $queryarray
 * @param        $andor
 * @param        $limit
 * @param        $offset
 * @param        $userid
 * @param array  $categories
 * @param int    $sortby
 * @param string $searchin
 * @param string $extra
 *
 * @return array
 */
function publisher_search($queryarray, $andor, $limit, $offset, $userid, $categories = array(), $sortby = 0, $searchin = '', $extra = '')
{
    $publisher =& PublisherPublisher::getInstance();
    $ret = array();
    if ($queryarray == '' || count($queryarray) == 0) {
        $hightlightKey = '';
    } else {
        $keywords = implode('+', $queryarray);
        $hightlightKey = '&amp;keywords=' . $keywords;
    }
    $itemsObjs =& $publisher->getHandler('item')->getItemsFromSearch($queryarray, $andor, $limit, $offset, $userid, $categories, $sortby, $searchin, $extra);
    $withCategoryPath = $publisher->getConfig('search_cat_path');
    //xoops_load("xoopslocal");
    $usersIds = array();
    foreach ($itemsObjs as $obj) {
        $item['image'] = 'assets/images/item_icon.gif';
        $item['link'] = $obj->getItemUrl();
        $item['link'] .= !empty($hightlightKey) && strpos($item['link'], '.php?') === false ? '?' . ltrim($hightlightKey, '&amp;') : $hightlightKey;
        if ($withCategoryPath) {
            $item['title'] = $obj->getCategoryPath(false) . ' > ' . $obj->getTitle();
        } else {
            $item['title'] = $obj->getTitle();
        }
        $item['time'] = $obj->getVar('datesub');
        //must go has unix timestamp
        $item['uid'] = $obj->uid();
        //"Fulltext search/highlight
        $text = $obj->getBody();
        $sanitizedText = '';
        $textLower = strtolower($text);
        $queryarray = is_array($queryarray) ? $queryarray : array($queryarray);
        if ($queryarray[0] != '' && count($queryarray) > 0) {
            foreach ($queryarray as $query) {
                $pos = strpos($textLower, strtolower($query));
                //xoops_local("strpos", $textLower, strtolower($query));
                $start = max($pos - 100, 0);
                $length = strlen($query) + 200;
                //xoops_local("strlen", $query) + 200;
                $context = $obj->highlight(xoops_substr($text, $start, $length, ' [...]'), $query);
                $sanitizedText .= '<p>[...] ' . $context . '</p>';
            }
        }
        //End of highlight
        $item['text'] = $sanitizedText;
        $item['author'] = $obj->author_alias();
        $item['datesub'] = $obj->getDatesub($publisher->getConfig('format_date'));
        $usersIds[$obj->uid()] = $obj->uid();
        $ret[] = $item;
        unset($item, $sanitizedText);
    }
    xoops_load('XoopsUserUtility');
    $usersNames = XoopsUserUtility::getUnameFromIds($usersIds, $publisher->getConfig('format_realname'), true);
    foreach ($ret as $key => $item) {
        if ($item['author'] == '') {
            $ret[$key]['author'] = isset($usersNames[$item['uid']]) ? $usersNames[$item['uid']] : '';
        }
    }
    unset($usersNames, $usersIds);
    return $ret;
}
开发者ID:trabisdementia,项目名称:publisher,代码行数:73,代码来源:search.inc.php


示例6: getForm

 /**
  * @param bool $action
  *
  * @return XoopsThemeForm
  */
 function getForm($action = false)
 {
     if ($action === false) {
         $action = $_SERVER['REQUEST_URI'];
     }
     $title = $this->isNew() ? sprintf(_AM_SYSTEM_BANNERS_ADDNWBNR) : sprintf(_AM_SYSTEM_BANNERS_EDITBNR);
     xoops_load('XoopsFormLoader');
     $form = new XoopsThemeForm($title, 'form', $action, 'post', true);
     $banner_client_Handler =& xoops_getModuleHandler('bannerclient', 'system');
     $client_select = new XoopsFormSelect(_AM_SYSTEM_BANNERS_CLINAMET, 'cid', $this->getVar('cid'));
     $client_select->addOptionArray($banner_client_Handler->getList());
     $form->addElement($client_select, true);
     $form->addElement(new XoopsFormText(_AM_SYSTEM_BANNERS_IMPPURCHT, 'imptotal', 20, 255, $this->getVar('imptotal')), true);
     $form->addElement(new XoopsFormText(_AM_SYSTEM_BANNERS_IMGURLT, 'imageurl', 80, 255, $this->getVar('imageurl')), false);
     $form->addElement(new XoopsFormText(_AM_SYSTEM_BANNERS_CLICKURLT, 'clickurl', 80, 255, $this->getVar('clickurl')), false);
     $htmlbanner = $this->isNew() ? 0 : $this->getVar('htmlbanner');
     $form->addElement(new XoopsFormRadioYN(_AM_SYSTEM_BANNERS_USEHTML, 'htmlbanner', $htmlbanner, _YES, _NO));
     $form->addElement(new xoopsFormTextArea(_AM_SYSTEM_BANNERS_CODEHTML, 'htmlcode', $this->getVar('htmlcode'), 5, 50), false);
     if (!$this->isNew()) {
         $form->addElement(new XoopsFormHidden('bid', $this->getVar('bid')));
     }
     $form->addElement(new XoopsFormHidden('op', 'banner_save'));
     $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
     //$form->display();
     return $form;
 }
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:31,代码来源:banner.php


示例7: __construct

 /**
  * FormDhtmlTextArea::__construct()
  *
  * @param array $options
  */
 function __construct($options = array())
 {
     parent::__construct($options);
     $this->rootPath = '/class/xoopseditor/' . basename(dirname(__FILE__));
     $hiddenText = isset($this->configs['hiddenText']) ? $this->configs['hiddenText'] : $this->_hiddenText;
     xoops_load('XoopsFormDhtmlTextArea');
     $this->renderer = new XoopsFormDhtmlTextArea('', $this->getName(), $this->getValue(), $this->getRows(), $this->getCols(), $hiddenText, $this->configs);
 }
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:13,代码来源:dhtmltextarea.php


示例8: array

 /**
  * Function to a list of user names associated with their user IDs
  *
  */
 function &art_getUnameFromId($uid, $usereal = 0, $linked = false)
 {
     if (!is_array($uid)) {
         $uid = array($uid);
     }
     xoops_load("userUtility");
     $ids = XoopsUserUtility::getUnameFromIds($uid, $usereal, $linked);
     return $ids;
 }
开发者ID:trabisdementia,项目名称:xuups,代码行数:13,代码来源:functions.user.php


示例9: xoopsCodeTarea

/**
 * Displayes xoopsCode buttons and target textarea to which xoopscodes are inserted
 *
 * @param   string $textarea_id a unique id of the target textarea
 * @param int      $cols
 * @param int      $rows
 * @param null     $suffix
 */
function xoopsCodeTarea($textarea_id, $cols = 60, $rows = 15, $suffix = null)
{
    xoops_load('XoopsFormDhtmlTextArea');
    $hiddenText = isset($suffix) ? 'xoopsHiddenText' . trim($suffix) : 'xoopsHiddenText';
    $content = isset($GLOBALS[$textarea_id]) ? $GLOBALS[$textarea_id] : '';
    $text_editor = new XoopsFormDhtmlTextArea('', $textarea_id, $content, $rows, $cols, $hiddenText);
    $text_editor->htmlEditor = null;
    $text_editor->smilies = false;
    echo $text_editor->render();
}
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:18,代码来源:xoopscodes.php


示例10: eventCoreFooterEnd

 /**
  * @param $args
  */
 function eventCoreFooterEnd($args)
 {
     global $resourcesModule, $resourcesConfigsList;
     if (empty($resourcesModule)) {
         if (is_a($resourcesModule = xoops_gethandler('module')->getByDirname(basename(dirname(__DIR__))), "XoopsModule")) {
             if (empty($resourcesConfigsList)) {
                 $resourcesConfigsList = xoops_gethandler('config')->getConfigsList($resourcesModule->getVar('mid'));
             }
         }
     }
     xoops_load("XoopsCache");
     xoops_load("XoopsLists");
     if (!($themes = XoopsCache::read(basename(dirname(__DIR__)) . '.available.themes'))) {
         $themes = json_decode(getURIData(sprintf(_MI_RESOURCES_THEMES, _RESOURCES_SUPPORTING)), true);
         if (!empty($themes)) {
             XoopsCache::write(basename(dirname(__DIR__)) . '.available.themes', $themes, 3600 * mt_rand(2.99999, 12.99999));
         }
     }
     if (!($modules = XoopsCache::read(basename(dirname(__DIR__)) . '.available.modules'))) {
         $modules = json_decode(getURIData(sprintf(_MI_RESOURCES_MODULES, _RESOURCES_SUPPORTING)), true);
         if (!empty($themes)) {
             XoopsCache::write(basename(dirname(__DIR__)) . '.available.modules', $modules, 3600 * mt_rand(2.99999, 12.99999));
         }
     }
     if (!($peers = XoopsCache::read(basename(dirname(__DIR__)) . '.available.peers'))) {
         $peers = json_decode(getURIData(sprintf(_MI_RESOURCES_PEERS, _RESOURCES_SUPPORTING)), true);
         if (!empty($themes)) {
             XoopsCache::write(basename(dirname(__DIR__)) . '.available.peers', $peers, 3600 * 24 * mt_rand(5.99999, 24.99999));
         }
     }
     if (!($modules = XoopsCache::read(basename(dirname(__DIR__)) . '.modules.delays') && $resourcesConfigsList['harvester'])) {
         XoopsCache::write(basename(dirname(__DIR__)) . '.modules', true, 3600 * 24 * 29);
         XoopsCache::write(basename(dirname(__DIR__)) . '.modules.delays', $modules = XoopsLists::getModulesList(), 3600 * 24 * 31);
         foreach ($modules as $module) {
             $map = getFolderMap($GLOBALS['xoops']->path('/modules/' . $module));
             XoopsCache::write(basename(dirname(__DIR__)) . '.module' . $module, true, $seconds = 3600 * 24 * mt_rand(21.69999, 42.998876));
             XoopsCache::write(basename(dirname(__DIR__)) . '.module' . $module . '.delays', $map, $seconds + 3600 * 4);
             if (is_dir(XOOPS_PATH . '/modules/' . $module)) {
                 $map = getFolderMap(XOOPS_PATH . '/modules/' . $module, XOOPS_PATH);
                 XoopsCache::write(basename(dirname(__DIR__)) . '.xoopslib' . $module, true, $seconds);
                 XoopsCache::write(basename(dirname(__DIR__)) . '.xoopslib' . $module . '.delays', $map, $seconds + 3600 * 4);
             }
         }
     }
     if (!($themes = XoopsCache::read(basename(dirname(__DIR__)) . '.themes.delays') && $resourcesConfigsList['harvester'])) {
         XoopsCache::write(basename(dirname(__DIR__)) . '.themes', true, 3600 * 24 * 29);
         XoopsCache::write(basename(dirname(__DIR__)) . '.themes.delays', $themes = XoopsLists::getThemesList(), 3600 * 24 * 31);
         foreach ($themes as $theme) {
             $map = getFolderMap($GLOBALS['xoops']->path('/themes/' . $theme));
             XoopsCache::write(basename(dirname(__DIR__)) . '.theme' . $theme, true, $seconds = 3600 * 24 * mt_rand(21.69999, 42.998876));
             XoopsCache::write(basename(dirname(__DIR__)) . '.theme' . $theme . '.delays', $map, $seconds + 3600 * 4);
         }
     }
 }
开发者ID:ChronolabsCooperative,项目名称:Xoops25ModuleResources,代码行数:57,代码来源:core.php


示例11: decode

 function decode($text)
 {
     $config = parent::loadConfig(dirname(__FILE__));
     if (empty($text) || empty($config['link'])) {
         return $text;
     }
     $charset = !empty($config['charset']) ? $config['charset'] : "UTF-8";
     xoops_load('xoopslocal');
     $ret = "<a href='" . sprintf($config['link'], urlencode(XoopsLocal::convert_encoding($text, $charset))) . "' rel='external' title=''>{$text}</a>";
     return $ret;
 }
开发者ID:yunsite,项目名称:xoopsdc,代码行数:11,代码来源:wiki.php


示例12: art_formatTimestamp

 /**
  * Function to convert UNIX time to formatted time string
  */
 function art_formatTimestamp($time, $format = "c", $timeoffset = null)
 {
     $artConfig = art_load_config();
     if (strtolower($format) == "reg" || strtolower($format) == "") {
         $format = "c";
     }
     if ((strtolower($format) == "custom" || strtolower($format) == "c") && !empty($artConfig["formatTimestamp_custom"])) {
         $format = $artConfig["formatTimestamp_custom"];
     }
     xoops_load("xoopslocal");
     return XoopsLocal::formatTimestamp($time, $format, $timeoffset);
 }
开发者ID:trabisdementia,项目名称:xuups,代码行数:15,代码来源:functions.time.php


示例13: mod_loadFile

 function mod_loadFile($name, $dirname = null, $root_path = XOOPS_CACHE_PATH)
 {
     global $xoopsModule;
     $data = null;
     if (empty($name)) {
         return $data;
     }
     $dirname = $dirname ? $dirname : (is_object($xoopsModule) ? $xoopsModule->getVar("dirname", "n") : "system");
     xoops_load('XoopsCache');
     $key = "{$dirname}_{$name}";
     return XoopsCache::read($key);
 }
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:12,代码来源:functions.cache.php


示例14: XoopsFormCalendar

 /**
  * Constuctor
  *
  * @param       string      $caption        caption
  * @param       string      $name           name
  * @param       string      $size           field size ( default : 15 )
  * @param       int         $value          field value ( default : time() )
  */
 function XoopsFormCalendar($caption, $name, $size = 15, $value = 0)
 {
     xoops_load('XoopsCalendar');
     $this->calendarHandler =& XoopsCalendar::getInstance();
     $this->calendarHandler->loadHandler();
     $value = !is_numeric($value) ? time() : intval($value);
     $size = !is_numeric($size) ? 15 : intval($size);
     $this->setCaption($caption);
     $this->setName($name);
     $this->setValue($value);
     $this->setSize($size);
 }
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:20,代码来源:formcalendar.php


示例15: load

 function load(&$ts, $text, $force = false)
 {
     global $xoopsUser, $xoopsConfig, $xoopsUserIsAdmin;
     if (empty($force) && $xoopsUserIsAdmin) {
         return $text;
     }
     // Built-in fitlers for XSS scripts
     // To be improved
     $text = $ts->filterXss($text);
     if (xoops_load("purifier", "framework")) {
         $text = XoopsPurifier::purify($text);
         return $text;
     }
     $tags = array();
     $search = array();
     $replace = array();
     $config = parent::loadConfig(dirname(__FILE__));
     if (!empty($config["patterns"])) {
         foreach ($config["patterns"] as $pattern) {
             if (empty($pattern['search'])) {
                 continue;
             }
             $search[] = $pattern['search'];
             $replace[] = $pattern['replace'];
         }
     }
     if (!empty($config["tags"])) {
         $tags = array_map("trim", $config["tags"]);
     }
     // Set embedded tags
     $tags[] = "SCRIPT";
     $tags[] = "VBSCRIPT";
     $tags[] = "JAVASCRIPT";
     foreach ($tags as $tag) {
         $search[] = "/<" . $tag . "[^>]*?>.*?<\\/" . $tag . ">/si";
         $replace[] = " [!" . strtoupper($tag) . " FILTERED!] ";
     }
     // Set meta refresh tag
     $search[] = "/<META[^>\\/]*HTTP-EQUIV=(['\"])?REFRESH(\\1)[^>\\/]*?\\/>/si";
     $replace[] = "";
     // Sanitizing scripts in IMG tag
     //$search[]= "/(<IMG[\s]+[^>\/]*SOURCE=)(['\"])?(.*)(\\2)([^>\/]*?\/>)/si";
     //$replace[]="";
     // Set iframe tag
     $search[] = "/<IFRAME[^>\\/]*SRC=(['\"])?([^>\\/]*)(\\1)[^>\\/]*?\\/>/si";
     $replace[] = " [!IFRAME FILTERED! \\2] ";
     $search[] = "/<IFRAME[^>]*?>([^<]*)<\\/IFRAME>/si";
     $replace[] = " [!IFRAME FILTERED! \\1] ";
     // action
     $text = preg_replace($search, $replace, $text);
     return $text;
 }
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:52,代码来源:textfilter.php


示例16: render

    function render()
    {
        xoops_load('XoopsEditorHandler');
        $editor_handler = XoopsEditorHandler::getInstance();
        $editor_handler->allowed_editors = $this->allowed_editors;
        $option_select = new XoopsFormSelect("", $this->name, $this->value);
        $extra = 'onchange="if(this.options[this.selectedIndex].value.length > 0 ){
			window.document.forms.' . $this->form->getName() . '.submit();
			}"';
        $option_select->setExtra($extra);
        $option_select->addOptionArray($editor_handler->getList($this->nohtml));
        $this->addElement($option_select);
        return parent::render();
    }
开发者ID:yunsite,项目名称:xoopsdc,代码行数:14,代码来源:formselecteditor.php


示例17: newbb_formatTimestamp

/**
 * Function to convert UNIX time to formatted time string
 */
function newbb_formatTimestamp($time, $format = "c", $timeoffset = "")
{
    xoops_load("xoopslocal");
    require_once XOOPS_ROOT_PATH . "/modules/newbb/include/functions.config.php";
    $newbbConfig = newbb_loadConfig();
    $format = strtolower($format);
    if ($format == "reg" || $format == "") {
        $format = "c";
    }
    if (($format == "custom" || $format == "c") && !empty($newbbConfig["formatTimestamp_custom"])) {
        $format = $newbbConfig["formatTimestamp_custom"];
    }
    return XoopsLocal::formatTimestamp($time, $format, $timeoffset);
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:17,代码来源:functions.time.php


示例18: eventCoreIncludeCommonEnd

 /**
  * @param $args
  */
 function eventCoreIncludeCommonEnd($args)
 {
     xoops_load("XoopsCache");
     global $resourcesModule, $resourcesConfigsList;
     if (empty($resourcesModule)) {
         if (is_a($resourcesModule = xoops_gethandler('module')->getByDirname(basename(dirname(__DIR__))), "XoopsModule")) {
             if (empty($resourcesConfigsList)) {
                 $resourcesConfigsList = xoops_gethandler('config')->getConfigsList($resourcesModule->getVar('mid'));
             }
         }
     }
     if ($resourcesConfigsList['scheduling'] == 'preloader') {
         if (!($jobs = XoopsCache::read(basename(dirname(__DIR__)) . '.cron.jobs'))) {
             XoopsCache::write(basename(dirname(__DIR__)) . '.cron.jobs', array('harvest-modules.php' => microtime(true) + 3600 * 24 * mt_rand(10, 24), 'harvest-themes.php' => microtime(true) + 3600 * 24 * mt_rand(10, 24), 'send-reports.php' => microtime(true) + 3600 * 24 * mt_rand(2, 6), 'harvest-push.php' => microtime(true) + mt_rand(10, 25), 'updates-pull.php' => microtime(true) + mt_rand(10, 25), 'find-updates.php' => microtime(true) + 1800 * mt_rand(10, 60)), 3600 * 24);
         } else {
             $execute = array();
             foreach ($jobs as $job => $when) {
                 if ($when < microtime(true)) {
                     switch ($job) {
                         case "harvest-modules.php":
                         case "harvest-themes.php":
                             $jobs[$job] = microtime(true) + 3600 * 24 * mt_rand(10, 24);
                             break;
                         case "send-reports.php":
                             $jobs[$job] = microtime(true) + 3600 * 24 * mt_rand(2, 6);
                             break;
                         case "updates-pull.php":
                         case "harvest-push.php":
                             $jobs[$job] = microtime(true) + mt_rand(10, 25);
                             break;
                         case "find-updates.php":
                             $jobs[$job] = microtime(true) + 1800 * mt_rand(10, 60);
                             break;
                     }
                     if (file_exists($exec = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'jobs' . DIRECTORY_SEPARATOR . $job)) {
                         $execute[] = $exec;
                     }
                 }
             }
             XoopsCache::write(basename(dirname(__DIR__)) . '.cron.jobs', $jobs, 3600 * 24);
             // Executes Schedule Tasks on XOOPS Event Handler
             if (count($execute) > 0) {
                 foreach ($execute as $exec) {
                     @(include $exec);
                 }
             }
         }
     }
     return true;
 }
开发者ID:ChronolabsCooperative,项目名称:Xoops25ModuleResources,代码行数:53,代码来源:jobs.php


示例19: publisher_items_menu_edit

/**
 * @param $options
 *
 * @return string
 */
function publisher_items_menu_edit($options)
{
    include_once PUBLISHER_ROOT_PATH . '/class/blockform.php';
    xoops_load('XoopsFormLoader');
    $form = new PublisherBlockForm();
    $catEle = new XoopsFormLabel(_MB_PUBLISHER_SELECTCAT, publisherCreateCategorySelect($options[0], 0, true, 'options[0]'));
    $orderEle = new XoopsFormSelect(_MB_PUBLISHER_ORDER, 'options[1]', $options[1]);
    $orderEle->addOptionArray(array('datesub' => _MB_PUBLISHER_DATE, 'counter' => _MB_PUBLISHER_HITS, 'weight' => _MB_PUBLISHER_WEIGHT));
    $dispEle = new XoopsFormText(_MB_PUBLISHER_DISP, 'options[2]', 10, 255, $options[2]);
    $form->addElement($catEle);
    $form->addElement($orderEle);
    $form->addElement($dispEle);
    return $form->render();
}
开发者ID:trabisdementia,项目名称:publisher,代码行数:19,代码来源:items_menu.php


示例20: publisher_date_to_date_edit

function publisher_date_to_date_edit($options)
{
    include_once PUBLISHER_ROOT_PATH . '/class/blockform.php';
    xoops_load('XoopsFormLoader');
    xoops_load('XoopsFormCalendar');
    $form = new PublisherBlockForm();
    $fromEle = new XoopsFormCalendar(_MB_PUBLISHER_FROM, 'options[0]', 15, strtotime($options[0]));
    $fromEle->setNocolspan();
    $untilEle = new XoopsFormCalendar(_MB_PUBLISHER_UNTIL, 'options[1]', 15, strtotime($options[1]));
    $untilEle->setNocolspan();
    $form->addElement($fromEle);
    $form->addElement($untilEle);
    return $form->render();
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:14,代码来源:date_to_date.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP xoops_loadLanguage函数代码示例发布时间:2022-05-23
下一篇:
PHP xoops_header函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap