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


PHP RMFunctions类代码示例

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


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

示例1: eventRmcommonAdditionalOptions

 public function eventRmcommonAdditionalOptions($settings)
 {
     $settings['categories']['helium'] = __('Control Panel', 'helium');
     $af_available = RMFunctions::plugin_installed('advform');
     $settings['config'][] = array('name' => 'helium_logo', 'title' => __('Logo to use', 'rmcommon'), 'description' => __('You can specify a logo as bitmap but SVG is recommended. The logo will be resize to 29 pixels of height.', 'helium'), 'formtype' => $af_available ? 'image-url' : 'textbox', 'valuetype' => 'text', 'default' => RMCURL . '/themes/helium/images/logo-he.svg', 'category' => 'helium');
     return $settings;
 }
开发者ID:txmodxoops,项目名称:rmcommon,代码行数:7,代码来源:rmcommon.php

示例2: show_rss_content

function show_rss_content()
{
    global $xoopsConfig;
    include_once $GLOBALS['xoops']->path('class/template.php');
    $tpl = new XoopsTpl();
    $module = rmc_server_var($_GET, 'mod', '');
    if ($module == '') {
        redirect_header('backend.php', 1, __('Choose an option to see its feed', 'rmcommon'));
        die;
    }
    if (!file_exists(XOOPS_ROOT_PATH . '/modules/' . $module . '/rss.php')) {
        redirect_header('backend.php', 1, __('This module does not support rss feeds', 'rmcommon'));
        die;
    }
    $GLOBALS['xoopsLogger']->activated = false;
    if (function_exists('mb_http_output')) {
        mb_http_output('pass');
    }
    header('Content-Type:text/xml; charset=utf-8');
    include XOOPS_ROOT_PATH . '/modules/' . $module . '/rss.php';
    if (!isset($rss_channel['image'])) {
        $rmc_config = RMFunctions::configs();
        $rss_channel['image']['url'] = $rmc_config['rssimage'];
        $dimention = getimagesize(XOOPS_ROOT_PATH . '/images/logo.png');
        $rss_channel['image']['width'] = $dimention[0] > 144 ? 144 : $dimention[0];
        $rss_channel['image']['height'] = $dimention[1] > 400 ? 400 : $dimention[1];
    }
    include RMTemplate::get()->get_template('rmc_rss.php', 'module', 'rmcommon');
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:29,代码来源:rss.php

示例3: construct_blocks

 /**
  * Get blocks
  */
 public function construct_blocks()
 {
     global $xoopsConfig, $xoopsModule, $xoopsUser, $xoopsOption;
     $sides = array();
     foreach (self::block_positions() as $id => $row) {
         $sides[$id] = $row['tag'];
         $blocks[$row['tag']] = array();
     }
     $startMod = $xoopsConfig['startpage'] == '--' ? 'system' : $xoopsConfig['startpage'];
     if (@is_object($xoopsModule)) {
         list($mid, $dirname) = array($xoopsModule->getVar('mid'), $xoopsModule->getVar('dirname'));
         $isStart = substr($_SERVER['PHP_SELF'], -9) == 'index.php' && $xoopsConfig['startpage'] == $dirname;
     } else {
         $sys = RMFunctions::load_module('system');
         list($mid, $dirname) = array($sys->getVar('mid'), 'system');
         $isStart = !@empty($GLOBALS['xoopsOption']['show_cblock']);
     }
     $groups = @is_object($xoopsUser) ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
     $subpage = isset($xoopsOption['module_subpage']) ? $xoopsOption['module_subpage'] : '';
     $barray = array();
     // Array of retrieved blocks
     $barray = self::get_blocks($groups, $mid, $isStart, XOOPS_BLOCK_VISIBLE, '', 1, $subpage);
     foreach ($barray as $block) {
         $side = $sides[$block->getVar('canvas')];
         if ($content = self::buildBlock($block)) {
             $blocks[$side][$content['id']] = $content;
         }
     }
     unset($side, $sides, $content, $subpage, $barray, $groups, $startMod);
     return $blocks;
 }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:34,代码来源:blocksfunctions.php

示例4: show_available_updates

function show_available_updates()
{
    global $rmTpl, $rmEvents, $updfile, $xoopsSecurity;
    $rmFunc = RMFunctions::get();
    $rmUtil = RMUtilities::get();
    $tf = new RMTimeFormatter('', '%T% %d%, %Y% at %h%:%i%');
    if (is_file($updfile)) {
        $updates = unserialize(base64_decode(file_get_contents($updfile)));
    }
    $rmTpl->add_style('updates.css', 'rmcommon');
    $rmTpl->add_script('updates.js', 'rmcommon');
    $rmTpl->add_head_script('var xoToken = "' . $xoopsSecurity->createToken() . '";');
    $rmTpl->add_head_script('var langUpdated = "' . __('Item updated!', 'rmcommon') . '";');
    $rmTpl->add_help(__('Updates Help', 'rmcommon'), 'http://www.xoopsmexico.net/docs/common-utilities/actualizaciones-automaticas/standalone/1/');
    $ftpserver = parse_url(XOOPS_URL);
    $ftpserver = $ftpserver['host'];
    $pathinfo = parse_url(XOOPS_URL);
    $ftpdir = str_replace($pathinfo['scheme'] . '://' . $pathinfo['host'], '', XOOPS_URL);
    unset($pathinfo);
    RMBreadCrumb::get()->add_crumb(__('Available Updates', 'rmcommon'));
    $rmTpl->assign('xoops_pagetitle', __('Available Updates', 'rmcommon'));
    xoops_cp_header();
    include $rmTpl->get_template('rmc-updates.php', 'module', 'rmcommon');
    xoops_cp_footer();
}
开发者ID:JustineBABY,项目名称:rmcommon,代码行数:25,代码来源:updates.php

示例5: __construct

 /**
  * Class constructor.
  * Load all data from configurations and generate the initial clases
  * to manage the email
  * 
  * @param string Content type for message body. It usually text/plain or text/html.
  * 		Default is 'text/plain' but can be changed later
  */
 public function __construct($content_type = 'text/plain')
 {
     $config = RMFunctions::configs();
     $config_handler =& xoops_gethandler('config');
     $xconfig = $config_handler->getConfigsByCat(XOOPS_CONF_MAILER);
     // Instantiate the Swit Transport according to our preferences
     // We can change this preferences later
     switch ($config['transport']) {
         case 'mail':
             $this->swTransport = Swift_MailTransport::newInstance();
             break;
         case 'smtp':
             $this->swTransport = Swift_SmtpTransport::newInstance($config['smtp_server'], $config['smtp_port'], $config['smtp_crypt'] != 'none' ? $config['smtp_crypt'] : '');
             $this->swTransport->setUsername($config['smtp_user']);
             $this->swTransport->setPassword($config['smtp_pass']);
             break;
         case 'sendmail':
             $this->swTransport = Swift_SendmailTransport::newInstance($config['sendmail_path']);
             break;
     }
     // Create the message object
     // Also this object could be change later with message() method
     $this->swMessage = Swift_Message::newInstance();
     $this->swMessage->setReplyTo($xconfig['from']);
     $this->swMessage->setFrom(array($xconfig['from'] => $xconfig['fromname']));
     $this->swMessage->setContentType($content_type);
 }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:35,代码来源:mailer.php

示例6: eventRmcommonGetAvatar

 /**
  * This function allows to other modules or plugins get gravatars
  * by passing an email address and other options
  */
 public function eventRmcommonGetAvatar($email, $size = 0, $default = '')
 {
     $config = RMFunctions::get()->plugin_settings('avatars', true);
     $size = $size <= 0 ? $size = $config['size'] : $size;
     $default = $default == '' ? $config['default'] : $default;
     $avatar = "http://www.gravatar.com/avatar/" . md5($email) . "?s=" . $size . '&d=' . $default;
     return $avatar;
 }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:12,代码来源:rmcommon.php

示例7: check

 public function check()
 {
     $config = RMFunctions::get()->plugin_settings('recaptcha', true);
     include_once RMCPATH . '/plugins/recaptcha/recaptchalib.php';
     $privatekey = $config['private'];
     $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
     return $resp->is_valid;
 }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:8,代码来源:recaptcha-plugin.php

示例8: settings

 public function settings($name = '')
 {
     $settings = empty($this->settings) ? RMFunctions::get()->plugin_settings($this->get_info('dir'), true) : $this->settings;
     if (isset($settings[$name])) {
         return $settings[$name];
     }
     return $settings;
 }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:8,代码来源:iplugin.php

示例9: dt_block_categories

function dt_block_categories($options)
{
    include_once XOOPS_ROOT_PATH . '/modules/dtransport/class/dtcategory.class.php';
    $rmu = RMUtilities::get();
    $rmf = RMFunctions::get();
    $mc = $rmu->module_config('dtransport');
    $url = $rmf->current_url();
    $rpath = parse_url($url);
    $xpath = parse_url(XOOPS_URL);
    if ($mc['permalinks']) {
        $params = trim(str_replace($xpath['path'] . '/' . trim($mc['htbase'], '/'), '', rtrim($rpath['path'], "/")), '/');
        $search = array('category', 'publisher', 'recents', 'popular', 'rated', 'updated');
        if ($params == '') {
            $params = array();
        } else {
            $params = explode("/", trim($params));
        }
        if (!empty($params) && $params[0] == 'category') {
            $db = XoopsDatabaseFactory::getDatabaseConnection();
            $params = explode("page", implode("/", array_slice($params, 1)));
            $path = explode("/", $params[0]);
            foreach ($path as $k) {
                if ($k == '') {
                    continue;
                }
                $category = new DTCategory();
                $sql = "SELECT * FROM " . $db->prefix("dtrans_categos") . " WHERE nameid='{$k}' AND parent='{$idp}'";
                $result = $db->query($sql);
                if ($db->getRowsNum($result) > 0) {
                    $row = $db->fetchArray($result);
                    $idp = $row['id_cat'];
                    $category->assignVars($row);
                } else {
                    $dtfunc->error_404();
                }
            }
        } else {
            $category = new DTCategory();
        }
    }
    $tpl = RMTemplate::get();
    $tpl->add_xoops_style('blocks.css', 'dtransport');
    include_once XOOPS_ROOT_PATH . '/modules/dtransport/class/dtfunctions.class.php';
    $categories = array();
    $dtfunc = new DTFunctions();
    $dtfunc->getCategos($categories, 0, $category->id(), array(), false, 1);
    $block = array();
    foreach ($categories as $cat) {
        if ($cat['jumps'] > $options[0] - 1 && $options[0] > 0) {
            continue;
        }
        $block['categories'][] = $cat;
    }
    if (!$category->isNew()) {
        $block['parent'] = array('name' => $category->name(), 'link' => $category->permalink());
    }
    return $block;
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:58,代码来源:dtrans_bk_categories.php

示例10: get_html

 private function get_html()
 {
     $config = RMFunctions::get()->plugin_settings('ayah', true);
     self::set_config();
     require_once RMCPATH . '/plugins/ayah/include/ayah.php';
     $ayah = new AYAH();
     $ayah->debug_mode($config['debug']);
     return $ayah->getPublisherHTML();
 }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:9,代码来源:rmcommon.php

示例11: check

 public function check()
 {
     $config = RMFunctions::get()->plugin_settings('recaptcha', true);
     $this->set_config();
     include_once RMCPATH . '/plugins/ayah/include/ayah.php';
     $ayah = new AYAH();
     $ayah->debug_mode($config['debug']);
     $resp = $ayah->scoreResult();
     return $resp;
 }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:10,代码来源:ayah-plugin.php

示例12: eventRmcommonXoopsCommonEnd

 public function eventRmcommonXoopsCommonEnd()
 {
     global $xoopsConfig;
     // Get preloaders from current theme
     RMEvents::get()->load_extra_preloads(XOOPS_THEME_PATH . '/' . $xoopsConfig['theme_set'], ucfirst($xoopsConfig['theme_set'] . 'Theme'));
     $url = RMFunctions::current_url();
     $p = parse_url($url);
     if (substr($p['path'], -11) == 'backend.php') {
         include_once RMCPATH . '/rss.php';
         die;
     }
 }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:12,代码来源:rmcommon.php

示例13: eventRmcommonCaptchaCheck

 public function eventRmcommonCaptchaCheck($value)
 {
     global $xoopsUser;
     $config = RMFunctions::get()->plugin_settings('recaptcha', true);
     if ($xoopsUser && $xoopsUser->isAdmin() && !$config['show']) {
         return $value;
     }
     include_once RMCPATH . '/plugins/recaptcha/recaptchalib.php';
     $privatekey = $config['private'];
     $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
     return $resp->is_valid;
 }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:12,代码来源:rmcommon.php

示例14: eventRmcommonGetFeedsList

 public function eventRmcommonGetFeedsList($feeds)
 {
     load_mod_locale('galleries');
     include_once XOOPS_ROOT_PATH . '/modules/galleries/class/gsfunctions.class.php';
     $module = RMFunctions::load_module('galleries');
     $config = RMUtilities::module_config('galleries');
     $data = array('title' => $module->name(), 'url' => GSFunctions::get_url(), 'module' => 'galleries');
     $options[] = array('title' => __('All Recent Pictures', 'galleries'), 'params' => 'show=pictures', 'description' => __('Show all recent pictures', 'galleries'));
     $options[] = array('title' => __('All Recent Albums', 'galleries'), 'params' => 'show=albums', 'description' => __('Show all recent albums', 'galleries'));
     $feed = array('data' => $data, 'options' => $options);
     $feeds[] = $feed;
     return $feeds;
 }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:13,代码来源:rmcommon.php

示例15: eventCoreIncludeCommonLanguage

 /**
  * To prevent errors when upload images with closed site 
  */
 public function eventCoreIncludeCommonLanguage()
 {
     global $xoopsConfig;
     if (RMFunctions::current_url() == RMCURL . '/include/upload.php' && $xoopsConfig['closesite']) {
         $security = rmc_server_var($_POST, 'rmsecurity', 0);
         $data = TextCleaner::getInstance()->decrypt($security, true);
         $data = explode("|", $data);
         // [0] = referer, [1] = session_id(), [2] = user, [3] = token
         $xoopsUser = new XoopsUser($data[0]);
         if ($xoopsUser->isAdmin()) {
             $xoopsConfig['closesite'] = 0;
         }
     }
 }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:17,代码来源:core.php


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