Zum Inhalt springen

RealUrl Konfiguration für das CHC_Forum

Erstellt am 25. November 2005 · 6 Antworten · letzte Antwort am 10. März 2007

Tags: RealURL, Frage

steffenk ·

dieser Abschnitt funktioniert prima.

Wichtig: Du musst ihn innerhalb von _DEFAULT platziern

'postVarSets' => array(
        '_DEFAULT' => array (
// hierhin!
  )
)
Waveshaper ·

mein localconf.php sieht so aus (habe nur den realurl abschnitt hiereinkopiert.. läuft soweit gut, aber eben funktioniert das mit dem chc-forum immer noch nicht...

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
    'init' => array(
        'enableCHashCache' => 1
    ),
    'preVars' => array(
        array(
            'GETvar' => 'no_cache',
            'valueMap' => array(
                'no_cache' => 1,
            ),
            'noMatch' => 'bypass',
        ),
    array(
        'GETvar' => 'L',
        'valueMap' => array(
            'en' => '1','de' => '7',
        ),
        'noMatch' => 'bypass',
        ),
    ),
    'fileName' => array (
        'index' => array(
            'backend.php' => array(
                'keyValues' => array (
                    'type' => 100,
                )
            ),
            'print' => array(                         
                'keyValues' => array(
                    'type' => 98,
                )
            ),
        ),
    ),
    'postVarSets' => array(
        '_DEFAULT' => array (
            'article' => array(

'forum' => array(
array(
	'GETvar' => 'view',												
),
array(
	'GETvar' => 'cat_uid',
	'lookUpTable' => array(
		'table' => 'tx_chcforum_category',
		'id_field' => 'uid',
		'alias_field' => 'cat_title',
		'addWhereClause' => ' AND NOT deleted',
		'useUniqueCache' => 1,
		'useUniqueCache_conf' => array(
		      'strtolower' => 1,
		     'spaceCharacter' => '-',
				),
		),
),
array(
	'GETvar' => 'conf_uid',
	'lookUpTable' => array(
			'table' => 'tx_chcforum_conference',
			'id_field' => 'uid',
			'alias_field' => 'conference_name',
			'addWhereClause' => ' AND NOT deleted',
			'useUniqueCache' => 1,
			'useUniqueCache_conf' => array(
				'strtolower' => 1,
				'spaceCharacter' => '-',
			),
		),
),
array(
	'GETvar' => 'thread_uid',
	'lookUpTable' => array(
				'table' => 'tx_chcforum_thread',
				'id_field' => 'uid',
				'alias_field' => 'thread_subject',
				'addWhereClause' => ' AND NOT deleted',
				'useUniqueCache' => 1,
				'useUniqueCache_conf' => array(
					'strtolower' => 1,
					'spaceCharacter' => '-',
				),
		 ),
),
array(
	'GETvar' => 'post_uid',
	'lookUpTable' => array(
				'table' => 'tx_chcforum_post',
				'id_field' => 'uid',
				'alias_field' => 'post_subject',
				'addWhereClause' => ' AND NOT deleted',
				'useUniqueCache' => 1,
				'useUniqueCache_conf' => array(
				'strtolower' => 1,
				'spaceCharacter' => '-',
				),
),
),

),






                array(
                    'GETvar' => 'tx_ttnews[tt_news]',
                ),
                array(
                    'GETvar' => 'tx_ttnews[backPid]',
                ),
            ),
            'category' => array(
                array(
                    'GETvar' => 'tx_ttnews[cat]',
                ),
            ),
            'neste' => array(
                array(
                    'GETvar' => 'tx_ttnews[pointer]',
                ),
            ),
        ),
    ),
    'pagePath' => array(
        'type' => 'user',
        'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
        'spaceCharacter' => '-',
        'languageGetVar' => 'L',
        'expireDays' => 3
    ),
);

weiss jemand, woran das liegen könnte?[/url]

Waveshaper ·

hab den fehler gefunden... bin eine zeile im code verrutscht.. naja, bugs bestehen meist aus einem falschen zeichen.. oder eben einer zeilenverwechslung...

