Beispiel #1
0
 public function eventRmcommonGetFeedsList($feeds)
 {
     load_mod_locale('bxpress');
     include_once XOOPS_ROOT_PATH . '/modules/bxpress/class/bxfunctions.class.php';
     include_once XOOPS_ROOT_PATH . '/modules/bxpress/class/bxforum.class.php';
     $module = RMModules::load_module('bxpress');
     $config = RMSettings::module_settings('bxpress');
     $url = XOOPS_URL . '/' . ($config->urlmode ? $config->htbase : 'modules/bxpress') . '/';
     $bxFunc = new bXFunctions();
     $data = array('title' => $module->name(), 'url' => $url, 'module' => 'bxpress');
     $options[] = array('title' => __('All Recent Messages', 'bxpress'), 'params' => 'show=all', 'description' => __('Show all recent messages', 'bxpress'));
     $forums = $bxFunc->forumList('', false);
     $table = '<table cellpadding="2" cellspacing="2" width="100%"><tr class="even">';
     $count = 0;
     foreach ($forums as $forum) {
         if ($count >= 3) {
             $count = 0;
             $table .= '</tr><tr class="' . tpl_cycle("odd,even") . '">';
         }
         $table .= '<td width="33%"><a href="' . XOOPS_URL . '/backend.php?action=showfeed&amp;mod=bxpress&amp;show=forum&amp;forum=' . $forum['id'] . '">' . $forum['title'] . '</a></td>';
         $count++;
     }
     $table .= '</tr></table>';
     $options[] = array('title' => __('Posts by forum', 'bxpress'), 'description' => __('Select a forum to see the messages posted recently.', 'bxpress') . ' <a href="javascript:;" onclick="$(\'#bxforums-feed\').slideToggle(\'slow\');">Show Forums</a>
                         <div id="bxforums-feed" style="padding: 10px; display: none;">' . $table . '</div>');
     unset($forums);
     $feed = array('data' => $data, 'options' => $options);
     $feeds[] = $feed;
     return $feeds;
 }
Beispiel #2
0
 public function eventCoreIncludeCommonLanguage()
 {
     load_mod_locale('xthemes');
     define('XTPATH', XOOPS_ROOT_PATH . '/modules/xthemes');
     define('XTURL', XOOPS_URL . '/modules/xthemes');
     require_once XTPATH . '/class/xtassembler.class.php';
     $GLOBALS['xtAssembler'] = new XtAssembler();
     $GLOBALS['xtFunctions'] = new XtFunctions();
     load_theme_locale($GLOBALS['xtAssembler']->theme()->getInfo('dir'));
 }
Beispiel #3
0
 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;
 }
