1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

SEF URL added for gsitemap. URL aliases added for Statistics plugin.

This commit is contained in:
Cameron
2016-02-28 09:26:21 -08:00
parent cdc0d457f0
commit 17b1f844a7
6 changed files with 73 additions and 13 deletions

View File

@@ -37,10 +37,11 @@ class eurl_admin extends e_admin_dispatcher
);
protected $adminMenu = array(
'main/config' => array('caption'=> LAN_EURL_MENU_CONFIG, 'perm' => 'L'),
'main/config' => array('caption'=> LAN_EURL_MENU_PROFILES, 'perm' => 'L'),
'main/alias' => array('caption'=> LAN_EURL_MENU_ALIASES, 'perm' => 'L'),
'main/simple' => array('caption'=> LAN_EURL_MENU_CONFIG, 'perm' => 'L'),
'main/settings' => array('caption'=> LAN_EURL_MENU_SETTINGS, 'perm' => 'L'),
'main/simple' => array('caption'=> LAN_EURL_MENU_REDIRECTS, 'perm' => 'L'),
// 'main/help' => array('caption'=> LAN_EURL_MENU_HELP, 'perm' => 'L'),
);

View File

@@ -55,11 +55,11 @@ define("LAN_EURL_MODREWR_DESCR", "Removes entry script file name (index.php/) fr
// navigation
define("LAN_EURL_MENU", "Site URLs");
define("LAN_EURL_MENU_CONFIG", "URL Profiles");
define("LAN_EURL_MENU_ALIASES", "Aliases");
define("LAN_EURL_MENU_CONFIG", "Configurations");
define("LAN_EURL_MENU_ALIASES", "Profile Aliases");
define("LAN_EURL_MENU_SETTINGS", "Settings");
define("LAN_EURL_MENU_HELP", "Help");
define("LAN_EURL_MENU_REDIRECTS", "Redirects");
define("LAN_EURL_MENU_PROFILES", "Profiles");
define("LAN_EURL_UC", "Under Construction");

View File

@@ -0,0 +1,44 @@
<?php
/*
* e107 Bootstrap CMS
*
* Copyright (C) 2008-2015 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* IMPORTANT: Make sure the redirect script uses the following code to load class2.php:
*
* if (!defined('e107_INIT'))
* {
* require_once("../../class2.php");
* }
*
*/
if (!defined('e107_INIT')) { exit; }
// v2.x Standard - Simple mod-rewrite module.
class gsitemap_url // plugin-folder + '_url'
{
function config()
{
$config = array();
$config['index'] = array(
'alias' => 'sitemap',
'regex' => '^{alias}/?$', // matched against url, and if true, redirected to 'redirect' below.
'sef' => '{alias}', // used by e107::url(); to create a url from the db table.
'redirect' => '{e_BASE}gsitemap.php?show=1', // file-path of what to load when the regex returns true.
);
return $config;
}
}

View File

@@ -7,7 +7,7 @@
<link url='admin_config.php' description='Configure gSitemap' icon='images/icon.png' iconSmall='images/icon_16.png' primary='true' >LAN_CONFIGURE</link>
</adminLinks>
<siteLinks>
<link name="" url="gsitemap.php?show" lan="GSLAN_Name">Sitemap</link>
<link name="" url="gsitemap.php?show" sef='index' lan="GSLAN_Name">Sitemap</link>
</siteLinks>
<pluginPrefs>
</pluginPrefs>

View File

@@ -26,15 +26,17 @@ class log_url // plugin-folder + '_url'
$config = array();
$config['index'] = array(
'regex' => '^stats/?$', // matched against url, and if true, redirected to 'redirect' below.
'sef' => 'stats', // used by e107::url(); to create a url from the db table.
'alias' => 'stats',
'regex' => '^{alias}/?$', // matched against url, and if true, redirected to 'redirect' below.
'sef' => '{alias}', // used by e107::url(); to create a url from the db table.
'redirect' => '{e_PLUGIN}log/stats.php?1', // file-path of what to load when the regex returns true.
);
$config['others'] = array(
'regex' => '^stats/\?([\d]*)$', // matched against url, and if true, redirected to 'redirect' below.
'sef' => 'stats', // used by e107::url(); to create a url from the db table.
'alias' => 'stats',
'regex' => '^{alias}/\?([\d]*)$', // matched against url, and if true, redirected to 'redirect' below.
'sef' => '{alias}', // used by e107::url(); to create a url from the db table.
'redirect' => '{e_PLUGIN}log/stats.php?$1', // file-path of what to load when the regex returns true.
);

View File

@@ -23,12 +23,25 @@ if(!e107::isInstalled('gsitemap'))
e107::lan('gsitemap');
if(e_QUERY == "show")
if(e_QUERY == "show" || !empty($_GET['show']))
{
require_once(HEADERF);
$nfArray = $sql ->retrieve("gsitemap", "*", "gsitemap_active IN (".USERCLASS_LIST.") ORDER BY gsitemap_order ",true);
$text = "<div style='text-align:left'><ul>";
if(deftrue('BOOTSTRAP'))
{
$bread = array(
0 => array('text' => $tp->toHtml(GSLAN_Name), 'url'=> null ) // e107::url('gsitemap','index')
);
$text = e107::getForm()->breadcrumb($bread);
}
else
{
$text = '';
}
$text .= "<div style='text-align:left'><ul>";
foreach($nfArray as $nfa)
{
@@ -37,7 +50,7 @@ if(e_QUERY == "show")
}
$text .= "</ul></div>";
$ns -> tablerender(SITENAME." : ".GSLAN_Name."", $text);
$ns -> tablerender(GSLAN_Name."", $text);
require_once(FOOTERF);
exit;