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:
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user