X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   URL field, want to remove http:// (https://forum.x-cart.com/showthread.php?t=20348)

vikkip 03-06-2006 06:55 PM

URL field, want to remove http://
 
I had to use the URL field in the xcart_customers table to hold different data. I was able to do most of what I need. One thing remains, I need to drop the
Code:

http://
that is automatically placed in front of the data entered into the field. For instance, if you enter
Code:

Hello World
into the URL field, you get
Code:

http://Hello World
back. I have hunted through templates, php files, includes and still can't find it! I know it's being added to the data before it's sent to the database, because
Code:

http://
is in the database. Can anyone help me find this? I'm wondering if it's done with javascript...

-Vikki

THIS PROJECT: Gold cart, Version 4.0.14

Zaja 03-07-2006 05:06 AM

Try following...open include/register.php and remove http:// from this piece of code(line 404):

Code:

# URL normalization
                if(!empty($url)) {
                        if(strpos($url, "http") !== 0) {
                                $url = "http://".$url;
                        }
                }


vikkip 03-07-2006 07:30 AM

http:// in URL field now gone.
 
Ah, you found it! Thank you. I just commented out the entire sub-routine. It worked.


All times are GMT -8. The time now is 07:24 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.