May
3
2008

realurl conf for tt_news and multilanguage TYPO3 site

Real Url config for tt_news and for multilanguage site..

i’m use english and indonesian language …

fyi : default TYPO3 source does not include the indonesian flags.. i put it manualy :D hope indonesian language / flags will include on default TYPO3 source someday…

save this code on realurl_conf.php and save on your typo3conf folder… don’t forget to set the real url extension on typo3 ext manager to use this conf… ;)


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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
< ?php
    $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
    '_DEFAULT' => array(
        'init' => array(
            'enableCHashCache' => 1,
            'appendMissingSlash' => 'ifNotFile',
            'enableUrlDecodeCache' => 1,
            'enableUrlEncodeCache' => 1,
        ),
        'redirects' => array(),
        'preVars' => array(
            array(
                'GETvar' => 'no_cache',
                'valueMap' => array(
                    'nc' => 1,
                ),
                'noMatch' => 'bypass',
            ),
            array(
                'GETvar' => 'L',
                'valueMap' => array(
                    'id' => '0',
                    'en' => '1',
                ),
                'noMatch' => 'bypass',
            ),
        ),
        'pagePath' => array(
            'type' => 'user',
            'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
            'spaceCharacter' => '-',
            'languageGetVar' => 'L',
            'expireDays' => 7,
            ###### include your rootpage id here
            'rootpage_id' => 1,
        ),
        'fixedPostVars' => array(),
        'postVarSets' => array(
        '_DEFAULT' => array(
            // news archive parameters
            'archive' => array(
                array(
                    'GETvar' => 'tx_ttnews[year]' ,
                ),
                array(
                    'GETvar' => 'tx_ttnews[month]' ,
                    'valueMap' => array(
                    'january' => '01',
                    'february' => '02',
                    'march' => '03',
                    'april' => '04',
                    'may' => '05',
                    'june' => '06',
                    'july' => '07',
                    'august' => '08',
                    'september' => '09',
                    'october' => '10',
                    'november' => '11',
                    'december' => '12',
                    )
                ),
            ),
            // news pagebrowser
            'browse' => array(
                array(
                    'GETvar' => 'tx_ttnews[pointer]',
                ),
            ),
            // news categories
            'select_category' => array (
                array(
                    'GETvar' => 'tx_ttnews[cat]',
                ),
            ),
            // backPid link
            'back_to' => array(
                array(
                    'GETvar' => 'tx_ttnews[backPid]',
                    'lookUpTable' => array('table' => 'pages',
                        'id_field' => 'uid',
                        'alias_field' => 'title',
                        'addWhereClause' => ' AND NOT deleted',
                        'useUniqueCache' => 1,
                        'useUniqueCache_conf' => array(
                            'strtolower' => 1,
                            'spaceCharacter' => '-',
                        ),
                    ),
                ),
            ),
 
            'article' => array(
                array(
                    'GETvar' => 'tx_ttnews[tt_news]',
                    'lookUpTable' => array(
                        'table' => 'tt_news',
                        'id_field' => 'uid',
                        'alias_field' => 'title',
                        'addWhereClause' => ' AND NOT deleted',
                        'languageGetVar' => 'L',
                        'languageExceptionUids' => '',
                        'languageField' => 'sys_language_uid',
                        'transOrigPointerField' => 'l18n_parent',
                        'useUniqueCache' => 1,
                        'useUniqueCache_conf' => array(
                            'strtolower' => 1,
                            'spaceCharacter' => '-',
                        ),
                    ),
                ),
                array(
                    'GETvar' => 'tx_ttnews[swords]',
                ),
            ),
        ),
        ),
        // configure filenames for different pagetypes
        'fileName' => array(
            'index' => array(
                'rss.xml' => array(
                    'keyValues' => array(
                        'type' => 100,
                    ),
                ),
                'rss091.xml' => array(
                    'keyValues' => array(
                        'type' => 101,
                    ),
                ),
                'rdf.xml' => array(
                    'keyValues' => array(
                        'type' => 102,
                ),
                ),
                'atom.xml' => array(
                    'keyValues' => array(
                        'type' => 103,
                    ),
                ),
            ),
        ),
    ),
);
?>

About the Author: Heddi

2 Comments + Add Comment

  • apa ini? :D

  • TYPO3 is written in upper case :D

Leave a comment

Add to Technorati Favorites