als dank für deine rasche hilfe, poste ich nun hier für alle forum-teilnehmer eine funktionierende real-url konfiguration für chc_forum, die auch noch tt_news und mehrsprachgikeit unterstützt...

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
    'init' => array(
        'enableCHashCache' => 1
    ),
    'preVars' => array(
        array(
            'GETvar' => 'no_cache',
            'valueMap' => array(
                'no_cache' => 1,
            ),
            'noMatch' => 'bypass',
        ),
    array(
        'GETvar' => 'L',
        'valueMap' => array(
            'en' => '1','de' => '7',
        ),
        'noMatch' => 'bypass',
        ),
    ),
    'fileName' => array (
        'index' => array(
            'backend.php' => array(
                'keyValues' => array (
                    'type' => 100,
                )
            ),
            'print' => array(                         
                'keyValues' => array(
                    'type' => 98,
                )
            ),
        ),
    ),
    'postVarSets' => array(
        '_DEFAULT' => array (
'forum' => array(
array(
	'GETvar' => 'view',												
),
array(
	'GETvar' => 'cat_uid',
	'lookUpTable' => array(
		'table' => 'tx_chcforum_category',
		'id_field' => 'uid',
		'alias_field' => 'cat_title',
		'addWhereClause' => ' AND NOT deleted',
		'useUniqueCache' => 1,
		'useUniqueCache_conf' => array(
		      'strtolower' => 1,
		     'spaceCharacter' => '-',
				),
		),
),
array(
	'GETvar' => 'conf_uid',
	'lookUpTable' => array(
			'table' => 'tx_chcforum_conference',
			'id_field' => 'uid',
			'alias_field' => 'conference_name',
			'addWhereClause' => ' AND NOT deleted',
			'useUniqueCache' => 1,
			'useUniqueCache_conf' => array(
				'strtolower' => 1,
				'spaceCharacter' => '-',
			),
		),
),
array(
	'GETvar' => 'thread_uid',
	'lookUpTable' => array(
				'table' => 'tx_chcforum_thread',
				'id_field' => 'uid',
				'alias_field' => 'thread_subject',
				'addWhereClause' => ' AND NOT deleted',
				'useUniqueCache' => 1,
				'useUniqueCache_conf' => array(
					'strtolower' => 1,
					'spaceCharacter' => '-',
				),
		 ),
),
array(
	'GETvar' => 'post_uid',
	'lookUpTable' => array(
				'table' => 'tx_chcforum_post',
				'id_field' => 'uid',
				'alias_field' => 'post_subject',
				'addWhereClause' => ' AND NOT deleted',
				'useUniqueCache' => 1,
				'useUniqueCache_conf' => array(
				'strtolower' => 1,
				'spaceCharacter' => '-',
				),
),
),

),
            'article' => array(
                array(
                    'GETvar' => 'tx_ttnews[tt_news]',
                ),
                array(
                    'GETvar' => 'tx_ttnews[backPid]',
                ),
            ),
            'category' => array(
                array(
                    'GETvar' => 'tx_ttnews[cat]',
                ),
            ),
            'neste' => array(
                array(
                    'GETvar' => 'tx_ttnews[pointer]',
                ),
            ),
        ),
    ),
    'pagePath' => array(
        'type' => 'user',
        'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
        'spaceCharacter' => '-',
        'languageGetVar' => 'L',
        'expireDays' => 3
    ),
);
Lawrence ·
Waveshaper schrieb

als dank für [steffenks] rasche hilfe, poste ich nun hier für alle forum-teilnehmer eine funktionierende real-url konfiguration für chc_forum, die auch noch tt_news und mehrsprachgikeit unterstützt...

Liebe(r) Waveshaper,
vielen Dank dafür, dass du diese Konfiguration gepostet hast, ich sah mich schon die ganzen Anleitung schmökern, um herauszufinden, wie man sich die Postnamen aus der Datenbank holt...
Herzliche Grüße
Lorenz

bakanahito ·

Vielen Dank erst Mal für das Posting der Konfiguration. Obwohl der Thread schon etwas älter ist, hoffe ich, dass jemand eine Antwort weiß. Ich habe den Code zum Test nun einmal in meine localconfig eingebunden. Funktioniert soweit auch. Mein Problem nun: mit dem neuen Code werden die URL in folgender Form dargestell: www.domain.de/ordner1/seite
Meine ursprüngliche URL-Darstellung ist aber www.domain.de/ordner1/seite.html
Dies möchte ich natürlich weiterbeibehalten, nur weiss ich nicht, wo ich ansetzen soll bzw. ich den neuen Code abändern muss, damit meine URLs wieder mit .html dargestellt werden. Hat irgendjemand vielleicht einen Tipp für mich?
Meine localconf, die .html ermöglicht, sieht wie folgt aus:

<?
$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,
    ),
   ),
  ),
 ),
 'fixedPostVarSets' => array(),
 'postVarSets' => array(
  '_DEFAULT' => array(
   'period' => array (
    array (
     'condPrevValue' => -1,
     'GETvar' => 'tx_ttnews[pS]',
    ),
    array (
     'GETvar' => 'tx_ttnews[pL]',
    ),
    array (
     'GETvar' => 'tx_ttnews[arc]',
     'valueMap' => array(
      'non-archived' => -1,
     ),
    ),
   ),
   '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,
       'spaceCharacter' => '-',
      ),
     ),
    ),
   ),
  ),
 ),
);

Da ich sobald wie möglich ein Forum in meine Seite einbinden will und dieses nach Möglichkeit auch statische URLs aufweisen sollte, würde ich mich sehr freuen, wenn mir jemand mit diesem Problem weiterhelfen könnte.
Vielen Dank schon mal!