Beispiel #4
0
 public function eventRmcommonImgmgrEditorOptions()
 {
     global $rmc_config;
     // load language
     load_mod_locale("galleries");
     // Insert required script and styles
     RMTemplate::get()->add_head('<script type="text/javascript">var gs_url="' . XOOPS_URL . '/modules/galleries"; var gedt = "' . $rmc_config['editor_type'] . '";
         var lang_image = "' . __('Image', 'galleries') . '";
         var lang_thumb = "' . __('Thumbnail', 'galleries') . '";
         var lang_user = "******";
         var lang_search = "' . __('Search Format', 'galleries') . '";
         var lang_desc = "' . __('Add description', 'galleries') . '";
         var lang_align = "' . __('Alignment...', 'galleries') . '";
         var lang_left = "' . __('Left', 'galleries') . '";
         var lang_right = "' . __('Right', 'galleries') . '";
         var lang_center = "' . __('Center', 'galleries') . '";
         var lang_insert = "' . __('Insert Now!', 'galleries') . '";</script>');
     RMTemplate::get()->add_local_script('editor.js', 'galleries');
     RMTemplate::get()->add_xoops_style('editor.css', 'galleries');
     return '<a href="#" id="a-mg">' . __('Galleries', 'galleries') . '</a>';
 }
 /**
  * Get the available widgets list
  *
  * @return array
  */
 public static function get_available_list($mods = null)
 {
     $db = XoopsDatabaseFactory::getDatabaseConnection();
     if ($mods == null || empty($mods)) {
         $mods = RMModules::get_modules_list();
     }
     $list = array();
     // Block list to return
     foreach ($mods as $mod) {
         if (!file_exists(XOOPS_ROOT_PATH . '/modules/' . $mod['dirname'] . '/xoops_version.php')) {
             continue;
         }
         load_mod_locale($mod['dirname']);
         $module = new XoopsModule();
         $module->loadInfoAsVar($mod['dirname']);
         $list[$mod['dirname']] = array('name' => $mod['name'], 'blocks' => $module->getInfo('blocks'));
     }
     // Event generated to modify the available widgets list
     $list = RMEvents::get()->run_event('rmcommon.available.widgets', $list);
     return $list;
 }
Beispiel #6
0
<?php

// $Id$
// --------------------------------------------------------------
// MyGalleries
// Module for advanced image galleries management
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
load_mod_locale('galleries', 'admin_');
$adminmenu[0]['title'] = __('Dashboard', 'galleries');
$adminmenu[0]['link'] = "admin/index.php";
$adminmenu[0]['icon'] = '../images/dashboard.png';
$adminmenu[0]['location'] = 'dashboard';
$adminmenu[1]['title'] = __('Albums', 'galleries');
$adminmenu[1]['link'] = "admin/sets.php";
$adminmenu[1]['icon'] = '../images/album.png';
$adminmenu[1]['location'] = 'sets';
$adminmenu[1]['options'] = array(array('title' => __('List albums', 'galleries'), 'link' => 'sets.php', 'selected' => 'sets'), array('title' => __('Add album', 'galleries'), 'link' => 'sets.php?op=new', 'selected' => 'newalbum'));
$adminmenu[2]['title'] = __('Tags', 'galleries');
$adminmenu[2]['link'] = "admin/tags.php";
$adminmenu[2]['icon'] = '../images/tags.png';
$adminmenu[2]['location'] = 'tags';
$adminmenu[2]['options'] = array(array('title' => __('List tags', 'galleries'), 'link' => 'tags.php', 'selected' => 'tags'), array('title' => __('Add tags', 'galleries'), 'link' => 'tags.php?op=new', 'selected' => 'newtags'));
$adminmenu[3]['title'] = __('Users', 'galleries');
$adminmenu[3]['link'] = "admin/users.php";
$adminmenu[3]['icon'] = '../images/users.png';
$adminmenu[3]['location'] = 'users';
$adminmenu[3]['options'] = array(array('title' => __('List users', 'galleries'), 'link' => 'users.php', 'selected' => 'users'), array('title' => __('New user', 'galleries'), 'link' => 'users.php?op=new', 'selected' => 'newuser'));
$adminmenu[4]['title'] = __('Images', 'galleries');
<?php

// $Id: delete.php 861 2011-12-19 02:38:22Z i.bitcero $
// --------------------------------------------------------------
// bXpress Forums
// A simple forums module for XOOPS and Common Utilities
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
load_mod_locale('bxpress');
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();
Beispiel #8
0
<?php

// $Id: menu.php 151 2012-11-23 06:22:20Z i.bitcero $
// --------------------------------------------------------------
// xThemes
// Module for manage themes by Red Mexico
// Author: Eduardo Cortés <*****@*****.**>
// License: GPL v2
// --------------------------------------------------------------
defined('XOOPS_ROOT_PATH') or die;
load_mod_locale('xthemes');
global $xtAssembler;
$adminmenu[] = array('title' => __('Dashboard', 'xthemes'), 'link' => 'index.php', 'icon' => "images/dashboard.png", 'location' => 'dashboard');
$adminmenu[] = array('title' => __('Themes', 'xthemes'), 'link' => 'themes.php', 'icon' => "images/themes.png", 'location' => 'themes');
if (is_object($xtAssembler) && $xtAssembler->isSupported() && $xtAssembler->theme()->settings()) {
    $menu = array('title' => $xtAssembler->theme()->getInfo('name'), 'link' => 'settings.php', 'icon' => "images/settings.png", 'location' => 'settings');
    if ($xtAssembler->rootMenus()) {
        $options[] = array('title' => __('Menus', 'xthemes'), 'link' => 'navigation.php', 'selected' => 'menus', 'icon' => 'fa fa-reorder');
    }
    if ($xtAssembler->theme()->options()) {
        $options[] = array('title' => __('Settings', 'xthemes'), 'link' => 'settings.php', 'selected' => 'settings', 'icon' => 'fa fa-cog');
    }
    if ($xtAssembler->theme()->getInfo('uri') != '') {
        $options[] = array('title' => __('Website', 'xthemes'), 'link' => $xtAssembler->theme()->getInfo('uri'), 'selected' => 'none', 'icon' => 'fa fa-globe');
    }
    if ($xtAssembler->theme()->getInfo('author_uri') != '') {
        $options[] = array('title' => __('Author', 'xthemes'), 'link' => $xtAssembler->theme()->getInfo('author_uri'), 'selected' => 'none', 'icon' => 'fa fa-user');
    }
    $menu['options'] = $options;
    $adminmenu[] = $menu;
    unset($menu, $options);
Beispiel #9
0
<?php

// $Id$
// --------------------------------------------------------------
// Matches
// Module to publish and manage sports matches
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
load_mod_locale('match', '');
include_once XOOPS_ROOT_PATH . '/modules/rmcommon/loader.php';
$adminmenu[] = array('title' => __('Dashboard', 'match'), 'link' => "admin/index.php", 'icon' => "../images/dashboard.png", 'location' => "dashboard");
$adminmenu[] = array('title' => __('Categories', 'match'), 'link' => "admin/categories.php", 'icon' => "../images/category.png", 'location' => "categories", 'options' => array(array('title' => __('List all', 'match'), 'link' => 'categories.php', 'selected' => 'categories'), array('title' => __('Add Category', 'match'), 'link' => 'categories.php?action=new', 'selected' => 'newcategory')));
$adminmenu[] = array('title' => __('Championships', 'match'), 'link' => "admin/champ.php", 'icon' => "../images/champ.png", 'location' => "championships", 'options' => array(array('title' => __('List all', 'match'), 'link' => 'champ.php', 'selected' => 'championships')));
$adminmenu[] = array('title' => __('Fields', 'match'), 'link' => "admin/fields.php", 'icon' => "../images/field.png", 'location' => "fields", 'options' => array(array('title' => __('List all', 'match'), 'link' => 'fields.php', 'selected' => 'fields')));
$adminmenu[] = array('title' => __('Teams', 'match'), 'link' => "admin/teams.php", 'icon' => "../images/teams.png", 'location' => "teams", 'options' => array(array('title' => __('List all', 'match'), 'link' => 'teams.php', 'selected' => 'teams'), array('title' => __('Add Team', 'match'), 'link' => 'teams.php?action=new', 'selected' => 'newteam')));
$adminmenu[] = array('title' => __('Players', 'match'), 'link' => "admin/roster.php", 'icon' => "../images/players.png", 'location' => "roster", 'options' => array(array('title' => __('List all', 'match'), 'link' => 'roster.php', 'selected' => 'roster'), array('title' => __('Add Player', 'match'), 'link' => 'roster.php?action=new', 'selected' => 'newplayer')));
$adminmenu[] = array('title' => __('Coaches', 'match'), 'link' => "admin/coaches.php", 'icon' => "../images/coaches.png", 'location' => "coaches", 'options' => array(array('title' => __('List all', 'match'), 'link' => 'coaches.php', 'selected' => 'coaches'), array('title' => __('Add Coach', 'match'), 'link' => 'coaches.php?action=new', 'selected' => 'newcoach')));
$adminmenu[] = array('title' => __('Role Play', 'match'), 'link' => "admin/role.php", 'icon' => "../images/role.png", 'location' => "role");
$adminmenu[] = array('title' => __('Ranking', 'match'), 'link' => "admin/ranking.php", 'icon' => "../images/rank.png", 'location' => "ranking");
Beispiel #10
0
<?php

// $Id$
// --------------------------------------------------------------
// MyGalleries
// Module for advanced image galleries management
// Author: Eduardo Cortés
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
load_mod_locale("galleries");
$show = rmc_server_var($_GET, 'show', 'all');
$xoopsModule = RMFunctions::load_module('galleries');
$config = RMUtilities::module_config('galleries');
include_once XOOPS_ROOT_PATH . '/modules/galleries/class/gsfunctions.class.php';
include_once XOOPS_ROOT_PATH . '/modules/galleries/class/gsimage.class.php';
include_once XOOPS_ROOT_PATH . '/modules/galleries/class/gsset.class.php';
$rss_channel = array();
$db = XoopsDatabaseFactory::getDatabaseConnection();
switch ($show) {
    case 'pictures':
        $sql = "SELECT * FROM " . $db->prefix('gs_images') . " WHERE public=2 ORDER BY created DESC LIMIT 0,15";
        $result = $db->query($sql);
        $rss_channel['title'] = $xoopsModule->name();
        $rss_channel['link'] = GSFunctions::get_url();
        $rss_channel['description'] = __('These are the recent pictures published on our galleries.', 'galleries');
        $rss_channel['lastbuild'] = formatTimestamp(time(), 'rss');
        $rss_channel['webmaster'] = checkEmail($xoopsConfig['adminmail'], true);
        $rss_channel['editor'] = checkEmail($xoopsConfig['adminmail'], true);
        $rss_channel['category'] = __('Pictures', 'galleries');
        $rss_channel['generator'] = 'MyGalleries 3';
Beispiel #11
0
<?php

// $Id$
// --------------------------------------------------------------
// Contact
// A simple contact module for Xoops
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
load_mod_locale('contact');
define('_MI_CT_DESC', __('A simple contact module for Xoops', 'contact'));
// Settings
define('_MI_CT_EMAIL', __('Email Recipient', 'contact'));
define('_MI_CT_EMAILD', __('Specify the email where messages will be sent to', 'contact'));
define('_MI_CT_INFO', __('Information message', 'contact'));
define('_MI_CT_URL', __('Module URL', 'contact'));
define('_MI_CT_URLD', __('Specify here the URL where ContactMe! will work. This will be used for redirections and other things.', 'contact'));
define('_MI_CT_LIMIT', __('Messages per page', 'contact'));
define('_MI_CT_LIMITD', __('This value specifies the limit of messages to show on each page in dashboard.', 'contact'));
define('_MI_CT_QUOTE', __('Quote message text when reply', 'contact'));
define('_MI_CT_QUOTED', __('When this option is enabled, ContactMe! will include the original message as a quoted text in reply.', 'contact'));
// Block
define('_MI_CT_BLOCK', __('ContactMe!', 'contact'));
define('_MI_CT_BLOCKD', __('Shows a block with a contact form that can be put in any block canvas.', 'contact'));
    $error = "<strong>WARNING:</strong> MyGalleries requires %s to be installed!<br />Please install %s before trying to use MyGalleries";
    $error = str_replace("%s", '<a href="http://www.redmexico.com.mx/w/common-utilities/" target="_blank">Common Utilities</a>', $error);
    xoops_error($error);
    $error = '%s is not installed! This might cause problems with functioning of MyGalleries and entire system. To solve, install %s or uninstall MyGalleries and then delete module folder.';
    $error = str_replace("%s", '<a href="http://www.redmexico.com.mx/w/common-utilities/" target="_blank">Common Utilities</a>', $error);
    trigger_error($error, E_USER_WARNING);
    echo "<br />";
}
if (!function_exists("__")) {
    function __($text, $d)
    {
        return $text;
    }
}
if (function_exists("load_mod_locale")) {
    load_mod_locale('galleries');
}
$modversion['name'] = "MyGalleries 3.0";
$modversion['version'] = 3.0;
$modversion['rmversion'] = array('number' => 3, 'revision' => 03, 'status' => 0, 'name' => 'MyGalleries');
$modversion['description'] = __('Module to publish and manage photo galleries in XOOPS using Common Utilities', 'galleries');
$modversion['icon32'] = 'images/icon32.png';
$modversion['icon48'] = 'images/browse_set.png';
$modversion['icon24'] = 'images/icon24.png';
$modversion['icon16'] = 'images/images.png';
$modversion['author'] = "BitC3R0";
$modversion['authormail'] = "*****@*****.**";
$modversion['authorweb'] = "Red México";
$modversion['authorurl'] = "http://www.redmexico.com.mx";
$modversion['credits'] = "Red México";
$modversion['help'] = "http://www.redmexico.com.mx/modules/galleries/";
Beispiel #13
0
<?php

// $Id: trackbacks.php 824 2011-12-08 23:50:30Z i.bitcero $
// --------------------------------------------------------------
// MyWords
// Blogging System
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
header('Content-Type: text/xml');
require '../../mainfile.php';
load_mod_locale('mywords');
global $xoopsLogger;
$xoopsLogger->renderingEnabled = false;
error_reporting(0);
$xoopsLogger->activated = false;
$id = rmc_server_var($_REQUEST, 'trackback', 0);
if ($id <= 0) {
    die;
}
$post = new MWPost($id);
if ($post->isNew()) {
    die;
}
$editor = new MWEditor($post->getVar('author'));
if ($editor->isNew()) {
    $user = new XoopsUser($post->getVar('author'));
}
$track = new MWTrackback($xoopsConfig['sitename'], $editor->getVar('name'));
$id = $track->post_id;
Beispiel #14
0
<?php

// $Id$
// --------------------------------------------------------------
// Equipo Club Gallos
// Un modulo sencillo para el manejo de equipos
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
load_mod_locale('team', 'admin_');
$adminmenu[0]['title'] = __('Inicio', 'admin_team');
$adminmenu[0]['link'] = "admin/index.php";
$adminmenu[0]['icon'] = '../images/home.png';
$adminmenu[0]['location'] = 'dashboard';
$adminmenu[1]['title'] = __('Categorías', 'admin_team');
$adminmenu[1]['link'] = "admin/cats.php";
$adminmenu[1]['icon'] = '../images/cats.png';
$adminmenu[1]['location'] = 'categories';
$adminmenu[1]['options'] = array(array('link' => './cats.php', 'title' => __('Lista', 'admin_team'), 'selected' => 'categories'), array('link' => './cats.php?op=new', 'title' => __('Crear categoría', 'admin_team'), 'selected' => 'newcategory'));
$adminmenu[2]['title'] = __('Entrenadores', 'admin_team');
$adminmenu[2]['link'] = "admin/coachs.php";
$adminmenu[2]['icon'] = '../images/coachs.png';
$adminmenu[2]['location'] = 'coachs';
$adminmenu[2]['options'] = array(array('link' => './coachs.php', 'title' => __('Lista', 'admin_team'), 'selected' => 'coachs'), array('link' => './coachs.php?op=new', 'title' => __('Crear entrenador', 'admin_team'), 'selected' => 'newcoach'));
$adminmenu[3]['title'] = __('Equipos', 'admin_team');
$adminmenu[3]['link'] = "admin/teams.php";
$adminmenu[3]['icon'] = '../images/teams.png';
$adminmenu[3]['location'] = 'teams';
$adminmenu[3]['options'] = array(array('link' => './teams.php', 'title' => __('Lista', 'admin_team'), 'selected' => 'teams'), array('link' => './teams.php?op=new', 'title' => __('Crear equipo', 'admin_team'), 'selected' => 'newteam'));
$team = rmc_server_var($_GET, 'team', '');
Beispiel #15
0
// $Id$
// --------------------------------------------------------------
// D-Transport
// Manage download files in XOOPS
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
/**
 * Es necesario verificar si existe Common Utilities o si ha sido instalado
 * para evitar problemas en el sistema
 */
$amod = xoops_getActiveModules();
if (!in_array("rmcommon", $amod)) {
    $error = "<strong>WARNING:</strong> D-Transport requires %s to be installed!<br />Please install %s before trying to use D-Transport";
    $error = str_replace("%s", '<a href="http://www.redmexico.com.mx/w/common-utilities/" target="_blank">Common Utilities</a>', $error);
    xoops_error($error);
    $error = '%s is not installed! This might cause problems with functioning of D-Transport and entire system. To solve, install %s or uninstall D-Transport and then delete module folder.';
    $error = str_replace("%s", '<a href="http://www.redmexico.com.mx/w/common-utilities/" target="_blank">Common Utilities</a>', $error);
    trigger_error($error, E_USER_WARNING);
    echo "<br />";
}
if (function_exists("load_mod_locale")) {
    load_mod_locale('dtransport');
}
if (!function_exists("__")) {
    function __($text, $d)
    {
        return $text;
    }
}
Beispiel #16
0
<?php

// $Id$
// --------------------------------------------------------------
// MyFolder
// Advanced Portfolio System
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
load_mod_locale('myfolder', 'admin_');
$adminmenu[0]['title'] = __('Existing items', 'admin_myfolder');
$adminmenu[0]['link'] = "admin/index.php";
$adminmenu[0]['icon'] = "../images/existing.gif";
$adminmenu[0]['location'] = "index";
$adminmenu[1]['title'] = __('Add Item', 'admin_myfolder');
$adminmenu[1]['link'] = "admin/index.php?op=new";
$adminmenu[1]['icon'] = "../images/new.png";
$adminmenu[1]['location'] = "newitem";
$adminmenu[2]['title'] = _MI_RMMF_AM3;
$adminmenu[2]['link'] = "admin/categos.php";
$adminmenu[2]['icon'] = "../images/cats.gif";
$adminmenu[2]['location'] = "categories";
$adminmenu[3]['title'] = _MI_RMMF_AM4;
$adminmenu[3]['link'] = "admin/categos.php?op=new";
$adminmenu[3]['icon'] = "../images/newcat.gif";
$adminmenu[3]['location'] = "newcategory";
 /**
  * Genera el bloque a partir de su función
  */
 function buildBlock()
 {
     global $xoopsConfig, $xoopsOption;
     $block = array();
     // M for module block, S for system block C for Custom
     if ($this->getVar("type") != "custom") {
         // get block display function
         $show_func = $this->getVar('show_func');
         if (!$show_func) {
             return false;
         }
         // Bloque de Módulo
         // Comprobamos si se trata de un bloque de plugin de sistema
         if ($this->getVar('element_type') == 'plugin') {
             $file = XOOPS_ROOT_PATH . '/modules/' . $this->getVar('element') . '/plugins/' . $this->getVar('dirname') . '/blocks/' . $this->getVar('file');
             load_plugin_locale($this->getVar('dirname'), '', $this->getVar('element'));
         } else {
             $file = XOOPS_ROOT_PATH . "/modules/" . $this->getVar('dirname') . "/blocks/" . $this->getVar('file');
             if (file_exists(XOOPS_ROOT_PATH . "/modules/" . $this->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/blocks.php")) {
                 include_once XOOPS_ROOT_PATH . "/modules/" . $this->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/blocks.php";
             } elseif (file_exists(XOOPS_ROOT_PATH . "/modules/" . $this->getVar('dirname') . "/language/english/blocks.php")) {
                 include_once XOOPS_ROOT_PATH . "/modules/" . $this->getVar('dirname') . "/language/english/blocks.php";
             } else {
                 load_mod_locale($this->getVar('dirname'));
             }
         }
         include_once $file;
         $options = $this->getVar("options");
         $option = is_array($options) ? $options : explode('|', $options);
         if (function_exists($show_func)) {
             $block = $show_func($option);
             if (!$block) {
                 return false;
             }
         }
     } else {
         // Bloque Personalizado. Solo devolvemos el contenido
         $block['content'] = $this->getContent("S", $this->getVar("content_type"));
         if (empty($block['content'])) {
             return false;
         }
     }
     return $block;
 }
Beispiel #18
0
 /**
  * Load a given Xoops Module
  * @param  string|integer $id Indentifier of module. Could be dirname or numeric ID
  * @return XoopsModule
  */
 public static function load_module($id)
 {
     $module_handler = xoops_gethandler('module');
     if (is_numeric($id)) {
         $module = $module_handler->get($id);
     } else {
         $module = $module_handler->getByDirname($id);
     }
     if ($module) {
         load_mod_locale($module->getVar('dirname'));
     }
     return $module;
 }
Beispiel #19
0
// $Id$
// --------------------------------------------------------------
// Red México Common Utilities
// A framework for Red México Modules
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
/**
* Emotions for tiny and exmcode editors
*/
include XOOPS_ROOT_PATH . "/include/common.php";
include_once RMCPATH . '/loader.php';
XoopsLogger::getInstance()->activated = false;
XoopsLogger::getInstance()->renderingEnabled = false;
load_mod_locale('rmcommon', 'emots-');
$db = Database::getInstance();
$result = $db->query("SELECT * FROM " . $db->prefix("smiles") . " ORDER BY id");
while ($row = $db->fetchArray($result)) {
    $emotions[] = array('id' => $row['id'], 'file' => XOOPS_UPLOAD_URL . '/' . $row['smile_url'], 'desc' => $row['emotion'], 'code' => $row['code']);
}
// Load new icons from plugins
RMEvents::get()->run_event('rmcommon.load_emotions', $emotions, 'exmcode');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php

// $Id: xoops_version.php 15 2009-09-11 18:16:01Z i.bitcero $
// --------------------------------------------------------------
// I.Themes
// Module for manage themes by Red Mexico
// Author: Eduardo Cortés <*****@*****.**>
// License: GPL v2
// --------------------------------------------------------------
if (function_exists("load_mod_locale")) {
    load_mod_locale("xthemes");
}
if (!function_exists("__")) {
    function __($text)
    {
        return $text;
    }
}
$modversion['name'] = 'XThemes';
$modversion['version'] = 1.022;
$modversion['rmnative'] = '1';
$modversion['rmversion'] = array('number' => 1, 'revision' => 22, 'status' => 0, 'name' => 'XThemes');
$modversion['description'] = 'A module to manage themes from Red México';
$modversion['credits'] = "Eduardo Cortés <*****@*****.**>";
$modversion['author'] = "BitC3R0";
$modversion['authormail'] = "*****@*****.**";
$modversion['authorweb'] = "Red México";
$modversion['authorurl'] = "http://www.redmexico.com.mx";
$modversion['help'] = "";
$modversion['license'] = "GPLv2";
$modversion['official'] = 0;
Beispiel #21
0
<?php

// $Id$
// --------------------------------------------------------------
// Quick Pages
// Create simple pages easily and quickly
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
load_mod_locale('qpages');
$adminmenu[0]['title'] = __('Dashboard', 'qpages');
$adminmenu[0]['link'] = "admin/index.php";
$adminmenu[0]['icon'] = '../images/status.png';
$adminmenu[0]['location'] = 'dashboard';
$adminmenu[1]['title'] = __('Categories', 'qpages');
$adminmenu[1]['link'] = "admin/cats.php";
$adminmenu[1]['icon'] = '../images/cats.png';
$adminmenu[1]['location'] = 'categories';
$adminmenu[2]['title'] = __('Pages', 'qpages');
$adminmenu[2]['link'] = "admin/pages.php";
$adminmenu[2]['icon'] = '../images/pages.png';
$adminmenu[2]['location'] = 'pages';
$cat = rmc_server_var($_REQUEST, 'cat', '');
$options[] = array('title' => __('List', 'qpages'), 'link' => 'pages.php?cat=' . $cat, 'selected' => 'pages_list');
$options[] = array('title' => __('Published', 'qpages'), 'link' => 'pages.php?acceso=1&cat=' . $cat, 'selected' => 'pages_public');
$options[] = array('title' => __('Drafts', 'qpages'), 'link' => 'pages.php?acceso=0&cat=' . $cat, 'selected' => 'pages_private');
$options[] = array('title' => __('Add page', 'qpages'), 'link' => 'pages.php?op=new&cat=' . $cat, 'selected' => 'pages_new');
$options[] = array('title' => __('Add linked page', 'qpages'), 'link' => 'pages.php?op=newlink&cat=' . $cat, 'selected' => 'pages_linked');
$adminmenu[2]['options'] = $options;
Beispiel #22
0
    /**
     * Return the feed options to show in RSS Center
     */
    public function eventRmcommonGetFeedsList($feeds)
    {
        include_once XOOPS_ROOT_PATH . '/modules/mywords/class/mwfunctions.php';
        load_mod_locale('mywords');
        $module = RMFunctions::load_module('mywords');
        $config = RMUtilities::module_config('mywords');
        $data = array('title' => $module->name(), 'url' => XOOPS_URL . $config['basepath'], 'module' => 'mywords');
        $options[] = array('title' => __('All Recent Posts', 'mywords'), 'params' => 'show=all', 'description' => __('Show all recent posts', 'mywords'));
        $categories = array();
        MWFunctions::categos_list($categories);
        $table = '<table cellpadding="2" cellspacing="2" width="100%"><tr class="even">';
        $count = 0;
        foreach ($categories as $cat) {
            if ($count >= 3) {
                $count = 0;
                $table .= '</tr><tr class="' . tpl_cycle("odd,even") . '">';
            }
            $table .= '<td width="33%"><a href="' . XOOPS_URL . '/backend.php?action=showfeed&amp;mod=mywords&amp;show=cat&amp;cat=' . $cat['id_cat'] . '">' . $cat['name'] . '</a></td>';
            $count++;
        }
        $table .= '</tr></table>';
        $options[] = array('title' => __('Posts by category', 'mywords'), 'description' => __('Select a category to see the posts published recently.', 'mywords') . ' <a href="javascript:;" onclick="$(\'#categories-feed\').slideToggle(\'slow\');">Show Categories</a>
						    <div id="categories-feed" style="padding: 10px; display: none;">' . $table . '</div>');
        unset($categories);
        $tags = MWFunctions::get_tags("*", '', '', 99);
        $table = '<table cellpadding="2" cellspacing="2" width="100%"><tr class="even">';
        $count = 0;
        foreach ($tags as $tag) {
            if ($count >= 3) {
                $count = 0;
                $table .= '</tr><tr class="' . tpl_cycle("odd,even") . '">';
            }
            $table .= '<td width="33%"><a href="' . XOOPS_URL . '/backend.php?action=showfeed&amp;mod=mywords&amp;show=tag&amp;tag=' . $tag['id_tag'] . '">' . $tag['tag'] . '</a></td>';
            $count++;
        }
        $table .= '</tr></table>';
        $options[] = array('title' => __('Show posts by tag', 'mywords'), 'description' => __('Select a tag to see the posts published recently.', 'mywords') . ' <a href="javascript:;" onclick="$(\'#tags-feed\').slideToggle(\'slow\');">Show Tags</a>
						    <div id="tags-feed" style="padding: 10px; display: none;">' . $table . '</div>');
        unset($tags);
        $db = XoopsDatabaseFactory::getDatabaseConnection();
        $sql = "SELECT * FROM " . $db->prefix("mw_editors") . " ORDER BY name";
        $result = $db->query($sql);
        $editors = array();
        while ($row = $db->fetchArray($result)) {
            $editors[] = $row;
        }
        asort($editors);
        $table = '<table cellpadding="2" cellspacing="2" width="100%"><tr class="even">';
        $count = 0;
        foreach ($editors as $ed) {
            if ($count >= 3) {
                $count = 0;
                $table .= '</tr><tr class="' . tpl_cycle("odd,even") . '">';
            }
            $table .= '<td width="33%"><a href="' . XOOPS_URL . '/backend.php?action=showfeed&amp;mod=mywords&amp;show=author&amp;author=' . $ed['id_editor'] . '">' . $ed['name'] . '</a></td>';
            $count++;
        }
        $table .= '</tr></table>';
        $options[] = array('title' => __('Show posts by author', 'mywords'), 'description' => __('Select an author to see the posts published recently.', 'mywords') . ' <a href="javascript:;" onclick="$(\'#editor-feed\').slideToggle(\'slow\');">Show Authors</a>
						    <div id="editor-feed" style="padding: 10px; display: none;">' . $table . '</div>');
        unset($editors);
        unset($table);
        RMTemplate::get()->add_script(RMCURL . '/include/js/jquery.min.js');
        RMTemplate::get()->add_script(RMCURL . '/include/js/jquery-ui.min.js');
        $feed = array('data' => $data, 'options' => $options);
        $feeds[] = $feed;
        return $feeds;
    }
Beispiel #23
0
<?php

// $Id$
// --------------------------------------------------------------
// MiniShop 3
// Module for catalogs
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
load_mod_locale("shop");
define('_MI_MS_MODTITLE', __('Section Title', 'shop'));
define('_MI_MS_SHOWHEAD', __('Show module header', 'shop'));
define('_MI_MS_URLMODE', __('Enable friendly URLs', 'shop'));
define('_MI_MS_URLMODED', __('Define the way in wich MiniShop will be format the products and categories URLs. Friendly URLs needs mod_rewrite or equivalent system.', 'shop'));
define('_MI_MS_BASEDIR', __('Base path for friendly URLs', 'shop'));
define('_MI_MS_EDITOR', __('Editor type for products from', 'shop'));
define('_MI_MS_EDITOR_VISUAL', __('Visual Editor', 'shop'));
define('_MI_MS_EDITOR_HTML', __('HTML Editor', 'shop'));
define('_MI_MS_EDITOR_XOOPS', __('XoopsCode Editor', 'shop'));
define('_MI_MS_EDITOR_SIMPLE', __('Simple Editor', 'shop'));
define('_MI_MS_MAXSIZE', __('Image max file size', 'shop'));
define('_MI_MS_MAXSIZED', __('Specify this value in KB', 'shop'));
define('_MI_MS_IMGSIZE', __('Image size', 'shop'));
define('_MI_MS_IMGSIZED', __('Specify the normal image size in pixels using format "width|height".', 'shop'));
define('_MI_MS_IMGREDIM', __('Resizing method for normal images', 'shop'));
define('_MI_MS_THSSIZE', __('Thumbnail size', 'shop'));
define('_MI_MS_THSSIZED', __('Specify the thumbnail image size in pixels using format "width|height".', 'shop'));
define('_MI_MS_THSREDIM', __('Resizing method for thumbnail images', 'shop'));
define('_MI_MS_XPAGE', __('Products per page', 'shop'));
define('_MI_MS_COLS', __('Columns for catalog', 'shop'));
Beispiel #24
0
<?php

// $Id: files.php 819 2011-12-08 23:43:13Z i.bitcero $
// --------------------------------------------------------------
// bXpress Forums
// An simple forums module for XOOPS and Common Utilities
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
load_mod_locale("dtransport");
$show = rmc_server_var($_GET, 'show', 'all');
$xoopsModule = RMFunctions::load_module('bxpress');
$config = RMSettings::module_settings('bxpress');
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';
$rss_channel = array();
$rss_items = array();
$bxFunc = new bXFunctions();
$db = XoopsDatabaseFactory::getDatabaseConnection();
$tc = TextCleaner::getInstance();
$tbl1 = $db->prefix('mod_bxpress_posts');
$tbl2 = $db->prefix('mod_bxpress_topics');
$tbl3 = $db->prefix('mod_bxpress_posts_text');
$tbl4 = $db->prefix('mod_bxpress_forums');
switch ($show) {
    case 'forum':
        $id = rmc_server_var($_GET, 'forum', 0);
        if ($id <= 0) {
Beispiel #25
0
<?php

// $Id: rss.php 824 2011-12-08 23:50:30Z i.bitcero $
// --------------------------------------------------------------
// MyWords
// Complete Blogging System
// Author: BitC3R0 <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
if (!defined('XOOPS_MAINFILE_INCLUDED')) {
    header('Location: ../../backend.php');
    die;
}
load_mod_locale("mywords");
$show = rmc_server_var($_GET, 'show', 'all');
$xoopsModule = RMFunctions::load_module('mywords');
$config = RMSettings::module_settings('mywords');
include_once XOOPS_ROOT_PATH . '/modules/mywords/class/mwfunctions.php';
$rss_channel = array();
switch ($show) {
    case 'cat':
        include_once XOOPS_ROOT_PATH . '/modules/mywords/class/mwcategory.class.php';
        $id = rmc_server_var($_GET, 'cat', 0);
        if ($id <= 0) {
            redirect_header('backend.php', 1, __('Sorry, specified category was not foud!', 'mywords'));
            die;
        }
        $cat = new MWCategory($id);
        if ($cat->isNew()) {
            redirect_header('backend.php', 1, __('Sorry, specified category was not foud!', 'mywords'));
<?php

// $Id: xoops_version.php 649 2011-06-19 06:04:22Z i.bitcero $
// --------------------------------------------------------------
// MiniShop 3
// Module for catalogs
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
load_mod_locale('shop');
$modversion['name'] = "MiniShop 3";
$modversion['description'] = __('Module to create and manage online catalogs', 'shop');
$modversion['version'] = 3.012;
$modversion['icon32'] = 'images/icon32.png';
$modversion['icon24'] = 'images/icon24.png';
$modversion['author'] = "BitC3R0";
$modversion['authormail'] = "*****@*****.**";
$modversion['authorweb'] = "Red México";
$modversion['authorurl'] = "http://www.redmexico.com.mx";
$modversion['credits'] = "Red México";
$modversion['help'] = "http://www.redmexico.com.mx/docs/minishop/";
$modversion['license'] = "GPL v2";
$modversion['official'] = 0;
$modversion['image'] = "images/logo.png";
$modversion['dirname'] = "shop";
$modversion['icon48'] = "images/icon48.png";
$modversion['icon16'] = "images/icon16.png";
$modversion['rmnative'] = 1;
$modversion['rmversion'] = array('number' => 3, 'revision' => 12, 'status' => -2, 'name' => 'MiniShop 3');
// Admin things
Beispiel #27
0
if (empty($plugins) || !is_array($plugins)) {
    $result = $db->query("SELECT dir FROM " . $db->prefix("rmc_plugins") . ' WHERE status=1');
    while ($row = $db->fetchArray($result)) {
        $GLOBALS['installed_plugins'][$row['dir']] = true;
        $plugins[] = $row['dir'];
        RMEvents::get()->load_extra_preloads(RMCPATH . '/plugins/' . $row['dir'], ucfirst($row['dir']) . 'Plugin');
    }
    file_put_contents($file, json_encode($plugins));
} else {
    foreach ($plugins as $p) {
        $GLOBALS['installed_plugins'][$p] = true;
        RMEvents::get()->load_extra_preloads(RMCPATH . '/plugins/' . $p, ucfirst($p) . 'Plugin');
    }
}
// Load GUI theme events
RMEvents::get()->load_extra_preloads(RMCPATH . '/themes/' . $rmc_config['theme'], ucfirst($rmc_config['theme']));
unset($plugins);
unset($file);
$GLOBALS['installed_plugins'] = RMEvents::get()->run_event("rmcommon.plugins.loaded", $GLOBALS['installed_plugins']);
require_once 'api/l10n.php';
// Load rmcommon language
load_mod_locale('rmcommon');
if (isset($xoopsModule) && is_object($xoopsModule) && $xoopsModule->dirname() != 'rmcommon') {
    load_mod_locale($xoopsModule->dirname());
}
if (!$rmc_config) {
    _e('Sorry, Red Mexico Common Utilities has not been installed yet!');
    die;
}
RMEvents::get()->run_event('rmcommon.base.loaded');
include_once RMCPATH . '/include/tpl_functions.php';
Beispiel #28
0
<?php

// $Id$
// --------------------------------------------------------------
// Professional Works
// Advanced Portfolio System
// Author: BitC3R0 <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
load_mod_locale('works');
function works_widget_categories()
{
    global $xoopsSecurity;
    $widget['title'] = __("Quick Categories", 'works');
    $widget['icon'] = '../images/cats16.png';
    ob_start();
    ?>
<form name="frm_categos" id="frm-categos" method="post" action="categos.php">
	<label for="title"><?php 
    _e('Title', 'works');
    ?>
</label>
	<input type="text" name="name" id="title" size="30" />
	<label for="description"><?php 
    _e('Description', 'works');
    ?>
</label>
	<textarea name="desc" id="description"></textarea>
	<input type="hidden" name="op" value="save" />
	<input type="hidden" name="return" value="<?php 
<?php

// $Id$
// --------------------------------------------------------------
// Rapid Docs
// Documentation system for Xoops.
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
include_once 'include/xv-header.php';
if (function_exists("load_mod_locale")) {
    load_mod_locale('docs');
}
$modversion['name'] = __('RapidDocs', 'docs');
$modversion['description'] = __('Create documentation in Xoops, quicky and an advanced way.', 'docs');
$modversion['rmversion'] = array('number' => 1, 'revision' => 42, 'status' => 0, 'name' => __('RapidDocs', 'docs'));
$modversion['rmnative'] = 1;
$modversion['version'] = '1.0';
$modversion['icon32'] = 'images/icon32.png';
$modversion['icon24'] = 'images/icon24.png';
$modversion['icon16'] = 'images/icon16.png';
$modversion['author'] = "BitC3R0";
$modversion['authormail'] = "*****@*****.**";
$modversion['authorweb'] = "Red México";
$modversion['authorurl'] = "http://www.redmexico.com.mx";
$modversion['credits'] = "Red México";
$modversion['help'] = "http://www.redmexico.com.mx/docs/rapiddocs/";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
$modversion['image'] = "images/logo.png";
Beispiel #30
0
// $Id$
// --------------------------------------------------------------
// bXpress
// A simple forums module for XOOPS and Common Utilities
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
if (!function_exists("__")) {
    function __($text, $d)
    {
        return $text;
    }
}
if (function_exists("load_mod_locale")) {
    load_mod_locale("bxpress");
}
# Opciones de configuración del módulo
define('_MI_BX_CNFTITLE', __('Forum Title', 'bxpress'));
define('_MI_BX_CNFTITLE_DESC', __('This title will be show in the Home page and in special sections.', 'bxpress'));
define('_MI_BX_URLMODE', __('Enable URLs rewriting', 'bxpress'));
define('_MI_BX_URLMODED', __('By enabling this option, bXpress will be capable to use friendly URLs.', 'bxpress'));
define('_MI_BX_BASEPATH', __('Base path for URL rewriting', 'bxpress'));
define('_MI_RMF_CNFSTOREFILES', __('Directory for the file storage', 'bxpress'));
define('_MI_RMF_CNFSTOREFILES_DESC', __('In this folder will be stored the posts attachments.', 'bxpress'));
define('_MI_BX_CNFMAXFILESIZE', 'Maximum allowed size for the sent files (en KB)');
define('_MI_BX_CNFMAXFILESIZE_DESC', 'The files sent in the forums will be limited to this size, bigger file sizes will be ignored.');
define('_MI_BX_SHOWCATS', __('Show Categories in the Home Page', 'bxpress'));
define('_MI_BX_SHOWCATS_DESC', __('If this option is enable the forums will be ordered by categories in the Home Page.', 'bxpress'));
define('_MI_BX_TOPICLIMIT', __('Topics Number per Page', 'bxpress'));
define('_MI_BX_POSTLIMIT', __('Message Number per Page', 'bxpress'));