I'm looking to incorporate BBcode into my Drupal install, which is used for community blogging at a college. Part of the attraction (a big part) is the hyperlinking of URLs (which non-tech folks seem to have problems with). In testing BBcode, however, it seems that it will only hyperlink a URL if its part of a sentence -- if its a standalone URL, on its own line, it doesn't get hyperlinked. Any chance that this capability could be added to the code (or has it been added in the 4.7 version?)
I'm looking at the code, and ready to start experimenting, but I wanted to check first to see if there was an easy solution.
Comments
Comment #1
naudefj commentedIt's probably already fixed - I cannot replicate the problem with Drupal 4.7 RC1.
Comment #2
NukeHavoc commentedok -- I plan on migrating to 4.7 eventually after testing, but I'm at 4.6.6 now. I'll look at the 4.7 code to see if there's an easy way to backport the solution to my version as a temporary fix.
Comment #3
NukeHavoc commentedI tried pasting the URL pattern-matching logic from 4.7 into the 4.6 module, but it didn't work.
Naudefj -- when you tried it on your install, was the hyperlink completely on its own line, with only space above and below, like this:
http://www.cnn.com
On my 4.6 machine, the hyperlink problem only shows up if the link appears on its own line, without text above or below. If it immediately follows a block of text, say like this...
http://www.cnn.com
...then the link works.
Comment #4
naudefj commentedApply this patch to see if it resolves your problem -
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/bbcode/bbcode...
Comment #5
naudefj commentedPlease reopen if the provided solution doesn't work.
Comment #6
NukeHavoc commentedThis did the trick -- thanks!
Comment #7
NukeHavoc commentedOne more problem child -- hyperlinks that appear within parenthesis don't get hyperlinked, e.g.: (http://www.test.com)
Comment #8
naudefj commentedFix committed. See http://cvs.drupal.org/viewcvs/drupal/contributions/modules/bbcode/bbcode...
Comment #9
NukeHavoc commentedthanks. that worked.
Comment #10
(not verified) commented