what does sefRelToAbs do ?
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
- jalil
- Joomla! Enthusiast
- Posts: 128
- Joined: Wed Jul 04, 2007 4:54 am
- Location: Kuala Lumpur, Malaysia
- Contact:
what does sefRelToAbs do ?
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 ?
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)
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)
Some day I'll change my signature to something meaningful...some day...
Re: what does sefRelToAbs do ?
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
Ian
Help test my Component XML Generator Tool!
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1997/Itemid,35/
All feedback appreciated!
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1997/Itemid,35/
All feedback appreciated!
Re: what does sefRelToAbs do ?
Good point, thanks!
Plamen
Plamen
Some day I'll change my signature to something meaningful...some day...
- ChiefGoFor
- Joomla! Engineer
- Posts: 282
- Joined: Tue Sep 13, 2005 12:22 am
- Location: Omaha, Nebraska, USA
Re: what does sefRelToAbs do ?
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:
If SEF is off, it will be converted to:
If SEF is on, it will be converted to:
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.
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.
Kenneth Crowder - Omaha, Nebraska, USA
Joomla! ...because open source matters
Joomla! ...because open source matters
- jalil
- Joomla! Enthusiast
- Posts: 128
- Joined: Wed Jul 04, 2007 4:54 am
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: what does sefRelToAbs do ?
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.
- jalil
- Joomla! Enthusiast
- Posts: 128
- Joined: Wed Jul 04, 2007 4:54 am
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: what does sefRelToAbs do ?
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 ?
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 ?
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 ?
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
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
Help test my Component XML Generator Tool!
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1997/Itemid,35/
All feedback appreciated!
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1997/Itemid,35/
All feedback appreciated!
Re: what does sefRelToAbs do ?
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?
Has anybody achieved that before? I mean make the sefRelToAbs to work with index2.php?
+ what's great about open-source? kindness of sharing
+ http://www.eddyyanto.com
+ http://www.eddyyanto.com
Re: what does sefRelToAbs do ?
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.
- ChiefGoFor
- Joomla! Engineer
- Posts: 282
- Joined: Tue Sep 13, 2005 12:22 am
- Location: Omaha, Nebraska, USA
Re: what does sefRelToAbs do ?
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
Kenneth Crowder - Omaha, Nebraska, USA
Joomla! ...because open source matters
Joomla! ...because open source matters
Re: what does sefRelToAbs do ?
ChiefGoFor wrote:
?? Beat is on the Dev team
Please refer to this thread:
http://www.joomlapolis.com/component/op ... 106/#47106
Where 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.
- ChiefGoFor
- Joomla! Engineer
- Posts: 282
- Joined: Tue Sep 13, 2005 12:22 am
- Location: Omaha, Nebraska, USA
Re: what does sefRelToAbs do ?
Ah, reported to the Core Team... not the Dev Team. Thanks for the extra info.
Kenneth Crowder - Omaha, Nebraska, USA
Joomla! ...because open source matters
Joomla! ...because open source matters