Menu

[r13]: / e9-core / url.class.php  Maximize  Restore  History

Download this file

37 lines (26 with data), 586 Bytes

 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
<?php
class e_url
{
static function permalink( $type, $data )
{
global $_url;
switch( $type )
{
case 'post':
$comment = '';
if ( isset( $data['_special'] ) && $data['_special'] == 'comments' )
$comment = "#comments";
if ( isset( $data['comment'] ) )
$comment = "#comment{$data['comment']}";
return "{$_url['site']}post?{$data['post_id']}{$comment}";
break;
case 'tag':
$value = '';
if ( isset( $data['tag'] ) )
$value = '?' . urlencode( $data['tag'] );
return "{$_url['site']}tag{$value}";
break;
}
}
};
?>