Admin Upload Utility


  -----  
Author Message

Jleagle
Member

Fri Dec 01, 2006 11:35 am   Post subject: re: Admin Upload Utility
i deleted the @ and uploaded a file then tried to delete it. It still doesnt delete, and with no errors. Its as if it just refreshes the page.
 

Thoul
Administrator

Sun Dec 03, 2006 3:04 pm   Post subject: re: Admin Upload Utility
I see. Okay, let's do a little debugging to see if the script is transmitting everything it should to trigger a delete. Find this in admin_upload.php:

Code:

      // Deletion code follows.
      elseif( $auu->options['mode'] == 'delete' && $auu->options['delete'] && $auu->cfg['allow_delete'] )
      {


After it, add:

Code:

      echo "<pre>";
      var_dump($auu->options);
      var_dump($auu->cfg);
      echo '</pre>';


Then try to delete something again. This should display a bunch of debug information after the form is submitted. Copy and post all of that here, please. You can remove this code afterwards.
 

Jleagle
Member

Mon Dec 04, 2006 8:10 am   Post subject:
array(7) {
["mode"]=>
string(6) "delete"
["module_name"]=>
string(10) "avagallery"
["auto_add"]=>
bool(false)
["delete_all"]=>
bool(false)
["delete_db"]=>
bool(false)
["delete"]=>
array(1) {
[0]=>
string(6) "39.gif"
}
["del_tpls"]=>
array(1) {
[0]=>
string(7) "Support"
}
}
array(19) {
["internal_name"]=>
string(10) "avagallery"
["display_name"]=>
string(15) "Gallery Avatars"
["max_filesize"]=>
int(51200)
["max_width"]=>
int(150)
["max_height"]=>
int(150)
["min_width"]=>
int(10)
["min_height"]=>
int(10)
["table_columns"]=>
int(5)
["file_path"]=>
string(28) "./../images/avatars/gallery/"
["db_path"]=>
string(0) ""
["db"]=>
int(0)
["tpl"]=>
int(0)
["allow_overwrite"]=>
int(1)
["allow_delete"]=>
int(1)
["object_type"]=>
array(1) {
[0]=>
string(5) "image"
}
["object_type_display"]=>
string(6) "images"
["object_name"]=>
string(14) "gallery avatar"
["allowed_types"]=>
array(5) {
["png"]=>
string(3) "png"
["gif"]=>
string(3) "gif"
["jpeg"]=>
string(3) "jpg"
["pjpeg"]=>
string(3) "jpg"
["jpg"]=>
string(3) "jpg"
}
["max_filesize_kb"]=>
int(50)
}
 

Thoul
Administrator

Mon Dec 04, 2006 3:21 pm   Post subject: re: Admin Upload Utility
Okay, good. That helps. Where are the files you're trying to delete stored? Based on that, the module is looking for images/avatars/gallery/Support/39.gif. Is that the correct location?
 

Jleagle
Member

Tue Dec 05, 2006 12:49 pm   Post subject: Re: re: Admin Upload Utility

Thoul wrote:

Okay, good. That helps. Where are the files you're trying to delete stored? Based on that, the module is looking for images/avatars/gallery/Support/39.gif. Is that the correct location?


hmm i might know the problem..

the actual path of the file is:
http://www.grabaforum.com/images/avatars/gallery/support/39.gif

but on the forums it will link to:
http://www.grabaforum.com/support/images/avatars/gallery/support/39.gif

this is using mod_rewrite so i can change:

root/index.php?forum_id=test into root/test/index.php

will that cause any problems?
 

Thoul
Administrator

Wed Dec 06, 2006 7:39 am   Post subject: re: Admin Upload Utility
It shouldn't. All that really matters is the images/avatars/gallery/support/39.gif part of the path. The script will look for that (or really ../images/etc., since it goes from the admin folder) and ignore the rest.

The problem is probably coming from the "Support" part. In the URL and actual directory, it's lowercase "support." The module is looking for the uppercase "Support," which is considered an entirely different thing. So the module looks for Support/39.gif, which doesn't exist, instead of support/39.gif, which does.

In module_avagallery.php, find this:

Code:

            'TEMPLATE' => ucfirst($cat),


Replace it with:

Code:

            'TEMPLATE' => $cat,


And let's see if that fixes it.
 

Jleagle
Member

Thu Dec 07, 2006 6:54 pm   Post subject: re: Admin Upload Utility
thats fixed it.. thanks alot!
 

Page 2 of 2
Go to page Previous  1, 2
Display posts from previous: