TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv

Die TYPO3 Mailingliste - nicht fragen: lesen!

[TYPO3] RealURL : moving language part to 2nd position

This is a discussion on [TYPO3] RealURL : moving language part to 2nd position within the typo3-english@lists.netfielders.de forums, part of the TYPO3-Mailinglists: ENGLISH category; Hello, I wonder if it is possible to ask RealURL to put the language parameter at second position: <root&...


Zurück   TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv > TYPO3-Mailinglists: ENGLISH > typo3-english@lists.netfielders.de

Registrieren Hilfe Benutzerliste Kalender Suchen Heutige Beiträge Alle Foren als gelesen markieren
  #1  
Alt 24.06.2008, 14:38
Xavier Perseguers
Gast
 
Beiträge: n/a
Standard [TYPO3] RealURL : moving language part to 2nd position

Hello,

I wonder if it is possible to ask RealURL to put the language parameter
at second position:

<root>
[page]
section1
page1
page2
page3
section2
page4
page5

Instead of having http://domain.tld/fr/section1/page2/page3 I would have
to read http://domain.tld/section1/fr/page2/page3

--
Xavier Perseguers
http://xavier.perseguers.ch/en/tutorials/typo3.html
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #2  
Alt 24.06.2008, 16:35
Dmitry Dulepov [typo3]
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] RealURL : moving language part to 2nd position

Hi!

Xavier Perseguers wrote:
> I wonder if it is possible to ask RealURL to put the language parameter
> at second position:


Not possible by default. preVars always go before the rest of URL. The only possible way is to provide own encoding/decoding function.

--
Dmitry Dulepov
E-mail: dmitry (AT) typo3 (DOT) org
Skype: callto:liels_bugs
TYPO3 technical: http://typo3bloke.net/
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #3  
Alt 24.06.2008, 16:36
Xavier Perseguers
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] RealURL : moving language part to 2nd position

> I wonder if it is possible to ask RealURL to put the language parameter
> at second position:
>
> <root>
> [page]
> section1
> page1
> page2
> page3
> section2
> page4
> page5
>
> Instead of having http://domain.tld/fr/section1/page2/page3 I would have
> to read http://domain.tld/section1/fr/page2/page3


I think I'll have to XCLASS RealURL to change the way pagePatch
encoding/decoding is performed...

--
Xavier Perseguers
http://xavier.perseguers.ch/en/tutorials/typo3.html
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #4  
Alt 24.06.2008, 16:38
Xavier Perseguers
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] RealURL : moving language part to 2nd position

Hi,

>> I wonder if it is possible to ask RealURL to put the language
>> parameter at second position:

>
> Not possible by default. preVars always go before the rest of URL. The
> only possible way is to provide own encoding/decoding function.


We got the same idea

--
Xavier Perseguers
http://xavier.perseguers.ch/en/tutorials/typo3.html
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #5  
Alt 24.06.2008, 17:14
Dmitry Dulepov [typo3]
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] RealURL : moving language part to 2nd position

Hi!

Xavier Perseguers wrote:
> I think I'll have to XCLASS RealURL to change the way pagePatch
> encoding/decoding is performed...


Yes. You need to subclass either tx_realurl, functions where it returns result. Simplest way would be to explode() url, check the first segment and exchange it with the second segment. Then implode all back. Should be easy to do.

--
Dmitry Dulepov
E-mail: dmitry (AT) typo3 (DOT) org
Skype: callto:liels_bugs
TYPO3 technical: http://typo3bloke.net/
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #6  
Alt 24.06.2008, 17:39
Xavier Perseguers
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] RealURL : moving language part to 2nd position

Hi!

>> I think I'll have to XCLASS RealURL to change the way pagePatch
>> encoding/decoding is performed...

>
> Yes. You need to subclass either tx_realurl, functions where it returns
> result. Simplest way would be to explode() url, check the first segment
> and exchange it with the second segment. Then implode all back. Should
> be easy to do.


Yes, I thought about something like that. Perhaps I'll have to have a
trick for URL with only 1 part but it should be OK.

I created my extension as ux_realurl_advanced.php in typo3conf and try
to get it called with

'userFunc' =>
'typo3conf/class.ux_realurl_advanced.php:&ux_realurl_advanced->main'

but it does not work yet, although the file is included. And I do not
know whether XCLASSing is relevant.

--
Xavier Perseguers
http://xavier.perseguers.ch/en/tutorials/typo3.html
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #7  
Alt 24.06.2008, 18:06
Dmitry Dulepov [typo3]
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] RealURL : moving language part to 2nd position

Hi!

Xavier Perseguers wrote:
> I created my extension as ux_realurl_advanced.php in typo3conf and try
> to get it called with
>
> 'userFunc' =>
> 'typo3conf/class.ux_realurl_advanced.php:&ux_realurl_advanced->main'
>
> but it does not work yet, although the file is included. And I do not
> know whether XCLASSing is relevant.


No, wrong XCLASS call. You never specify XLCASS directly, you only define it and declare it in your ext_localconf.php as:

$GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/realurl/class.tx_realurl_advanced.php'] = t3lib_extMgm::extPath('yourext') . 'class.ux_tx_realurl_advanced.php';

