-
Notifications
You must be signed in to change notification settings - Fork 0
/
e_url.php
124 lines (104 loc) · 3.96 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?php
/**
* @file
* v2.x Standard - Simple mod-rewrite module.
*/
if(!defined('e107_INIT'))
{
exit;
}
/**
* Class links_page_url.
*
* plugin-folder + '_url'
*/
class links_page_url
{
function config()
{
$config = array();
$config['comment'] = array(
// Matched against url, and if true, redirected to 'redirect' below.
'regex' => '^links_page/links/comment/(.*)$',
// Used by e107::url(); to create a url from the db table.
'sef' => 'links_page/links/comment/{link_id}',
// File-path of what to load when the regex returns true.
'redirect' => '{e_PLUGIN}links_page/links.php?comment.$1'
);
$config['catorder'] = array(
// Matched against url, and if true, redirected to 'redirect' below.
'regex' => '^links_page/category/(.*)/(.*)/(.*)$',
// Used by e107::url(); to create a url from the db table.
'sef' => 'links_page/category/{link_category_id}/{link_category_sef}',
// File-path of what to load when the regex returns true.
'redirect' => '{e_PLUGIN}links_page/links.php?cat.$1.$3'
);
$config['category'] = array(
// Matched against url, and if true, redirected to 'redirect' below.
'regex' => '^links_page/category/(.*)/(.*)$',
// Used by e107::url(); to create a url from the db table.
'sef' => 'links_page/category/{link_category_id}/{link_category_sef}',
// File-path of what to load when the regex returns true.
'redirect' => '{e_PLUGIN}links_page/links.php?cat.$1'
);
$config['submitted'] = array(
// Matched against url, and if true, redirected to 'redirect' below.
'regex' => '^links_page/link-submitted$',
// Used by e107::url(); to create a url from the db table.
'sef' => 'links_page/link-submitted',
// File-path of what to load when the regex returns true.
'redirect' => '{e_PLUGIN}links_page/links.php?s$1'
);
$config['submit'] = array(
// Matched against url, and if true, redirected to 'redirect' below.
'regex' => '^links_page/links/submit$',
// Used by e107::url(); to create a url from the db table.
'sef' => 'links_page/links/submit',
// File-path of what to load when the regex returns true.
'redirect' => '{e_PLUGIN}links_page/links.php?submit'
);
/* pages without ordering */
$config['page2'] = array(
// Matched against url, and if true, redirected to 'redirect' below.
'regex' => '^links_page/links/(.*)/(.*)$',
// File-path of what to load when the regex returns true.
'redirect' => '{e_PLUGIN}links_page/links.php?$1.$2'
);
$config['page1'] = array(
// Matched against url, and if true, redirected to 'redirect' below.
'regex' => '^links_page/links/(.*)$',
// Used by e107::url(); to create a url from the db table. Not used
// 'sef' => 'links_page/links/orderaheading',
// File-path of what to load when the regex returns true.
'redirect' => '{e_PLUGIN}links_page/links.php?$1'
);
$config['index'] = array(
// Matched against url, and if true, redirected to 'redirect' below.
'regex' => '^links_page/links$',
// Used by e107::url(); to create a url from the db table.
'sef' => 'links_page/links',
// File-path of what to load when the regex returns true.
'redirect' => '{e_PLUGIN}links_page/links.php'
);
$config['base'] = array(
'sef' => 'links_page/links/',
);
$config['rated'] = array(
'sef' => 'links_page/links/rated',
);
$config['top'] = array(
'sef' => 'links_page/links/top',
);
$config['alllinks'] = array( // Used by e107::url(); to create a url from the db table.
'sef' => 'links_page/links/all',
);
$config['allcats'] = array( // Matched against url, and if true, redirected to 'redirect' below.
'sef' => 'links_page/links/cat',
);
$config['manage'] = array(
// Matched against url, and if true, redirected to 'redirect' below.
'sef' => 'links_page/links/manage',
);
return $config;
}
}