Example #1
0
    $editors[] = array('id' => $editor->id(), 'name' => $editor->getVar('name'), 'link' => $editor->permalink(), 'total' => $row['counter']);
}
unset($editor, $result, $sql);
// URL rewriting
$rule = "RewriteRule ^" . trim($xoopsModuleConfig['basepath'], '/') . "/?(.*)\$ modules/mywords/index.php [L]";
if ($xoopsModuleConfig['permalinks'] > 1) {
    $ht = new RMHtaccess('mywords');
    $htResult = $ht->write($rule);
    if ($htResult !== true) {
        showMessage(__('An error ocurred while trying to write .htaccess file!', 'mywords'), RMMSG_ERROR);
    }
} else {
    $ht = new RMHtaccess('mywords');
    $ht->removeRule();
    $ht->write();
}
RMBreadCrumb::get()->add_crumb(__('Dashboard', 'mywords'));
include 'menu.php';
MWFunctions::include_required_files();
RMTemplate::get()->add_script('../include/js/scripts.php?file=dashboard.js');
RMTemplate::get()->add_help(__('MyWords Documentation', 'mywords'), 'http://www.xoopsmexico.net/docs/mywords/introduccion/');
// Other panels for dashboard
$dashboardPanels = [];
$dashboardPanels = RMEvents::get()->trigger('mywords.dashboard.panels', $dashboardPanels);
xoops_cp_header();
// Show Templates
RMTemplate::get()->add_body_class('dashboard');
//$tpl->header();
include RMtemplate::get()->get_template('admin/mywords-theindex.php', 'module', 'mywords');
//$tpl->footer();
xoops_cp_footer();
Example #2
0
<?php

// $Id$
// --------------------------------------------------------------
// RapidDocs
// Documentation system for Xoops.
// Author: Eduardo Cortés <*****@*****.**>
// Email: i.bitcero@gmail.com
// License: GPL 2.0
// --------------------------------------------------------------
include '../../mainfile.php';
include 'header.php';
RDFunctions::breadcrumb();
RMTemplate::get()->add_style('docs.css', 'docs');
$content = @file_get_contents(XOOPS_CACHE_PATH . '/rd_homepage.html');
$content = TextCleaner::getInstance()->to_display($content);
include RMEvents::get()->run_event('docs.get.home.page', RMtemplate::get()->get_template('rd_index.php', 'module', 'docs'));
include 'footer.php';