Page 1 of 1
what does sefRelToAbs do ?
Posted: Tue Sep 11, 2007 2:25 am
by jalil
i want to translate between SEF URLS to traditional or Joomla! URLs and vice versa...is this (sefRelToAbs) the right function to use ?
Re: what does sefRelToAbs do ?
Posted: Tue Sep 11, 2007 9:47 am
by plamendp
Hi,
sefRelToAbs() converts "traditional", relative URL:
index.html?a=b&c=d
to SEF, absolute URL:
/webroot/pathto/index.html/a,b/c,d
Plamen(dp)
Plamen(dp)
Re: what does sefRelToAbs do ?
Posted: Tue Sep 11, 2007 12:24 pm
by ianmac
The functionality of sefRelToAbs depends on the SEF setting of the Joomla! system it is running on. Should also be noted it is a 1.0 only function and in 1.5 JRoute::_() should be used.
Ian
Re: what does sefRelToAbs do ?
Posted: Tue Sep 11, 2007 2:00 pm
by plamendp
Good point, thanks!
Plamen
Re: what does sefRelToAbs do ?
Posted: Tue Sep 11, 2007 3:56 pm
by ChiefGoFor
Just to add to what Ian said, your SEF setting will affect how this function operated, but it is always a good idea to use it (in J! 1.0), even if you do not use SEF.
For instance, let's say we have:
Code: Select all
sefRelToAbs('index.php?option=com_content&task=view&id=19&Itemid=34')
If SEF is off, it will be converted to:
Code: Select all
http://www.yourdomain.com/index.php?option=com_content&task=view&id=19&Itemid=34
If SEF is on, it will be converted to:
Code: Select all
http://www.yourdomain.com/content/view/19/34/
Hense the name, relative links become absolute. The past in front is taken from your $mosConfig_live_site variable in configuration.php (Global Configuration)
I hope that helps someone out there.
Re: what does sefRelToAbs do ?
Posted: Wed Sep 12, 2007 12:01 am
by jalil
ChiefGoFor wrote:Just to add to what Ian said, your SEF setting will affect how this function operated, but it is always a good idea to use it (in J! 1.0), even if you do not use SEF.
i think this is a very important point. i coding 1.0 right now, and when i go to 1.5 i just stick a JRoute in sef.
Re: what does sefRelToAbs do ?
Posted: Wed Sep 12, 2007 12:14 am
by jalil
currently the sef.php in only resets $_SERVER['REQUEST'].
so i have to take the codes from sef into a newfile and modify them for my purpose. is this ok to do ?
i do not mind that if someone does that to my code, sol ong as the credits are kept intact, and if i understand the license correctly, it should be ok to jusy copy the sef.php ?
Re: what does sefRelToAbs do ?
Posted: Sat Oct 06, 2007 12:34 am
by dhowe01
ianmac wrote:The functionality of sefRelToAbs depends on the SEF setting of the Joomla! system it is running on. Should also be noted it is a 1.0 only function and in 1.5 JRoute::_() should be used.
Ian
Should we expect sefRefToAbs to work when compatibility mode is turned on in 1.5?
Re: what does sefRelToAbs do ?
Posted: Mon Oct 08, 2007 12:54 pm
by ianmac
I would imagine, yes.
This is a often used function, so though I haven't tried it, I would say most certainly it would be. If it doesn't, please file a bug report.
Ian
Re: what does sefRelToAbs do ?
Posted: Mon Oct 29, 2007 5:36 am
by eddyyanto
It seemed that sefRelToAbs() function doesn't work with index2.php.
Has anybody achieved that before? I mean make the sefRelToAbs to work with index2.php?
Re: what does sefRelToAbs do ?
Posted: Mon Oct 29, 2007 11:43 am
by dhowe01
It doesn't work with CB either. Apparently Beat has reported this to the Joomla Dev team on several times and it just isn't getting fixed.
Re: what does sefRelToAbs do ?
Posted: Mon Oct 29, 2007 2:50 pm
by ChiefGoFor
dhowe01 wrote:It doesn't work with CB either. Apparently Beat has reported this to the Joomla Dev team on several times and it just isn't getting fixed.
?? Beat is on the Dev team
Re: what does sefRelToAbs do ?
Posted: Mon Oct 29, 2007 5:07 pm
by dhowe01
ChiefGoFor wrote:?? Beat is on the Dev team
Please refer to this thread:
http://www.joomlapolis.com/component/op ... 106/#47106Where the following is stated, by Beat:
I reported this bug 3 times to joomla core team, once even in bug tracker.
Maybe you could report it to Joomla 1.5 Q&T forums as well ?
Exact problem is that relative paths do not get converted correctly within components in SEF mode to absolute paths in sefRelToAbs() function.
Seems like the ball is being dropped somewhere.
Re: what does sefRelToAbs do ?
Posted: Fri Nov 09, 2007 8:22 pm
by ChiefGoFor
Ah, reported to the Core Team... not the Dev Team.
Thanks for the extra info.