seeking help-broken links
Posted by hilit
seeking help-broken links June 17, 2005 03:24PM |
Re: seeking help-broken links June 18, 2005 05:28AM |
Registered: 22 years ago Posts: 6,050 |
Re: seeking help-broken links June 18, 2005 10:09AM |
well, we leave the link with copy and paste. we mark the link. then we do "copy" and then we put it on the phorum through "paste"
if the link includes a question mark or a comma "," ---then it comes out broken -- that is to say, only part of it is the link itself and the other parts leads to owhere. if u press on the broken link , you reach nowhere.
here is an example of a link that comes out broken:
[www.ynet.co.il]
if the link includes a question mark or a comma "," ---then it comes out broken -- that is to say, only part of it is the link itself and the other parts leads to owhere. if u press on the broken link , you reach nowhere.
here is an example of a link that comes out broken:
[www.ynet.co.il]
another example of a broken link June 18, 2005 10:13AM |
Re: seeking help-broken links June 18, 2005 10:57AM |
Registered: 22 years ago Posts: 6,050 |
hilit
Re: seeking help-broken links June 23, 2005 03:54AM |
Hi again
The phorum version is : 3.4.4
So I understand that if someone writes a bare link
(e.g [www.ynet.co.il])
the link will not be "click-able".
Our problem is that the link gos "broken", meaning that the "click-able" link stops before the "?" character so when you click on the link the browser opens incomplete URL .
I assumed that it can be overcome by modifying the lines in the read_fuctions.php
more particulary line ~ 20:
$body=preg_replace("/<((http|https|ftp):\/\/[a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%]+?)>/i", "<a href=\"$1\" target=\"_blank\">$1</a>", $body);
but with no success...
The phorum version is : 3.4.4
So I understand that if someone writes a bare link
(e.g [www.ynet.co.il])
the link will not be "click-able".
Our problem is that the link gos "broken", meaning that the "click-able" link stops before the "?" character so when you click on the link the browser opens incomplete URL .
I assumed that it can be overcome by modifying the lines in the read_fuctions.php
more particulary line ~ 20:
$body=preg_replace("/<((http|https|ftp):\/\/[a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%]+?)>/i", "<a href=\"$1\" target=\"_blank\">$1</a>", $body);
but with no success...
Re: seeking help-broken links June 23, 2005 04:46AM |
Registered: 22 years ago Posts: 6,050 |
hilit
Re: seeking help-broken links June 23, 2005 09:23AM |
Hi,
I believe I found the addon, this function is in the "read_function.php" file ( comes after the "// fix for double-newlines in pre-tags") :
function body_link($body)
{
{
$regex = "/((http:\/\/|www\.|http:\/\/www\.)[-.\/\d\w]+)/i";
$replace = "<a href=\"$1\">$1</a>";
$body = preg_replace($regex, $replace, $body);
}
return $body;
}
Since I don't manage regex I tried to find suitable expression instead of the above, at php.net but with no success.
Will appreciate if you can help
I believe I found the addon, this function is in the "read_function.php" file ( comes after the "// fix for double-newlines in pre-tags") :
function body_link($body)
{
{
$regex = "/((http:\/\/|www\.|http:\/\/www\.)[-.\/\d\w]+)/i";
$replace = "<a href=\"$1\">$1</a>";
$body = preg_replace($regex, $replace, $body);
}
return $body;
}
Since I don't manage regex I tried to find suitable expression instead of the above, at php.net but with no success.
Will appreciate if you can help
hilit
Re: seeking help-broken links June 26, 2005 02:05AM |
Hi,
At last we solved this bugging problem.
For whom it may concern, the addon is:
function body_link($body)
{
{
$regex = "/((http:\/\/|www\.|http:\/\/www\.)[-&=.\/\d\w\?]+)/i";
$replace = "<a href=\"$1\">$1</a>";
$body = preg_replace($regex, $replace, $body);
}
return $body;
}
in read_functions.php file just after the "nl2br($body)" function (line~115.
And:
$body=body_link($body);
in the read.php just after the line : $body=format_body($body); (line~490).
Also, I found an nice tutorial on regex in php that helped me (I hope I is OK to post it's link here):
[weblogtoolscollection.com]
thanks for all the help.
At last we solved this bugging problem.
For whom it may concern, the addon is:
function body_link($body)
{
{
$regex = "/((http:\/\/|www\.|http:\/\/www\.)[-&=.\/\d\w\?]+)/i";
$replace = "<a href=\"$1\">$1</a>";
$body = preg_replace($regex, $replace, $body);
}
return $body;
}
in read_functions.php file just after the "nl2br($body)" function (line~115.
And:
$body=body_link($body);
in the read.php just after the line : $body=format_body($body); (line~490).
Also, I found an nice tutorial on regex in php that helped me (I hope I is OK to post it's link here):
[weblogtoolscollection.com]
thanks for all the help.
Sorry, you do not have permission to post/reply in this forum.