Results 1 to 6 of 6

Thread: BUG: URL field not working at single.php

  1. #1
    Thread Starter
    antonio2009's Avatar
    Join Date
    Oct 2009
    Location
    Portugal
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    BUG: URL field not working at single.php

    Hi,

    The URL field in ads points to http://www.mysite.com/www.authorsite.com" onclick="window.open(this.href);return false; instead of http://www.authorsite.com" onclick="window.open(this.href);return false;

    I saw some post and seams that i'm not the only one.

    Help apreciated.

    Thanks

  2. #2
    Founder dcowgill's Avatar
    Join Date
    Mar 2009
    Location
    San Francisco, CA
    Posts
    1,939
    Thanks
    66
    Thanked 135 Times in 99 Posts

    Re: BUG: URL field not working at single.php

    Did you make any changes to the code or add another custom url field?

  3. #3
    Thread Starter
    antonio2009's Avatar
    Join Date
    Oct 2009
    Location
    Portugal
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: BUG: URL field not working at single.php

    No i didnt.

    Bug only happens when user omits the "http://".

    There is a solution, at http://codingforums.com/showthread.php?t=136084
    I think solution is using "if(substr($URL, 0, 4)!="http") $URL = "http://".$URL;", but i dont know how to implement it.

    Antonio

  4. #4
    Founder dcowgill's Avatar
    Join Date
    Mar 2009
    Location
    San Francisco, CA
    Posts
    1,939
    Thanks
    66
    Thanked 135 Times in 99 Posts

    Re: BUG: URL field not working at single.php

    I haven't tested it yet but try this. Edit form_process.php and go to line 35.

    Right below this line of code paste in the following:
    Code:
    if(substr($cp_adURL, 0, 4)!="http") $cp_adURL = "http://".$cp_adURL;
    The final result should look something like this:
    Code:
    $cp_adURL = cp_filter($_POST['cp_adURL']);
    if(substr($cp_adURL, 0, 4)!="http") $cp_adURL = "http://".$cp_adURL;
    Let me know how it works out.

  5. #5
    Thread Starter
    antonio2009's Avatar
    Join Date
    Oct 2009
    Location
    Portugal
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: BUG: URL field not working at single.php

    Hi,

    Yes. it is working.
    Thanks.

    One question:
    Was it only me with this problem?

    I figured out another solution, but this one is better.
    What i did, was a file with an sql query with something like this:

    $sql = "UPDATE imojorna_postmeta set meta_value = replace(meta_value,'http://', '')";
    $sql = "UPDATE imojorna_postmeta set meta_value = replace(meta_value,'www', 'http://www')";

  6. #6
    Rookie jordan's Avatar
    Join Date
    Oct 2009
    Location
    Bellevue, WA
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: BUG: URL field not working at single.php

    I was having the same issue. Thanks for posting!

    http://centralwood.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Search Engine Not working/Images not showing
    By tiffany in forum ClassiPress General Discussion
    Replies: 11
    Last Post: April 29th, 2009, 03:57 PM