mirror of
https://github.com/e107inc/e107.git
synced 2025-08-15 11:04:18 +02:00
Support for e_url.php aliases added. (see faqs or rss_menu)
This commit is contained in:
@@ -27,37 +27,42 @@ class faqs_url // plugin-folder + '_url'
|
||||
$config = array();
|
||||
|
||||
$config['index'] = array(
|
||||
'regex' => '^faqs/?$', // matched against url, and if true, redirected to 'redirect' below.
|
||||
'sef' => 'faqs', // used by e107::url(); to create a url from the db table.
|
||||
'alias' => 'faqs',
|
||||
'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}faqs/faqs.php', // file-path of what to load when the regex returns true.
|
||||
|
||||
);
|
||||
|
||||
$config['item'] = array(
|
||||
'regex' => '^faqs/(\d*)-(.*)$',
|
||||
'sef' => 'faqs/{faq_id}-{faq_sef}', // {faq_info_sef} is substituted with database value when parsed by e107::url();
|
||||
'alias' => 'faqs',
|
||||
'regex' => '^{alias}/(\d*)-(.*)$',
|
||||
'sef' => '{alias}/{faq_id}-{faq_sef}', // {faq_info_sef} is substituted with database value when parsed by e107::url();
|
||||
'redirect' => '{e_PLUGIN}faqs/faqs.php?id=$1'
|
||||
);
|
||||
|
||||
|
||||
$config['search'] = array(
|
||||
'regex' => '^faqs/\?srch=(.*)$', // matched against url, and if true, redirected to 'redirect' below.
|
||||
'sef' => 'faqs/', // used by e107::url(); to create a url from the db table.
|
||||
'alias' => 'faqs',
|
||||
'regex' => '^{alias}/\?srch=(.*)$', // 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}faqs/faqs.php?srch=$1', // file-path of what to load when the regex returns true.
|
||||
|
||||
);
|
||||
|
||||
|
||||
$config['tag'] = array(
|
||||
'regex' => '^faqs/tag/(.*)$',
|
||||
'sef' => 'faqs/tag/{tag}', // {faq_info_sef} is substituted with database value when parsed by e107::url();
|
||||
'alias' => 'faqs',
|
||||
'regex' => '^{alias}/tag/(.*)$',
|
||||
'sef' => '{alias}/tag/{tag}', // {faq_info_sef} is substituted with database value when parsed by e107::url();
|
||||
'redirect' => '{e_PLUGIN}faqs/faqs.php?tag=$1'
|
||||
);
|
||||
|
||||
|
||||
$config['category'] = array(
|
||||
'regex' => '^faqs/(.*)$',
|
||||
'sef' => 'faqs/{faq_info_sef}', // {faq_info_sef} is substituted with database value when parsed by e107::url();
|
||||
'alias' => 'faqs',
|
||||
'regex' => '^{alias}/(.*)$',
|
||||
'sef' => '{alias}/{faq_info_sef}', // {faq_info_sef} is substituted with database value when parsed by e107::url();
|
||||
'redirect' => '{e_PLUGIN}faqs/faqs.php?cat=$1'
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user