1
0
mirror of https://github.com/e107inc/e107.git synced 2025-02-13 02:54:39 +01:00
CaMer0n 064c5c7d1e 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.
2011-06-17 01:13:05 +00:00

49 lines
863 B
PHP

<?php
// Example only for now.
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');
$urls = array();
$urls[] = array(
'path' => "", // default only - should also be configurable from admin->url
'function' => "myfunction",
'description' => "SEF Urls for Custom-Pages"
);
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 create($data,$mode='default') // generate a URL from Table Data.
{
if($mode == 'default')
{
if($data['news_id']==1)
{
return "{e_BASE}welcome-to-e107";
}
}
}
}
?>