-
Notifications
You must be signed in to change notification settings - Fork 5
/
e_url.php
36 lines (32 loc) · 868 Bytes
/
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
<?php
/*
* Wrapper - an e107 plugin by Tijn Kuyper
*
* Copyright (C) 2016-2022 Tijn Kuyper (http://www.tijnkuyper.nl)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
if(!defined('e107_INIT'))
{
exit;
}
class wrapper_url
{
function config()
{
$config = array();
// Wrapper with title or ID
$config['wrapper_id'] = array(
// Set customisable alias instead of 'wrapper'
'alias' => 'wrapper',
// Matched against url, and if true, redirected to 'redirect' below.
'regex' => '^{alias}/(.*)$',
// {wrapper_id} is substituted with database value when parsed by e107::url();
'sef' => '{alias}/{wrapper_id}/{wrapper_name}',
// File-path of what to load when the regex returns true.
'redirect' => '{e_PLUGIN}wrapper/wrapper.php?$1'
);
return $config;
}
}