Results 1 to 6 of 6

Thread: Restrict upload to a single image

  1. #1
    Thread Starter
    Newbie
    Not a Verified Customer
    mrvibe's Avatar
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Restrict upload to a single image

    Hi, I'm new at this board and would like to congratulate you for the great theme.

    I would like to know if it is possible to change form_process.php in order to restrict image upload to a single image or if there is another way to achieve the desired result. Also I would like to know how to make image upload mandatory.

    Thank you in advance. Once again, congratulations for your work.

  2. #2
    Thread Starter
    Newbie
    Not a Verified Customer
    mrvibe's Avatar
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Restrict upload to a single image

    no news on this topic? I've tried lots of solutions and none seems to work. I really need a solution for this

  3. #3
    Thread Starter
    Newbie
    Not a Verified Customer
    mrvibe's Avatar
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Restrict upload to a single image

    I forgot to say thank you...

  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: Restrict upload to a single image

    Try replacing the following line in post-form.php

    Code:
    <input type="file" name="images[]" class="wwIconified" />
    with this line:
    Code:
    <input type="file" name="images[]" id="file" />
    So if you want to limit image uploads to 3, just repeat this code 3 times as such:
    Code:
    <input type="file" name="images[]" id="file" />
    <input type="file" name="images[]" id="file" />
    <input type="file" name="images[]" id="file" />
    I haven't tested it but it should work. Let me know how it goes.

  5. #5
    Thread Starter
    Newbie
    Not a Verified Customer
    mrvibe's Avatar
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Restrict upload to a single image

    Hi dcowgill, it worked like a charm, exactilly the desired effect. Thanks you a lot. What about making file upload a required field?

  6. #6
    Junior Member
    Not a Verified Customer
    wilson's Avatar
    Join Date
    Sep 2009
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Restrict upload to a single image

    Hi
    Just for add a version 3.0 whishlist on that:

    1.editing imges of posted ads
    2. a way of limit size and weight of images (precheck)
    3. the solution spotted here

    Would be great

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Displaying a Main Image or Large Image for listings
    By kwave12 in forum ClassiPress General Discussion
    Replies: 20
    Last Post: December 10th, 2010, 03:47 PM