-
Notifications
You must be signed in to change notification settings - Fork 0
/
e_url.php
52 lines (41 loc) · 1.55 KB
/
e_url.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
* Enquiry Plugin for the e107 Website System
*
* Copyright (C) 2008-2017 Barry Keal G4HDU (http://www.keal.me.uk)
* 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'))
{
require_once("../../class2.php");
}
// v2.x Standard - Simple mod-rewrite module.
class enquiry_url // plugin-folder + '_url'
{
function config()
{
$config = array();
$config['other'] = array(
'alias' => 'enquiry', // default alias '_enquiry'. {alias} is substituted with this value below. Allows for customization within the admin area.
'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}enquiry/index.php', // file-path of what to load when the regex returns true.
);
$config['index'] = array(
'alias' => 'enquiry',
'regex' => '^enquiry/?$', // 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}enquiry/index.php', // file-path of what to load when the regex returns true.
);
return $config;
}
}