Zum Inhalt springen

realurl bei mehreren ext. benutzen

Erstellt am 9. Januar 2008 · 5 Antworten · letzte Antwort am 22. Februar 2008

Tags: RealURL, URLs & Routing, Frage

stefan72 ·

Hallo,
Ich habe eine relativ umfangreiche Seite und setze realurl 1.1.4 ein.

Das mm_forum und tt_news laufen damit ausgezeichnet.
Ich möchte aber noch weitere extension (ab_downloads, sr_feuser_register) damit laufen lassen.

Wenn ich den code dieser ext. einfüge, passiert rein nichts!
Ich weiss nicht was ich falsch mache.

Wo setze ich diese 'postVarSets' genau ein?

'postVarSets' => array(
            '_DEFAULT' => array(
                'user' => array(
                    array(
                        'GETvar' => 'tx_srfeuserregister_pi1[regHash]'
                    )
                )
            )
        ),

Darf es mehr als ein postVarSet geben? Ich werde einfach nicht schlau aus der Dokumentation...Bin für jeden Tipp dankbar.Gruss

stefan72 ·

Vielen Dank wunschtacho, hoffe du kannst helfen.

Hier meine localconf, poste aus Platzgründen nur die realurl relevanten Abschnitte.

Konfiguriert für mm_forum, tt_news (laufen beide ok). Füge ich noch andere postvarsets hinzu, werden die irgendwie nicht 'erkannt'.

<?php

// realurl - Flush RealURL Cache   
      $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_urldecodecache'] = 'tx_realurl_urldecodecache';
      $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_urlencodecache'] = 'tx_realurl_urlencodecache';
      $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_pathcache'] = 'tx_realurl_pathcache';
// end - Flush RealURL Cache 




// localconf configurations (gekürzt)
$TYPO3_CONF_VARS['SYS']['sitename'] = 'flitework.com';
bla bla vla

// the realurl configuration (ungekürzt)
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
 'init' => array(
  'enableCHashCache' => 1,
  'enableUrlDecodeCache' => 1,
  'enableUrlEncodeHash' => 1,
 ),
 'rewrite' => array(),
 'preVars' => array(),
 'pagePath' => array(
  'type' => 'user',
  'userFunc' =>
   'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
  'spaceCharacter' => '-',
  'languageGetVar' => 'L',
  'expireDays' => 3,
  'rootpage_id' => '1'
 ),
 'fileName' => array (
  'defaultToHTMLsuffixOnPrev' => 1,
  'index' => array(
   'page.html' => array(
    'keyValues' => array (
     'type' => 1,
    ),
   ),
  ),
 ),
 'postVarSets' => array(
  '_DEFAULT' => array (),
),
 'fixedPostVars' => array(
    'mm_forum_pi3' => array(
		array(
			'GETvar'            => 'tx_mmforum_pi3[folder]',
			'valueMap'          => array(
				'inbox'             => 'inbox',
				'outbox'            => 'send',
				'archive'           => 'archiv'
			)
		),
		array(
			'GETvar'            => 'tx_mmforum_pi3[action]',
			'valueMap'          => array(
				'read'				=> 'message_read',
				'write'			    => 'message_write',
				'delete'			=> 'message_del'
			)
		),
		array(
			'GETvar'            => 'tx_mmforum_pi3[messid]',
			'lookUpTable'       => array(
				'table'                 => 'tx_mmforum_pminbox' ,
				'id_field'              => 'uid',
				'alias_field'           => 'subject',
				'addWhereClause'        => ' AND NOT deleted',
				'useUniqueCache'        => 1,
				'useUniqueCache_conf'   => array(
					'strtolower'            => 1,
					'spaceCharacter'        => '_',
				),
			),
		),
		array(
			'GETvar'            => 'tx_mmforum_pi3[userid]',
			'lookUpTable'       => array(
				'table'                 => 'fe_users' ,
				'id_field'              => 'uid',
				'alias_field'           => 'username',
				'addWhereClause'        => ' AND NOT deleted',
				'useUniqueCache'        => 1,
				'useUniqueCache_conf'   => array(
					'strtolower'            => 1,
					'spaceCharacter'        => '_',
				),
			),
		)
	),
	'mm_forum_pi1' => array(
		array(
			'GETvar'            => 'tx_mmforum_pi1[action]',
			'valueMap'          => array(
				'topics'                => 'list_topic',
				'posts'                 => 'list_post',
				'user'                  => 'forum_view_profil',
				'reply'                 => 'new_post',
				'open'                  => 'new_topic',
				'report'                => 'post_alert',
				'edit'                  => 'post_edit',
				'delete'                => 'post_del',
                'all_posts'             => 'post_history',
                'unanswered'            => 'list_unans',
                'unread'                => 'list_unread',
                'all_read'              => 'reset_read',
                'subscribe'             => 'set_havealook',
                'unsubscribe'           => 'del_havealook',
                'favorite'              => 'set_favorite',
                'no_favorite'           => 'del_favorite',
                'prefix'                => 'list_prefix',
                'attachments'           => 'get_attachment',
			),
		),
		array(
			'GETvar'            => 'tx_mmforum_pi1[fid]',
			'lookUpTable'       => array(
				'table'                 => 'tx_mmforum_forums' ,
				'id_field'              => 'uid',
				'alias_field'           => 'forum_name',
				'addWhereClause'        => ' AND NOT deleted',
				'useUniqueCache'        => 1,
				'useUniqueCache_conf'   => array(
					'strtolower'            => 1,
					'spaceCharacter'        => '_',
				),
			),
		),
		array(
			'GETvar'            => 'tx_mmforum_pi1[tid]',
			'lookUpTable'       => array(
				'table'                 => 'tx_mmforum_topics' ,
				'id_field'              => 'uid',
				'alias_field'           => 'topic_title',
				'addWhereClause'        => ' AND NOT deleted',
				'useUniqueCache'        => 1,
				'useUniqueCache_conf'   => array(
					'strtolower'            => 1,
					'spaceCharacter'        => '_',
				),
			),
		),
		array(
			'GETvar'            => 'tx_mmforum_pi1[pid]',  
		),
		array(
			'GETvar'            => 'tx_mmforum_pi1[page]',  
		),
		array(
			'GETvar'            => 'tx_mmforum_pi1[user_id]',
			'lookUpTable'       => array(
				'table'                 => 'fe_users' ,
				'id_field'              => 'uid',
				'alias_field'           => 'username',
				'addWhereClause'        => ' AND NOT deleted',
				'useUniqueCache'        => 1,
				'useUniqueCache_conf'   => array(
					'strtolower'            => 1,
					'spaceCharacter'        => '_',
				),
			),
		),
		array(
			'GETvar'            => 'tx_mmforum_pi1[user_id]',
			'lookUpTable'       => array(
				'table'                 => 'fe_users' ,
				'id_field'              => 'uid',
				'alias_field'           => 'username',
				'addWhereClause'        => ' AND NOT deleted',
				'useUniqueCache'        => 1,
				'useUniqueCache_conf'   => array(
					'strtolower'            => 1,
					'spaceCharacter'        => '_',
				),
			),
		),								   

	),
	'269' => 'mm_forum_pi1',
	'257' => 'mm_forum_pi3'
),

