The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
VERY Weird Problem
I created a user profile field that asks members for a URL to a home page....
To show this field in the post bit I use the following code <if condition="$post['field9']"><div><b>Trade Page:</b> <a href="$post[field9]" target="_blank">Visit My Page</a></div></if> Field9 represents what they input. The wierd problem is this.. if a member puts http://sitename.com all works great - the 'Visit My Page' is linked to the URL they input HOWEVER if they leave off the http:// and put say www.sitename.com vbulletin for some reason adds our domain http://oursite.com/forums/ then puts the field9 end result for the link is http://oursite.com/forums/www.sitename.com Why in the world would vbulletin add our forum url to this field? Any ideas |
#2
|
|||
|
|||
Its not vBulletin its the anchor (<a>) link/browser. If it doesn't see the http:// it assumes that the link is local (i.e. a place on your server) instead of remote (i.e. another site).
If I remember correctly you can add a "Regular Expression" check so if you find the appropriate REGEX code, to check for the "http://" (should be available from a few google searches), you can insert it in the box in the AdminCP Custom Field Manager. |
#3
|
||||
|
||||
As said, it's a HTML problem, not something to do with the implementation of this field. You can either insert it into the box and hope they don't delete the http://, use a regular expression or validation code to check for it, or if all is lost, ask them to only input the www. or non www. address without http:// and add this to your code:
<if condition="$post['field9']"><div><b>Trade Page:</b> <a href="http://$post[field9]" target="_blank">Visit My Page</a></div></if> |
#4
|
|||
|
|||
Well thank you both VERY much - I had NO idea what was going on.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|