Author Topic: simple upload mod  (Read 4615 times)

0 Members and 1 Guest are viewing this topic.

that Dude

  • Guest
simple upload mod
« on: March 18, 2005, 09:09:37 AM »
Hi there, I configured my 4image album in a way so that the guest and registered users can upload files into only one gallery/folder. Now I am wondering if there is any mod that will create a simple upload screen for the guest and registered user to upload files (no Category, Thumbnail, Image Name, Description or Keywords). Only Image File which will put pictures in the designated folder. Your suggestion and comment will be greatly appreciated. Thanks.


FYI: http://isaithenral.com/gallery/member.php?action=uploadform&cat_id=45   <=-. This site is using similar concept.

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: simple upload mod
« Reply #1 on: March 18, 2005, 03:01:25 PM »
Just edit the member_uploadform.html template and set the fields you don't want the visitor to change to the values you want and make them hidden

The template from the example you gave is this:
Code: [Select]
<form method="post" action="{url_member}" enctype="multipart/form-data" onsubmit="uploadbutton.disabled=true;">
  <input type="hidden" name="action" value="uploadimage" />
  <input type="hidden" name="cat_id" value="{cat_id}" />
  <table width="100%" border="0" cellspacing="0" cellpadding="1" height="1">
    <tr>
      <td valign="top" class="head1" height="1">
        <table width="100%" border="0" cellpadding="4" cellspacing="0" height="166">
          <tr>
            <td colspan="2" valign="top" class="head1" height="19">{lang_user_upload}</td>
          </tr>

          <tr>
            <td class="row1" height="19"><b>{lang_category}</b></td>
            <td class="row1" height="19">{cat_name}</td>
          </tr>
          <tr>
            <td class="row2" valign="top" height="74">
  <b>{lang_media_file}</b><br />
  <span class="smalltext">

  {lang_max_filesize}<b>{max_media_filsize}</b><br />
  {lang_max_imagewidth}<b>{max_media_imagewidth}</b><br />
  {lang_max_imageheight}<b>{max_media_imageheight}</b></span></td>
            <td class="row2" height="74">
              <b>Upload:</b><br />

  <input type="file" name="media_file" class="input" size="20" /><br>
  <span class="smalltext"><b>{lang_allowed_file_types}</b> {allowed_media_types}</span>
            </td>
          </tr>
          </table>
      </td>
    </tr>

  </table>
  <p align="center">
    <input type="submit" name="uploadbutton" value="{lang_submit}" class="button" />
    <input type="reset" value="{lang_reset}" class="button" />
  </p>
</form>

that Dude

  • Guest
Re: simple upload mod
« Reply #2 on: March 18, 2005, 05:50:24 PM »
Thank you. I tried using the same form code but when a guest tried to upload images, they get error saying "Please fill out the Image Name field!". Is there any way so the image name goes into the "Name field" automically when the name field is blank?

that Dude

  • Guest
Re: simple upload mod
« Reply #3 on: March 20, 2005, 11:07:44 AM »
Can someone help me here please? how do I set it up so that the Image Name automically get filled out by the Image File Name

Offline dootdoot

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: simple upload mod
« Reply #4 on: March 21, 2005, 12:13:46 AM »
Can someone help me here please? how do I set it up so that the Image Name automically get filled out by the Image File Name

yeah i would like that too