1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-21 13:52:35 +02:00

Some basic preparation for new e_url scheme and other changes.

For anyone reading - please remember that 0.8 should not be utilized on a public site prior to official release.
This commit is contained in:
CaMer0n
2011-06-17 01:13:05 +00:00
parent 2475e1f5aa
commit 064c5c7d1e
9 changed files with 157 additions and 95 deletions

View File

@@ -8,29 +8,42 @@ class news_url // must match the plugin's folder name. ie. [PLUGIN_FOLDER]_url
function config()
{
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_newspost.php');
// e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_newspost.php');
$config = array();
$urls = array();
$config[] = array(
'name' => LAN_EURL_MODREWR_TITLE,
'description' => LAN_EURL_MODREWR_DESCR
$urls[] = array(
'path' => "", // default only - should also be configurable from admin->url
'function' => "myfunction",
'description' => "SEF Urls for Custom-Pages"
);
return $config;
return $this->urls;
}
function myfunction($curVal)
{
//Simulated
$urls = array(
'welcome-to-e107' => "{e_BASE}news.php?extend.1"
);
return (isset($urls[$curVal])) ? $urls[$curVal] : FALSE;
}
function apache_create($parms)
{
}
function apache_parse($parms)
{
function create($data,$mode='default') // generate a URL from Table Data.
{
if($mode == 'default')
{
if($data['news_id']==1)
{
return "{e_BASE}welcome-to-e107";
}
}
}
}
?>