vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   VERY Weird Problem (https://vborg.vbsupport.ru/showthread.php?t=183071)

hobbybox 06-20-2008 03:40 PM

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

Opserty 06-20-2008 04:44 PM

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.

cheat-master30 06-20-2008 04:49 PM

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>

hobbybox 06-20-2008 10:10 PM

Well thank you both VERY much - I had NO idea what was going on.


All times are GMT. The time now is 07:10 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01043 seconds
  • Memory Usage 1,713KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete