View Full Version : visitor links in comments not working
lawrencejay
03-20-2006, 06:39 PM
I believe this is a 1.5b bug. Can this be confirmed? Is there a current work around?
Thanks
LJ
Connie
03-20-2006, 07:15 PM
LJ,
what is not working?
I will not confirm anything before I know what I have to confirm ;=)
the links are not printed?
the links are printed but no working links?
the links are broken?
give us more exact info please!
lawrencejay
03-20-2006, 07:58 PM
Hi Connie,
Visitors can leave a message, name and URL in the comments page but when posted, there is not a link to their site. What I have found interesting is that when the user types http:// before the URL in the URL field it then produces a link. However, by just typing www.... it will not produce a link.
You can check it out here: www.lagunastills.com
LJ
Connie
03-20-2006, 08:02 PM
LJ,
that was a bug and it is fixed in the developer version already by GeOs, it was problem of missing protocol 'http://'
In the moment, for fast help, you can edit the comment in the commentarea and correct the link..
thanks for the info!
lawrencejay
03-20-2006, 08:06 PM
Thanks for the info Connie,
Any chance I could get the line of code I need to change so I can patch it on my end.
Thanks
Near line 614 there should be only this for URL checking:
if(strpos($url,'https://') == 0 && strpos($url,'http://') == 0 && strlen($url) > 0) $url ='http://'.$url;
lawrencejay
03-20-2006, 10:04 PM
Thanks for the help GeoS I replaced the lines:
if(strpos($url,'http://') === 0 && strlen($url) > 0) $url ='http://'.$url;
if(strpos($url,'https://') === 0 && strlen($url) > 0) $url ='https://'.$url;
with:
if(strpos($url,'https://') == 0 && strpos($url,'http://') == 0 && strlen($url) > 0) $url ='http://'.$url;
But is still not printing a link...
Any thoughts?
It helps to store correctly links in next comments.
Near line 52 in /includes/functions.php you can put:
} else {
$comment_name = "<a href='http://$comment_url' title='$lang_visit_homepage' target='_blank'>$comment_name</a>";
}
instead of:
} else {
unset($comment_url);
$comment_name = "$comment_name";
}
PS Remember one thing: my first code fragment will fix it for future comments and everything will be ok also with next versions of PP but this above will be OK only till next release.
So it is better to add first fix, correct comments URL in DB and have no more stress with future releases of Pixelpost (after upgrade to it).
lawrencejay
03-20-2006, 11:35 PM
Thank you!
LJ
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.