'postVarSets' => array(
            '_DEFAULT' => array(
                'user' => array(
                    array(
                        'GETvar' => 'tx_srfeuserregister_pi1[regHash]'
                    )
                )
            )
        ),
 
 '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]',
						),
					),
				// news articles and searchwords
				'article' => array(
					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]',
						),
					),
				),
			),
		// configure filenames for different pagetypes
		'fileName' => array(
		'defaultToHTMLsuffixOnPrev' => 1,
			'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,
					),
				),
			),
			
 		),

);

// more localconf.php configurations....(gekürzt)
bla bla bla
?>
stefan72 ·

Habe das Problem lösen können. Es gibt jeweils nur ein Abschnitt mit postVarSets.
D.h, der realurl-code von verschiedenen extensions geht in denselben postVarSet 'container'.

Hoffe es hilft anderen auch...

Deepwater ·

Hallo, hoffe man schaut hier noch rein...

Hinweis: 2 Extension mit RealUrl !

Wie gesagt will ich auch tt_news mit ab_downloads nutzen, die tt_news config läuft , setz ich aber dann unter den postVarSets noch die der ab_downloads hinzu so werden die Links im Download Bereich meiner Seite richtig generiert aber z.B. bei den Categories der tt_news versucht er auch dahinter (ab_download config im postvarset-Bereich unter der tt_news config) noch die ab_download config zu laden. Was er aber in dem Falle nicht machen soll!

Hier heisst es das die Konfiguration in den selben postVarSets-Bereich hinein kommen sollen, kann man trotzdem hierbei noch was falsch machen?

Meine Config:

