Forums

BBCode - URL bug (Fixed)

warriorgov79 01 Nov, 2008
Just installed ChronoComments on my Joomla 1.5.7 sandbox site - love it! I have a problem, however, with URLs not pointing to the correct link.

Link: http://sandbox.farringtonhighschool.org/the-news/1-welcome-to-joomla.html#commentID1

I'm not well-versed in PHP, just basic HTML/CSS and Joomla 1.0.x; but good at following instructions and copying/pasting. Any help for a Chrono noob is deeply appreciated. Aloha!

Edit: Firebug reveals "http" protocol is missing in href attribute of anchor tags.

<a target="_blank" rel="nofollow" href="/farringtonhighschool.org">farringtonhighschool.org</a>
<a target="_blank" rel="nofollow" href="/farringtonhighschool.org">Link to main website</a>
Max_admin 01 Nov, 2008
Hi warriorgov79,

What do you enter as a URL so the problem occurs ?

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
warriorgov79 01 Nov, 2008
Hi Max,

Just mydomain.com for both links. I tried adding the http protocol, but I end up getting broken open tags. Adding quotes around the url makes it worse. "Convert to HTML" is turned on in the backend.

I've been away from forums and haven't used BBcode in quite a while, but I believe I have it constructed properly? Please advise. Thanks for your help.

[ url ]mydomain.com[ /url ]
[ url=mydomain.com ]Link to main site[ /url ]
Max_admin 02 Nov, 2008
Hi, see if you have this option enabled at the parameters: Convert URLs

if its enabled please disable it and retry, I think there is some conflict and should be fixed!

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
warriorgov79 02 Nov, 2008
Thanks for working with me on this...

Turned off Convert URLs in parameters and Joomla SEF, Apache mod-rewrite & Add Suffix to URLs in backend global config. Posted another test comment. Same result. SandboxURL.com/pointingdomain.com appears in the status bar when I hover over the links. Clicking on the links return Page Not Found errors.

Aloha,
warriorgov79
warriorgov79 02 Nov, 2008
Hi Max,

Follow-up test made on Chrono demo page. Same result. My posts are on comments page 12.

Aloha,
warriorgov79
Max_admin 02 Nov, 2008
Hi, try this in your comment:



FORUM POST


what do you get ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
warriorgov79 03 Nov, 2008
Hi Max,

Prior to your latest post, I was hoping the following fix would work:

In "$htmlcode = array" of /components/com_chronocomments/chronocomments.php Change the following lines:
"<a href=\"$1\" rel=\"nofollow\" target=\"_blank\">$2</a>",
"<a href=\"$1\" rel=\"nofollow\" target=\"_blank\">$1</a>",

to
"<a href=\"http://$1\" rel=\"nofollow\" target=\"_blank\">$2</a>",
"<a href=\"http://$1\" rel=\"nofollow\" target=\"_blank\">$1</a>",


Same could be done for /modules/mod_chronomments/helper.php. It worked only temporarily. If page is refreshed, links revert back to original problem.

I edited previous comments in backend, your solution works great! Still, links break if Convert URLs is turned on. Will leave it off. Would like to find a permanent fix since most of my visitors will tend to enter a URL without the http protocol.

Thanks again!

Aloha,
warriorgov79
Max_admin 03 Nov, 2008
Hi warriorgov79,

you can put here some combinations which fails at your site and I will test and fix them all and put a patch when ready!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
warriorgov79 12 Nov, 2008

Hi warriorgov79,

you can put here some combinations which fails at your site and I will test and fix them all and put a patch when ready!

Regards,
Max


Hi Max,

Found the third file to edit. It's /plugins/content/ChronoComments.php . Apply fix to all 3 files and it should work. Just need to edit the alt tag for the URL button and I think you can remove the javascript warning for improper URL. Tested only with Convert URLs off.

Aloha,
warriorgov79
Max_admin 12 Nov, 2008
great news!🙂

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
warriorgov79 12 Nov, 2008
Even better news... I got it working with Convert URLs on! Users just need to add the "http" prefix to any URL entered without the BBCode. 8)

(Edit) To everyone applying this fix: it will break links in previous comments if "http" prefix was entered in BBCode. URLs may need to be edited manually in backend.

Aloha, warriorgov79 out!
This topic is locked and no more replies can be posted.