TYPO3 will do the rest.

But you need to XCLASS another class actually tx_realurl_advanced receives a path with all pre/post vars stripped. You need to XCLASS main class.

--
Dmitry Dulepov
E-mail: dmitry (AT) typo3 (DOT) org
Skype: callto:liels_bugs
TYPO3 technical: http://typo3bloke.net/
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #8  
Alt 24.06.2008, 18:51
Xavier Perseguers
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] RealURL : moving language part to 2nd position

Hi!

> No, wrong XCLASS call. You never specify XLCASS directly, you only
> define it and declare it in your ext_localconf.php as:
>
> $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/realurl/class.tx_realurl_advanced.php']
> = t3lib_extMgm::extPath('yourext') . 'class.ux_tx_realurl_advanced.php';
>
> TYPO3 will do the rest.
>
> But you need to XCLASS another class actually tx_realurl_advanced
> receives a path with all pre/post vars stripped. You need to XCLASS main
> class.


OK thanks. I tested it in the train and got it, at least first part

$GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/realurl/class.tx_realurl.php']
= PATH_typo3conf . 'class.ux_tx_realurl.php';

<?php
class ux_tx_realurl extends tx_realurl {
function encodeSpURL(&$params, &$ref) {
parent::encodeSpURL($params, $ref);
echo 'encode:';
debug($params['LD']['totalURL']);
}

function decodeSpURL($params, &$ref) {
echo 'decode:';
debug($params['LD']['totalURL']);
parent::decodeSpURL($params, $ref);
}
}
?>

I just have to play with totalURL as I see...

BTW, do you have a config hint to force RealURL to prepend the language
prefix when it is not present (= default language)? I'll need this
feature and if it is not possible then I'll have to do it in my XCLASS
but it seems that I would then have to modify a few arrays...



--
Xavier Perseguers
http://xavier.perseguers.ch/en
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #9  
Alt 24.06.2008, 19:37
Dmitry Dulepov [typo3]
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] RealURL : moving language part to 2nd position

Hi!

Xavier Perseguers wrote:
> BTW, do you have a config hint to force RealURL to prepend the language
> prefix when it is not present (= default language)? I'll need this
> feature and if it is not possible then I'll have to do it in my XCLASS
> but it seems that I would then have to modify a few arrays...


Should work if you specify default value for it in RealURl configuration.

--
Dmitry Dulepov
E-mail: dmitry (AT) typo3 (DOT) org
Skype: callto:liels_bugs
TYPO3 technical: http://typo3bloke.net/
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #10  
Alt 21.08.2008, 23:19
G.Unger
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] RealURL : moving language part to 2nd position

hi xavier

may I knidly aks if you have already developed a working solution for
moving the language part to the 2nd position, and if so would you share
it with some comments on how o use/install it?

thx and rgds
GUIDO


On 2008-06-24 18:51:59 +0200, Xavier Perseguers <typo3 (AT) perseguers (DOT) ch> said:

> Hi!
>
>> No, wrong XCLASS call. You never specify XLCASS directly, you only
>> define it and declare it in your ext_localconf.php as:
>>
>> $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/realurl/class.tx_realurl_advanced.php']
>> = t3lib_extMgm::extPath('yourext') . 'class.ux_tx_realurl_advanced.php';
>>
>> TYPO3 will do the rest.
>>
>> But you need to XCLASS another class actually tx_realurl_advanced
>> receives a path with all pre/post vars stripped. You need to XCLASS
>> main class.

>
> OK thanks. I tested it in the train and got it, at least first part
>
> $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/realurl/class.tx_realurl.php']
> = PATH_typo3conf . 'class.ux_tx_realurl.php';
>
> <?php
> class ux_tx_realurl extends tx_realurl {
> function encodeSpURL(&$params, &$ref) {
> parent::encodeSpURL($params, $ref);
> echo 'encode:';
> debug($params['LD']['totalURL']);
> }
>
> function decodeSpURL($params, &$ref) {
> echo 'decode:';
> debug($params['LD']['totalURL']);
> parent::decodeSpURL($params, $ref);
> }
> }
> ?>
>
> I just have to play with totalURL as I see...
>
> BTW, do you have a config hint to force RealURL to prepend the language
> prefix when it is not present (= default language)? I'll need this
> feature and if it is not possible then I'll have to do it in my XCLASS
> but it seems that I would then have to modify a few arrays...



_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
 

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an


Ähnliche Themen

Thema Autor Forum Antworten Letzter Beitrag
[TYPO3] Realurl without language prefix? Lars Axberg typo3-english@lists.netfielders.de 1 16.05.2008 13:50
[TYPO3] Realurl without language prefix? Lars Axberg typo3-english@lists.netfielders.de 0 16.05.2008 12:40
[TYPO3] One-tree multi-language site - one-language realurl Alexander Maringer typo3-english@lists.netfielders.de 3 26.03.2008 17:47
[TYPO3] RealURL language dependent domain help Sara Weale typo3-english@lists.netfielders.de 1 14.03.2008 17:09
[TYPO3] language menu and realurl (issue with L=0 language) Ralph Grier typo3-english@lists.netfielders.de 3 30.09.2007 05:23


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:41 Uhr.


Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

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