[TYPO3] Re: [Typo3] Multiple Domain RealURL Issues

Jens Gammelgaard jens.gammelgaard at optimon.dk
Sat Jun 3 17:19:55 CEST 2006


Hi Again:

FYI: I have now identified a solution of multilanguage and multidomain 
setup, so tt_news variables are set to multilanguages - I have found is 
based on the principles of this localconf.php setup:

* realUrl with
           o language menu
           o nice url for glossary, fotoboek, printlink extensions
           o news only on certain pages
           o path caching disabled
           o 2 sites with different language choices

Works fine only if disablePathCache options is true.


// realurl config
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
// spanish subsite with basque & catalan
'espana.tokitsu.com' => 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(
					'es' => '1',
					'eu' => '6',
					'ca' => '7',
					),
				//'noMatch' => 'bypass',
				'valueDefault' => 'es',
				),
			),

		// use extended page name rendering
		// page names are converted to readalbe page/sub-page/sub-sub-page.html
		'pagePath' => array(
			'type' => 'user',
			'userFunc' => 
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
			'spaceCharacter' => '-',
			'languageGetVar' => 'L',
			'expireDays' => 3,
			'rootpage_id' => 67,
			'disablePathCache' => '1',
			// 
'encodeTitle_userProc'=>'EXT:realurl/tx_realurl_encodeTitle_userProc.php:&user_encodeDates',
			),
		'fixedPostVars' => array(
		),

	'fileName' => array(
		'index' => array(
			//ajout pour printlink :
			'print.html' => array(
				'keyValues' => array(
					type => 98,
					)
				),
			),
		'_DEFAULT' => array(
			'keyValues' => array(
				)
			),
		// add .html suffix to the end of the path generated
		'defaultToHTMLsuffixOnPrev' => 1,
		),
	),
//#########################################################################################################################
//
		'www.tokitsu.com' => 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(
					'fr' => '0',
					'es' => '1',
					'en' => '2',
					'it' => '3',
					'jp' => '4',
					'pt' => '5',
					'eu' => '6',
					'ca' => '7',
					),
				'noMatch' => 'bypass',
				),
			),

		// use extended page name rendering
		// page names are converted to readalbe page/sub-page/sub-sub-page.html
		'pagePath' => array(
			'type' => 'user',
			'userFunc' => 
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
			'spaceCharacter' => '-',
			'languageGetVar' => 'L',
			'expireDays' => 3,
			'rootpage_id' => 13,
			'disablePathCache' => '1',
			// 
'encodeTitle_userProc'=>'EXT:realurl/tx_realurl_encodeTitle_userProc.php:&user_encodeDates',
			),
		'fixedPostVars' => array(
		),

	'postVarSets' => array(
		//tt_news 		
		'964' => array(
			// archive
			'period' => array(
				array(
					'condPrevValue' => -1,
					'GETvar' => 'tx_ttnews[pS]' ,
					'valueMap' => array(
						)
					),
				array(
					'GETvar' => 'tx_ttnews[pL]' ,
					'valueMap' => array(
						)
					),
				array(
					'GETvar' => 'tx_ttnews[arc]' ,
					'valueMap' => array(
						'archived' => 1,
						'non-archived' => -1,
						)
					),
				),
				
			// pagebrowser
			'browse' => array(
				array(
					'GETvar' => 'tx_ttnews[pointer]',
					),
				),
			'select' => array (
				array(
					'GETvar' => 'tx_ttnews[cat]',
					'lookUpTable' => array(
						'table' => 'tt_news_cat',
						'id_field' => 'uid',
						'alias_field' => 'title',
						'addWhereClause' => ' AND NOT deleted',
						'useUniqueCache' => 1,
						'useUniqueCache_conf' => array(
							'strtolower' => 1,
							),
						),
					),
				),
									
			'article' => array(
				array(
					'GETvar' => 'tx_ttnews[backPid]',
					),
				array(
					'GETvar' => 'tx_ttnews[tt_news]',
					'lookUpTable' => array(
						'table' => 'tt_news',
						'id_field' => 'uid',
						'alias_field' => 'title',
						'addWhereClause' => ' AND NOT deleted',
						'useUniqueCache' => 1,
						'useUniqueCache_conf' => array(
							'strtolower' => 1,
							'spaceCharacter' => '-',
							),
						),
					),
				array(
					'GETvar' => 'tx_ttnews[swords]'
					),
				),
			),
		'466' => '964',
		'465' => '964',
		'467' => '964',
		'468' => '964',
		//Glossaire :
		'228' => array(

			       // glossaire
			       'lex' => array(
					      array(
						    'GETvar' => 'range' ,
						    'valueMap' => array(
                                                 )
						    ),
					      array(
						    'GETvar' => 'lex' ,
						    'valueMap' => array(
                                                 )
						    ),


					      array(
						    'GETvar' => 'cHash' ,
						    'valueMap' => array(
                                                 )
						    ),
					      ),
			       ),
		'227' => '228',
		//links
		'223'  => array(
  		        // links
		    'links' => array(
			     array(
				   'GETvar' => 'action' ,
		     		   'valueMap' => array(
						       //'add' => 'getviewaddnewlink',
						       //'viewcat' => 'getviewcategory'
                                         )
				   ),
				   array(
					 'GETvar' => 'category_uid',
                                      'valueMap' => array(
                                      )
                                   ),

		    ),
		    ),
		//Photobooks simples :
		'1228' => array(
			 //photos sensei
		         'photo' => array(
				 array(
				       'GETvar' => 'tx_gooffotoboek_pi1_fid',
				       'valueMap' => array(
                                                 )
				       ),
				 array(
				       'GETvar' => 'tx_gooffotoboek_pi1_func' ,
				       'valueMap' => array(
                                                  )
				       ),
				 ),
			 ),
		//kiko
		'329' => '1228',
		//danse
		'353' => '1228',
                 //Photobooks avec arbo :
                 '178' => array(
				'photo' => array(
array(
						 'GETvar' => 'tx_gooffotoboek_pi1_srcdir',
						 'valueMap' => array(
						   )
						 ),

						 array(
						       'GETvar' => 'tx_gooffotoboek_pi1_fid',
						       'valueMap' => array(
                                                 )
						       ),
						 array(
						       'GETvar' => 'tx_gooffotoboek_pi1_func' ,
						       'valueMap' => array(
                                                  )
						       ),
						 ),
				),
		//taichi
		'345' => '178',
        		'_DEFAULT' => array(
                               ),
                 ),

	'fileName' => array(
		'index' => array(
			//ajout pour printlink :
			'print.html' => array(
				'keyValues' => array(
					type => 98,
					)
				),
			),
		'_DEFAULT' => array(
			'keyValues' => array(
				)
			),
		// add .html suffix to the end of the path generated
		'defaultToHTMLsuffixOnPrev' => 1,
		),
	),
