本文整理汇总了PHP中RMFunctions类的典型用法代码示例。如果您正苦于以下问题:PHP RMFunctions类的具体用法?PHP RMFunctions怎么用?PHP RMFunctions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RMFunctions类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: __construct
/**
* @param string $caption Texto del campo
* @param string $name Nombre de este campo
* @param string $width Ancho del campo. Puede ser el valor en formato pixels (300px) o en porcentaje (100%)
* @param string $height Alto de campo. El valor debe ser pasado en formato pixels (300px).
* @param string $default Texto incial al cargar el campo. POr defecto se muestra vaco.
* @param string $type Tipo de Editor. Posibles valores: FCKeditor, DHTML
*/
function __construct($caption, $name, $width = '100%', $height = '300px', $default = '', $type = '', $change = 1, $ele = array('op'))
{
$rmc_config = RMFunctions::get()->configs();
$tcleaner = TextCleaner::getInstance();
$this->setCaption($caption);
$this->setName($name);
$this->_width = $width;
$this->_height = $height;
$this->_default = isset($_REQUEST[$name]) ? $tcleaner->stripslashes($_REQUEST[$name]) : $tcleaner->stripslashes($default);
$this->_type = $type == '' ? $rmc_config['editor_type'] : $type;
$this->_type = strtolower($this->_type);
$this->_change = $change;
$this->_eles = $ele;
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:22,代码来源:editor.class.php
示例17: show_rm_blocks
function show_rm_blocks()
{
global $xoopsModule, $xoopsConfig, $wid_globals, $xoopsSecurity;
$db = Database::getInstance();
$modules = RMFunctions::get_modules_list(1);
// ** API Event **
// Allows other methods to add o modify the list of available widgets
$modules = RMEvents::get()->run_event('rmcommon.blocks.modules', $modules);
// Cargamos los grupos
$sql = "SELECT groupid, name FROM " . $db->prefix("groups") . " ORDER BY name";
$result = $db->query($sql);
$groups = array();
while ($row = $db->fetchArray($result)) {
$groups[] = array('id' => $row['groupid'], 'name' => $row['name']);
}
// Cargamos las posiciones de bloques
$bpos = RMBlocksFunctions::block_positions();
$sql = createSQL();
$result = $db->query($sql);
$blocks = array();
$used_blocks = array();
while ($row = $db->fetchArray($result)) {
$mod = RMFunctions::load_module($row['element']);
if (!$mod) {
continue;
}
$used_blocks[] = array('id' => $row['bid'], 'title' => $row['name'], 'module' => array('id' => $mod->mid(), 'dir' => $mod->dirname(), 'name' => $mod->name()), 'canvas' => $bpos[$row['canvas']], 'weight' => $row['weight'], 'visible' => $row['visible'], 'type' => $row['type'], 'options' => $row['edit_func'] != '' ? 1 : 0, 'description' => $row['description']);
}
// ** API **
// Event for manege the used widgets list
$used_blocks = RMEvents::get()->run_event('rmcommon.used.blocks.list', $used_blocks);
$positions = array();
foreach ($bpos as $row) {
$positions[] = array('id' => $row['id_position'], 'name' => $row['name']);
}
$positions = RMEvents::get()->run_event('rmcommon.block.positions.list', $positions);
xoops_cp_location('<a href="./">' . $xoopsModule->getVar('name') . '</a> » ' . __('Blocks', 'rmcommon'));
RMTemplate::get()->add_style('blocks.css', 'rmcommon');
RMTemplate::get()->add_local_script('blocks.js', 'rmcommon', 'include');
RMTemplate::get()->add_local_script('jkmenu.js', 'rmcommon', 'include');
RMTemplate::get()->add_style('forms.css', 'rmcommon');
RMTemplate::get()->add_local_script('jquery-ui.min.js', 'rmcommon', 'include');
xoops_cp_header();
// Available Widgets
$blocks = RMBlocksFunctions::get_available_list($modules);
// Position
$the_position = isset($_GET['pos']) ? intval($_GET['pos']) : '';
include RMTemplate::get()->get_template("rmc_blocks.php", 'module', 'rmcommon');
xoops_cp_footer();
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:50,代码来源:blocks.php
示例18: rd_show_page
function rd_show_page()
{
RMTemplate::get()->assign('xoops_pagetitle', __('Home Page', 'docs'));
xoops_cp_header();
include_once RMCPATH . '/class/form.class.php';
$content = @file_get_contents(XOOPS_CACHE_PATH . '/rd_homepage.html');
$content = TextCleaner::getInstance()->to_display($content);
$editor = new RMFormEditor('', 'homepage', '100%', '450px', $content);
$rmc_config = RMFunctions::configs();
if ($rmc_config['editor_type'] == 'tiny') {
$tiny = TinyEditor::getInstance();
$tiny->add_config('theme_advanced_buttons1', 'res_index');
}
include RMEvents::get()->run_event('docs.get.homepage.template', RMTemplate::get()->get_template('admin/rd_homepage.php', 'module', 'docs'));
xoops_cp_footer();
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:16,代码来源:hpage.php
示例19: eventCoreClassTheme_blocksRetrieveBlocks
public function eventCoreClassTheme_blocksRetrieveBlocks($params)
{
// xos_logos_PageBuilder
$xpb = $params[0];
// Template
$tpl = $params[1];
// Blocks
$blocks =& $params[2];
/**
* Use internal blocks manager if enabled
*/
$config = RMFunctions::configs();
if ($config['blocks_enable']) {
$blocks = array();
}
RMEvents::get()->run_event('rmcommon.retrieve.blocks', $blocks, $xpb, $tpl);
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:17,代码来源:core.php
示例20: eventRmcommonGetStyles
public function eventRmcommonGetStyles($styles)
{
$rmf = RMFunctions::get();
$config = $rmf->plugin_settings('minifier', true);
if (!$config['enable']) {
return $styles;
}
$mini = array();
foreach ($styles as $id => $style) {
$url = parse_url($style['url']);
$info = pathinfo($url['path']);
$path = str_replace($info['basename'], '', $url['path']);
$identifier = sprintf("%u", crc32($path . $style['media']));
$add = !isset($mini[$identifier]) ? RMCURL . '/plugins/minifier/min/f=' . $url['path'] : $mini[$identifier]['url'] . ',' . $url['path'];
$mini[$identifier] = array('url' => $add, 'type' => $style['type'], 'media' => $style['media'], 'rel' => 'stylesheet');
}
return $mini;
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:18,代码来源:rmcommon.php
注:本文中的RMFunctions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论