Hi there. I've been using the Joomla-SMF component in a site I am currently working on. I have the site localized on my computer, and have it working very nicely. One of the strange issues I ran into was with the ampersand (&) and validation. In the component configuration to my setup, it reads this in the mosurl line: "http://localhost:85/joomla/index.php?option=com_smf&Itemid=27&"
I believe this is because the component takes the first & and processes it, returning a plain &. Adding the second layer in sends this successfully to the forums. This brings up another larger issue, as it causes all the links to stop working! Is there any way to get this to work?
Thanks! -Kevin8020
« Last Edit: November 17, 2005, 10:35:56 PM by Kevin »
give us a clue then?? are you saying we should make a php proggy that url encodes everything that comes back from the component? i'm not a php programmer and have no idea where the component or joomla does it's url building. This problem looks more like a fault with either joomla or the component code and it's similar to my problem here http://www.joomlahacks.com/component/option,com_smf/Itemid,94/topic,942.0
I'm not exactly sure what JJ is saying..(I think I have an idea I'll try later) but I DO know theres something afoot with the internal representation and recognition of the url string..
for instance, when you click on [img]http://www.joomlahacks.com/smf/Themes/MamboHacks/images/english/go_down.gif/img] (or the go up button) it is supposed to instantly jumpy to the bottom or top.. instead it (dramatic,ominous drum roll) RELOADS THE ENTIRE URL!
subsequent clicks then jump you straight up and down...
This site does it.. but that may have something to do with SEF urls though...
What i think JJ is referring to is if you encode the string (url) early on, you will 'escape' or mask the characters so that they wont be stripped out or acted upon? It's worth a try I suppose, but not on a live site and it may break SEF if you have it..
if i take the amp; part out of my url things display and correctly. There are some strange goings on here but the joomla forums are about as useful as a chocolate fireguard. I tried to use a couple of other forum components and while they seemed to work as far as the url encoding etc i still have a problem where when i post a message apostrophe shows up as a slash and apostrophe! a little knowledge is dangerous as they say but i have a dedicated server with a standard fedora 3 installation, the likes of mambo and phpnuke etc ran fine on it.
Kevin,Sean .. Neither of you are using a SEF products correct? it's the raw url coming out of the program?
I believe to really test with this you HAVE to have an unmodded/unpatched SMF installation to look at simultaeneously.
At Kevin, str_replace() is way different than urlencode though they may seem to do the same thing (changing the "&" - Urlencode has some kind of logic determining what it changes, str_replace just exchanges the "&" even if the "&" were already escaped or quoting.
we all have to help each other on this, or as they say,let one "&" wash the other!
(ok. very lame-if you want REAL help @ 5:am then you best get a chocolate fireguard! yum chocolate)
This is really where somebody like (ok, actually Cowboy himself) steps in a gives a high level overview of how the component attempts it's magic as I sense we are embarking on a grand process of discovery in vain )
i've checked and i'm not using any sef at all. unmodded smf seems to work fine on it's own. The error seems to be component related somewhere after post?? I also have tried the phpbb bridge and that works fine. Sidenote:-After some faffing around i've sorted the dreaded apostophe problem, i don't like the idea of having to enable magic quotes though!
persistance always pays lol i've found a hack around it in my case take a look at the config.smf.php file at the $mosurl line mine had the amp; inserted, took that bit out and it's working perfectly now! i know nothing about mambo/joomla etc so i've no idea if that line is like that for a reason but it's not broke anything else
If the correct live site was specified for this, it would work, but since the config stuff is still joomlaized, it does nothing useful. What I find interesting is that the first instance uses &'s and the second uses ?'s... strange...
In functions.smf.php, my line 256 looked like this $tmpurl = str_replace("&?","&",$tmpurl); I replaced it with this $tmpurl = str_replace("&?","&",$tmpurl);
Above that line, I inserted this code $tmpurl = str_replace("&","&",$tmpurl);
The page is valid and the links are functional!! YAY!
« Last Edit: November 19, 2005, 06:54:53 PM by Kevin »
Try your code as seen through the eyes of a couple browsers...I read somewhere that that & /amp processing fixup takes place in the browser too, in the same way some websites auto correct if you go to
In functions.smf.php, my line 256 looked like this $tmpurl = str_replace("&?","&",$tmpurl); I replaced it with this $tmpurl = str_replace("&?","&",$tmpurl);
Above that line, I inserted this code $tmpurl = str_replace("&","&",$tmpurl);
The page is valid and the links are functional!! YAY!
Did this with my site but still having the same problems (using joomla 1.04, bridge 1.02a, CB RC2)
I had a problem with pages not validating for XHTML after installing the bridge. Kevin's fix solved the problem for me and all the links work fine. Thanks Kevin.
Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved. Terms of Use