//#########################################################################################################################
	'_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',
				),
			),

		'fixedPostVars' => array(
		),

	'fileName' => array(
		'index' => array(
			//ajout pour printlink :
			'print.html' => array(
				'keyValues' => array(
					type => 98,
					)
				),
			),
		'_DEFAULT' => array(
			'keyValues' => array(
				)
			),
		// add .html suffix to the end of the path generated
		'defaultToHTMLsuffixOnPrev' => 1,
		),
		),

);


Jens Gammelgaard skrev:
> Hi Guys,
> 
> You seem to have done the latest refinement on the localconf so that 
> tt_news and realUrl talks with multiple domains.
> 
> If we think global, it seems that what is missing is multiple language 
> so that if L=1 then the postVars ex. article changes to artikel if L=2.
> 
> If you look at the example about fixedPostVars (you can find it fast by 
> searching for condPrevValue:
> 
> http://wiki.typo3.org/index.php/EXT/realurl/manual
> 
> then it seems to be possible to make a condition that could be aimed at 
> L too?
> 
> An example of what hopefully with your help could be conditioned to 2 
> languages could be this - so that the languages could be in made in 2 
> versions for each language:
> 
>       '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',
>                             'juni' => '06',
>                             'july' => '07',
>                             'august' => '08',
>                             'september' => '09',
>                             'october' => '10',
>                             'november' => '11',
>                             'december' => '12',
>                                )
>                         ),
>                     ),
>            etc.
> 
> Heads up: What do you say?
> 
> Kindest
> 
> Jens
> 
> 
> Michael Cannon skrev:
>> After much debugging, multiple domains with multiple roots has been 
>> demonstrated to be working correctly with the following Real URL 
>> configuration file. Thanks to Matthew and Sash for the encouragement 
>> and ideas.
>>
>> http://cvs.cannonbose.com/cgi-bin/viewcvs.cgi/typo3/typo3conf/realurl.php?rev=1.19&view=markup 
>>
>>
>> The two big changes to my prior realurl.php script was turning off 
>> disablePathCache and enableUrlDecodeCache.
>>
>> disablePathCache prevents the system from recognizing root PIDs. 
>> enableUrlDecodeCache is fine for single root sites, but as it only 
>> grabs the first instance of a page path, it possibly returns the wrong 
>> PID of the page path since the root PID isn't taken into consideration.
>>
>> Good luck all with your multiple domain sites.
>>
>> Michael
>>
>> -----
>> Michael Cannon
>> Cannon Bose Project Manager
>> Tel    : +1 (206) 351-0159         Fax : +1 (802) 609-2776
>>
> 
> 



More information about the TYPO3-english mailing list