<?php
$TYPO3_CONF_VARS['SC_OPTIONS'] ['t3lib/class.t3lib_tstemplate.php'] ['linkData-PostProc'] []
= 'EXT:realurl/class.tx_realurl.php:&tx_realurl->encodeSpURL';
$TYPO3_CONF_VARS['SC_OPTIONS'] ['tslib/class.tslib_fe.php'] ['checkAlternativeIdMethods-PostProc'] []
= 'EXT:realurl/class.tx_realurl.php:&tx_realurl->decodeSpURL';
$TYPO3_CONF_VARS['SC_OPTIONS'] ['t3lib/class.t3lib_tcemain.php'] ['clearAllCache_additionalTables'] ['tx_realurl_urldecodecache']
= 'tx_realurl_urldecodecache';
$TYPO3_CONF_VARS['SC_OPTIONS'] ['t3lib/class.t3lib_tcemain.php'] ['clearAllCache_additionalTables'] ['tx_realurl_urlencodecache']
= 'tx_realurl_urlencodecache';
$TYPO3_CONF_VARS['FE'] ['addRootLineFields'] .=
',tx_realurl_pathsegment,alias,nav_title,title';
$TYPO3_CONF_VARS['EXTCONF'] ['realurl'] ['_DEFAULT'] = array(
	'init' => array(
	    'enableCHashCache' => 1,
	    'enableUrlDecodeCache' => 1,
	    'enableUrlEncodeHash' => 1,
	    'appendMissingSlash'   => 'ifNotFile',
 	),
 	'redirects' => array(
 	),
	'rewrite' => array(
  	),
	'preVars' => array(
  		/* Temporary no use
  		array(
			'GETvar' => 'L',
			'valueMap' => array(
				'en' => '0',
				'de' => '1',
				'valueDefault' => 'en',
				),
			),*/

		/*Config the LVars for the Fontsize ###START###*/
		/* Temporary no use
		array(
			'GETvar' => 'Fsize',
			'valueMap' => array(
				'0' => '0',
				'1' => '1',
				'2' => '2',
				),
			'noMatch' => 'bypass',
			),*/
		/*Config the LVars for the Fontsize ###END###*/
	),
  	'pagePath' => array(
		'type' => 'user',
	  	'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
	  	'spaceCharacter' => '-',
	  	'languageGetVar' => 'L',
	  	'expireDays' => 3,
	  	'rootpage_id' => '1'
  	),
	'fileName' => array (
		'defaultToHTMLsuffixOnPrev' => 0,
		'index' => array(
			'page.html' => array(
				'keyValues' => array (
					'type' => 1,
				),
			),
		),
	),
	'fixedPostVarSets' => array(
	),
	'postVarSets' => array(
		'_DEFAULT' => array(

	// archiv
			'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(
						'non-archived' => -1,
					),
				),
			),

			'date' => 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',
				  	)
				  ),
				array (
					'GETvar' => 'tx_ttnews[day]',
			    	),		
			),
	  		'browse' => array (
			  	array ( 
			  	'GETvar' => 'tx_ttnews[pointer]', 
		  		),
	  		),

			'category_news' => 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,
							'spaceCharacter' => '-',
						),
					),
				),
			),
			'article' => array (
				array (
					'GETvar' => 'tx_ttnews[tt_news]',
					'lookUpTable' => array (
						'table' => 'tt_news',
						'id_field' => 'uid',
						'alias_field' => 'title',
						'maxLength' => 12,
						'addWhereClause'=> 'AND NOT deleted',
						'useUniqueCache'=> 1,
						'useUniqueCache_conf' => array (
							'strtolower' => 1,
							'spaceCharacter' => '-',
						),
					),
				),
			),
		
	/***
			'action' => array(
				array(
					'GETvar' => 'tx_abdownloads_pi1[action]',
					'valueMap' => array(
						'show-category' => 'getviewcategory',
						'propose-a-new-download' => 'getviewaddnewdownload', 
						'open-download' => 'getviewclickeddownload', 
						'show-details-for-download' => 'getviewdetailsfordownload', 
						'report-broken-download' => 'getviewreportbrokendownload',
					'rate-download' => 'getviewratedownload',
						),
				),
			),
			'category_downloads' => array(
				array(
					'GETvar' => 'tx_abdownloads_pi1[category_uid]',
					'valueMap' => array(
						'home' => '0',
					),
					'lookUpTable' => array(
						'table' => 'tx_abdownloads_category',
						'id_field' => 'uid',
						'alias_field' => 'label',
						'addWhereClause' => ' AND NOT deleted',
						'useUniqueCache' => 1,
						'useUniqueCache_conf' => array(
							'strtolower' => 1,
							'spaceCharacter' => '-',
						),
					),
				),
			),
			'download' => array(
				array(
					'GETvar' => 'tx_abdownloads_pi1[uid]',
					'lookUpTable' => array(
						'table' => 'tx_abdownloads_download',
						'id_field' => 'uid',
						'alias_field' => 'label',
						'addWhereClause' => ' AND NOT deleted',
						'useUniqueCache' => 1,
						'useUniqueCache_conf' => array(
							'strtolower' => 1,
							'spaceCharacter' => '-',
						),
					),
				),
				array(
					'GETvar' => 'cHash',
				),
			),
			'pointer' => array(
				array(
					'GETvar' => 'tx_abdownloads_pi1[pointer]',
				),
			),
			***/
		),
	),
);
?>

Der untere Auskommentiere Bereich ist der ab_download Bereich!

So sollte er aussehen trotz ab_download conf-->

Beispiellink: h t t p://w w w.euredomain.de/blog/xxx/category_news/php/
das funktioniert auch solange ab_downloads ausgeschalten ist.

So sieht er immo aus mit ab_download conf-->

Link mit ab_downloads:
h t t P:// w w w.euredomain.de/blog/xxx/category_news/php/download//f34534d2/

Weiss vllt einer was ich übersehen habe?
Danke schon mal fürs anschauen!

Gruss

Deepwater ·

Hat keiner Realurl mit 2 Extensions laufen die Links generieren?
Wenn ja vllt mal nen Beispiel Code posten.
Wäre echt dankbar!

Gruss