Author Topic: [1.7] Can not upload images when no cat_id specified  (Read 26247 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[1.7] Can not upload images when no cat_id specified
« on: May 29, 2003, 03:27:48 PM »
When u go to http://yoursite.com/4images/member.php?action=uploadform it will show u list of categories avalable for upload.
Even if u select a category, it wont let u upload and show u error message "Please select a category".
To fix that, open /templates/<yourtemplate>/member_uploadform.html
Find:
Code: [Select]
<input type="hidden" name="cat_id" value="{cat_id}" />Replace with:
Code: [Select]
{if cat_id}<input type="hidden" name="cat_id" value="{cat_id}" />{endif cat_id}
« Last Edit: July 16, 2005, 08:10:57 PM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Shap

  • Full Member
  • ***
  • Posts: 114
    • View Profile
[FIX] Cant upload images when not cat_id specifyed
« Reply #1 on: May 29, 2003, 05:35:51 PM »
I have not had this problem?? Anyone else had this?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[FIX] Cant upload images when not cat_id specifyed
« Reply #2 on: May 29, 2003, 07:02:19 PM »
can I see how it looks like at your site? cause I and Cr@zy Sash had this problem.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Lord Nite

  • Newbie
  • *
  • Posts: 43
    • View Profile
[FIX] Cant upload images when not cat_id specifyed
« Reply #3 on: May 29, 2003, 07:44:25 PM »
I had this problem as well, and your fix made it a distant memory. :)

Offline Shap

  • Full Member
  • ***
  • Posts: 114
    • View Profile
[FIX] Cant upload images when not cat_id specifyed
« Reply #4 on: May 30, 2003, 04:31:58 AM »
sure once my servers back up, ill post the code  :D

here is my code:
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">
    <tr>
      <td valign="top" class="head1">
        <table width="100%" border="0" cellpadding="4" cellspacing="0">
          <tr>
            <td colspan="2" valign="top" class="head1">{lang_user_upload}</td>
          </tr>
          <tr>
            <td class="row1"><b>{lang_category}</b></td>
            <td class="row1">{cat_name}</td>
          </tr>
          <tr>
            <td class="row2" valign="top">
 <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><br />
 </span>
</td>
            <td class="row2">
              <b>Upload:</b><br />
 <input type="file" name="media_file" class="input" /><br />
 <b>URL:</b><br />
 <input type="text" name="remote_media_file"  size="30" value="{remote_file}" class="input" /><br />
 <span class="smalltext"><b>{lang_allowed_file_types}</b> {allowed_media_types}</span>
            </td>
          </tr>
          <tr>
            <td class="row1" valign="top"><b> {lang_thumb_file}</b><br />
              <span class="smalltext"> {lang_max_filesize}<b>{max_thumb_filsize}</b><br />
              {lang_max_imagewidth}<b>{max_thumb_imagewidth}</b><br />
              {lang_max_imageheight}<b>{max_thumb_imageheight}</b><br>
              <b><font color="#990000">*Not Required</font></b><br />
              </span> </td>
            <td class="row1">
              <b>Upload:</b><br />
 <input type="file" name="thumb_file" class="input" /><br />
 <b>URL:</b><br />
 <input type="text" name="remote_thumb_file"  size="30" value="{remote_thumb_file}" class="input" /><br />
 <span class="smalltext"><b>{lang_allowed_file_types}</b> {allowed_thumb_types}</span>
            </td>
          </tr>
          <tr>
            <td class="row2"><b>{lang_image_name}</b></td>
            <td class="row2"><input type="text" name="image_name"  size="30" value="{image_name}" class="input" /></td>
          </tr>
          <tr>
            <td class="row1" valign="top"><b>{lang_description}</b></td>
            <td class="row1">
              <textarea name="image_description" cols="30" class="textarea" rows="10" wrap="VIRTUAL">{image_description}</textarea>
            </td>
          </tr>
          <tr>
            <td class="row2" valign="top"><b> {lang_keywords}<br>
              <font color="#990000">*Not Required</font> </b></td>
            <td class="row2">
              <textarea cols="30" class="textarea" rows="10" wrap="VIRTUAL" name="image_keywords">{image_keywords}</textarea>
            </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" />
    <br>
    (Only hit submit ONCE, and be patient..it's uploading!)</p>
</form>


I cant get it to work half the time, when I DO have a specific cat specified or do it from the admin section.. not sure whats wrong here. they're mp3's im trying and they wont upload.

Offline komsho24

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: [1.7] Can not upload images when no cat_id specified
« Reply #5 on: March 21, 2009, 06:25:03 PM »
V@no, thank you !