Results 1 to 3 of 3

Thread: Disable url and email validation in add form

  1. #1
    Join Date
    Mar 2008
    Posts
    19

    Default Disable url and email validation in add form

    how to disable url and email validation in add form?

  2. #2
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    I'm a bit confused...

    Do you want it so that people dont have to register in order to submit a link?

    or

    Do you want it so that links submitted are auto approved???
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  3. #3
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    edit your link_add.php file located within the admin directory

    scroll down to the "// verify input" comments , roughly line 112 and you will find


    PHP Code:
    // verify input

    if(empty($title)) $error_msg $msg["20071"];
        elseif(empty(
    $url)) $error_msg $msg["20072"];
        elseif(empty(
    $cat)) $error_msg $msg["20073"];
        elseif (!empty(
    $email) && !IsEmailAddress($email)) $error_msg $msg["20074"];
        elseif (!empty(
    $bid) && !IsMoney($bid)) $error_msg $msg["20075"]; 
    this is where you can disable the $url as compulsory and should work with email to.

    to disable $url delete the
    PHP Code:
    elseif(empty($url)) $error_msg $msg["20072"]; 
    line (or comment out)

    to disable $email delete the
    PHP Code:
     elseif (!empty($email) && !IsEmailAddress($email)) $error_msg 
    line (or comment out)

    save.

    Then you have to edit your add_form.html and remove
    PHP Code:
    <input class="text3" type="text" name="url" size="40" value="<%$url%>" />
            <
    input type="button" name="fetch_meta" value="Fetch Meta Tags" onclick="FetchMeta(); return false;" /> 
    line, and
    PHP Code:
    <input class="text3" type="text" name="email" size="40" value="<%$email%>" /> 
    save,

Similar Threads

  1. Replies: 3
    Last Post: 08-28-2007, 09:41 AM
  2. Field validation
    By beto in forum v5.x
    Replies: 3
    Last Post: 12-24-2006, 08:48 AM
  3. User Validation Fix
    By mbarnett in forum v5.x
    Replies: 1
    Last Post: 08-20-2006, 07:55 PM
  4. Replies: 4
    Last Post: 03-05-2006, 05:26 AM
  5. Replies: 0
    Last Post: 09-20-2002, 10:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •