本文整理汇总了PHP中RMUtilities::module_config方法的典型用法代码示例。如果您正苦于以下问题:PHP RMUtilities::module_config方法的具体用法?PHP RMUtilities::module_config怎么用?PHP RMUtilities::module_config使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RMUtilities
的用法示例。
在下文中一共展示了RMUtilities::module_config方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: qpages_search
/**
* Función para realizar búsquedas
*/
function qpages_search($qa, $andor, $limit, $offset, $userid)
{
global $xoopsUser, $mc;
include_once XOOPS_ROOT_PATH . '/modules/qpages/class/qppage.class.php';
$mc = RMUtilities::module_config('qpages');
$db = XoopsDatabaseFactory::getDatabaseConnection();
$sql = "SELECT * FROM " . $db->prefix("qpages_pages");
$adds = '';
if (is_array($qa) && ($count = count($qa))) {
$adds = '';
for ($i = 0; $i < $count; $i++) {
$adds .= $adds == '' ? "(titulo LIKE '%{$qa[$i]}%' OR titulo_amigo LIKE '%{$qa[$i]}%')" : " {$andor} (titulo LIKE '%{$qa[$i]}%' OR titulo_amigo LIKE '%{$qa[$i]}%')";
}
}
$sql .= $adds != '' ? " WHERE {$adds}" : '';
if ($userid > 0) {
$sql .= ($adds != '' ? " AND " : " WHERE ") . "uid='{$userid}'";
}
$sql .= " ORDER BY modificado DESC";
$i = 0;
$result = $db->query($sql);
$ret = array();
while ($row = $db->fetchArray($result)) {
$page = new QPPage();
$page->assignVars($row);
$ret[$i]['image'] = "images/page.png";
$ret[$i]['link'] = $mc['links'] == 0 ? 'page.php?page=' . $page->getFriendTitle() : $page->getFriendTitle() . '/';
$ret[$i]['title'] = $page->getTitle();
$ret[$i]['time'] = $page->getDate();
$ret[$i]['uid'] = $page->uid();
$ret[$i]['desc'] = $page->getDescription();
$i++;
}
return $ret;
}
示例2: rd_block_resources
/**
* Este archivo permite controlar el bloque o los bloques
* Bloques Existentes:
*
* 1. Publicaciones Recientes
* 2. Publicaciones Populares (Mas Leídas)
* 3. Publicaciones Mejor Votadas
*/
function rd_block_resources($options)
{
global $xoopsModule;
include_once XOOPS_ROOT_PATH . '/modules/docs/class/rdresource.class.php';
$db = XoopsDatabaseFactory::getDatabaseConnection();
$mc = RMUtilities::module_config('docs');
$sql = "SELECT * FROM " . $db->prefix("rd_resources") . ' WHERE public=1 AND approved=1';
switch ($options[0]) {
case 'recents':
$sql .= " ORDER BY created DESC";
break;
case 'popular':
$sql .= " ORDER BY `reads` DESC";
break;
}
$sql .= " LIMIT 0, " . ($options[1] > 0 ? $options[1] : 5);
$result = $db->query($sql);
$block = array();
while ($row = $db->fetchArray($result)) {
$res = new RDResource();
$res->assignVars($row);
$ret = array();
$ret['id'] = $res->id();
$ret['title'] = $res->getVar('title');
if ($options[2]) {
$ret['desc'] = $options[3] == 0 ? $res->getVar('description') : TextCleaner::truncate($res->getVar('description'), $options[3]);
}
$ret['link'] = $res->permalink();
$ret['author'] = sprintf(__('Created by %s', 'docs'), '<strong>' . $res->getVar('owname') . '</strong>');
$ret['reads'] = sprintf(__('Viewed %s times', 'docs'), '<strong>' . $res->getVar('reads') . '</strong>');
$block['resources'][] = $ret;
}
RMTemplate::get()->add_style('blocks.css', 'docs');
return $block;
}
示例3: pw_categories_show
function pw_categories_show($options)
{
global $xoopsModule, $xoopsModuleConfig;
include_once XOOPS_ROOT_PATH . '/modules/works/class/pwwork.class.php';
include_once XOOPS_ROOT_PATH . '/modules/works/class/pwclient.class.php';
include_once XOOPS_ROOT_PATH . '/modules/works/class/pwcategory.class.php';
$db = XoopsDatabaseFactory::getDatabaseConnection();
if (isset($xoopsModule) && $xoopsModule->dirname() == 'works') {
$mc =& $xoopsModuleConfig;
} else {
$mc =& RMUtilities::module_config('works');
}
$db = XoopsDatabaseFactory::getDatabaseConnection();
$result = $db->query("SELECT * FROM " . $db->prefix("pw_categos") . " ORDER BY name");
$block = array();
while ($row = $db->fetchArray($result)) {
$cat = new PWCategory();
$cat->assignVars($row);
$ret = array();
$ret['name'] = $row['name'];
$ret['link'] = $cat->link();
$block['categos'][] = $ret;
}
return $block;
}
示例4: pwSearch
/**
* @desc Realiza una búsqueda en el módulo desde EXM
*/
function pwSearch($queryarray, $andor, $limit, $offset, $userid)
{
global $myts;
include_once XOOPS_ROOT_PATH . "/modules/works/class/pwwork.class.php";
$mc = RMUtilities::module_config('works');
$db = XoopsDatabaseFactory::getDatabaseConnection();
$sql = "SELECT a.* FROM " . $db->prefix('pw_works') . " a INNER JOIN " . $db->prefix('pw_clients') . " b ON (a.public=1 AND a.client=b.id_client AND (";
$sql1 = '';
if (is_array($queryarray)) {
foreach ($queryarray as $k) {
$sql1 .= ($sql1 == '' ? "" : "{$andor}") . " (a.title LIKE '%{$k}%' OR a.short LIKE '%{$k}%' OR b.name LIKE '%{$k}%' OR b.business_name LIKE '%{$k}%') ";
}
}
$sql1 .= "))";
$sql1 .= " GROUP BY a.id_work ORDER BY a.created DESC LIMIT {$offset}, {$limit}";
$result = $db->queryF($sql . $sql1);
$ret = array();
while ($row = $db->fetchArray($result)) {
$work = new PWWork();
$work->assignVars($row);
$rtn = array();
$rtn['image'] = 'images/works.png';
$rtn['title'] = $work->title();
$rtn['time'] = $work->created();
$rtn['uid'] = '';
$rtn['desc'] = $work->descShort();
$rtn['link'] = $work->link();
$ret[] = $rtn;
}
return $ret;
}
示例5: qpagesBlockPages
/**
* Mostramos las página existentes
*/
function qpagesBlockPages($options)
{
global $xoopsConfig;
include_once XOOPS_ROOT_PATH . '/modules/qpages/class/qppage.class.php';
$db =& XoopsDatabaseFactory::getDatabaseConnection();
$mc =& RMUtilities::module_config('qpages');
if (!defined('QP_URL')) {
define('QP_URL', XOOPS_URL . ($mc['links'] ? $mc['basepath'] : '/modules/qpages'));
}
$sql = "SELECT * FROM " . $db->prefix("qpages_pages");
if ($options[0] > 0) {
$sql .= " WHERE cat='{$options['0']}'";
}
$sql .= " ORDER BY fecha DESC LIMIT 0,{$options['1']}";
$block = array();
$result = $db->query($sql);
while ($row = $db->fetchArray($result)) {
$page = new QPPage();
$page->assignVars($row);
$rtn = array();
$rtn['id'] = $page->getID();
$rtn['titulo'] = $page->getTitle();
$rtn['link'] = $page->getPermaLink();
$block['pages'][] = $rtn;
}
return $block;
}
示例6: permalink
/**
* Obtiene el enlace a la categor?a
*/
public function permalink()
{
$mc = RMUtilities::module_config('shop');
$link = ShopFunctions::get_url();
$link .= $mc['urlmode'] == 0 ? '?cat=' . $this->id() : 'category/' . $this->path();
return $link;
}
示例7: pw_comments_show
function pw_comments_show($options)
{
global $xoopsModule, $xoopsModuleConfig;
include_once XOOPS_ROOT_PATH . '/modules/works/class/pwwork.class.php';
include_once XOOPS_ROOT_PATH . '/modules/works/class/pwclient.class.php';
$db = XoopsDatabaseFactory::getDatabaseConnection();
if (isset($xoopsModule) && $xoopsModule->dirname() == 'works') {
$mc =& $xoopsModuleConfig;
} else {
$mc =& RMUtilities::module_config('works');
}
$sql = "SELECT * FROM " . $db->prefix('pw_works') . " WHERE comment<>'' ORDER BY " . ($options[1] ? " created DESC " : " RAND() ");
$sql .= " LIMIT 0," . $options[0];
$result = $db->query($sql);
$clients = array();
while ($row = $db->fetchArray($result)) {
$work = new PWWork();
$work->assignVars($row);
if (!isset($clients[$work->client()])) {
$clients[$work->client()] = new PWClient($work->client(), 1);
}
$client =& $clients[$work->client()];
$rtn = array();
$rtn['client'] = $client->businessName();
$rtn['link'] = $work->link();
$rtn['comment'] = $work->comment();
$block['works'][] = $rtn;
}
return $block;
}
示例8: permalink
public function permalink()
{
$mc = RMUtilities::module_config('shop');
$rtn = ShopFunctions::get_url();
$rtn .= $mc['urlmode'] == 0 ? 'product.php?id=' . $this->id() : $this->getVar('nameid') . '/';
return $rtn;
}
示例9: xoops_module_pre_uninstall_galleries
function xoops_module_pre_uninstall_galleries($mod)
{
$dir = RMUtilities::module_config('galleries', 'storedir');
if (is_dir($dir)) {
RMUtilities::delete_directory($dir);
}
return true;
}
示例10: get_main_link
public function get_main_link()
{
$mc = RMUtilities::module_config('mywords');
if ($mc['permalinks'] > 1) {
return XOOPS_URL . $mc['basepath'];
} else {
return XOOPS_URL . '/modules/mywords';
}
}
示例11: get_main_link
public function get_main_link()
{
$mc = RMUtilities::module_config('works');
if ($mc['urlmode']) {
return XOOPS_URL . $mc['htbase'];
} else {
return XOOPS_URL . '/modules/works';
}
}
示例12: bxpress_recents_show
function bxpress_recents_show($options)
{
$util = RMUtilities::get();
$tc = TextCleaner::getInstance();
$db = XoopsDatabaseFactory::getDatabaseConnection();
$xoopsModuleConfig = $util->module_config('exmbb');
$mc = RMUtilities::module_config('bxpress');
$tbl1 = $db->prefix('bxpress_posts');
$tbl2 = $db->prefix('bxpress_topics');
$tbl3 = $db->prefix('bxpress_posts_text');
$tbl4 = $db->prefix('bxpress_forums');
$sql = "SELECT MAX(id_post) AS id FROM {$tbl1} WHERE approved=1 GROUP BY id_topic ORDER BY MAX(id_post) DESC LIMIT 0,{$options['0']}";
$result = $db->queryF($sql);
$topics = array();
$block = array();
include_once XOOPS_ROOT_PATH . '/modules/bxpress/class/bxforum.class.php';
include_once XOOPS_ROOT_PATH . '/modules/bxpress/class/bxpost.class.php';
include_once XOOPS_ROOT_PATH . '/modules/bxpress/class/bxtopic.class.php';
include_once XOOPS_ROOT_PATH . '/modules/bxpress/class/bxfunctions.class.php';
$post = new bXPost();
$forum = new bXForum();
$tf = new RMTimeFormatter(0, '%T%-%d%-%Y% at %h%:%i%');
while ($row = $db->fetchArray($result)) {
$post = new bXPost($row['id']);
$topic = new bXTopic($post->topic());
$forum = new bXForum($post->forum());
$ret = array();
$ret['id'] = $topic->id();
$ret['post'] = $post->id();
$ret['link'] = $post->permalink();
if ($options[2]) {
$ret['date'] = $tf->format($post->date());
}
if ($options[3]) {
$ret['poster'] = sprintf(__('Posted by: %s', 'bxpress'), "<a href='" . $post->permalink() . "'>" . $post->uname() . "</a>");
}
$ret['title'] = $topic->title();
if ($options[4]) {
$ret['text'] = $tc->clean_disabled_tags($post->text());
}
$ret['forum'] = array('id' => $forum->id(), 'name' => $forum->name(), 'link' => $forum->permalink());
$topics[] = $ret;
}
// Opciones
$block['showdates'] = $options[2];
$block['showuname'] = $options[3];
$block['showtext'] = $options[4];
$block['topics'] = $topics;
$block['lang_topic'] = __('Topic', 'bxpress');
$block['lang_date'] = __('Date', 'bxpress');
$block['lang_poster'] = __('Poster', 'bxpress');
return $block;
}
示例13: 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;
}
示例14: permalink
/**
* Get the team link formated
*/
public function permalink()
{
global $xoopsModule, $xoopsModuleConfig;
if (isset($xoopsModule) && $xoopsModule->dirname() == 'match') {
$mc =& $xoopsModuleConfig;
} else {
$mc = RMUtilities::module_config('match');
}
$link = XOOPS_URL . '/';
if ($mc['urlmode']) {
$link .= trim($mc['htbase'], '/') . '/player/' . $this->getVar('nameid') . '/';
} else {
$link .= 'modules/match/index.php?p=player&id=' . $this->getVar('nameid');
}
return $link;
}
示例15: permalink
/**
* Get the category link formated
*/
public function permalink()
{
global $xoopsModule, $xoopsModuleConfig;
if (isset($xoopsModule) && $xoopsModule->dirname() == 'match') {
$mc =& $xoopsModuleConfig;
} else {
$mc = RMUtilities::module_config('match');
}
$link = XOOPS_URL . '/';
if ($mc['urlmode']) {
$link .= trim($mc['htbase'], '/') . '/?category=' . $this->id();
} else {
$link .= 'modules/match/index.php?cat=' . $this->id();
}
return $link;
}