Forums

user files
Warnings at download (6 posts)

  1. etruel
    Member
    Posted 10 months ago #

    Hi
    I'm getting a couple of warning and bad download the files

    I'm testing first and found an "echo" in line 1360 at user_files.php. I comment this line then fix Headers already sent by...
    but now I found this IN the beginning of the file that download

    <br />
    <b>Warning</b>:  filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for Costa Rican Frog.jpg in <b>/home/familia/public_html/wordpress/wp-content/plugins/user-files/user_files.php</b> on line <b>1387</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/familia/public_html/wordpress/wp-content/plugins/user-files/user_files.php:1387) in <b>/home/familia/public_html/wordpress/wp-content/plugins/user-files/user_files.php</b> on line <b>1387</b><br />

    continue with the code of jpg image and this in the end of the file.

    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/familia/public_html/wordpress/wp-content/plugins/user-files/user_files.php:1387) in <b>/home/familia/public_html/wordpress/wp-includes/pluggable.php</b> on line <b>934</b><br />

    Can you fix this or some idea how ?
    Thanks for the plugin. It's very useful

  2. Scriptonite
    Member
    Posted 9 months ago #

    What version of the plugin are you using?

  3. etruel
    Member
    Posted 9 months ago #

    hey, thanks for the answer

    I'm using v2.05 of the plugin.
    PHP v5.2.17

    I think that I found another little bug: I was upload a file to user_id 2 and then in the "files" menu the same file for download its linked to my user_id folder
    ex. I upload http://blablabla.com.ar/wp-content/uploads/file_uploads/2/la%20foto.JPG

    but the download link (I'm as admin) showed is: http://blablabla.com.ar/wp-content/uploads/file_uploads/1//la%20foto.JPG
    note: "/1//" must be "/2/" in this case.

    Also I have a translation to spanish, but is not working at all. when I have finished, I can send for publish!

    thanks

  4. Scriptonite
    Member
    Posted 9 months ago #

    Thanks, I have a new pot file you can use and an update I will hopefully push this evening. I left an echo in I was using to debug which is causing most of the issues with the error messages everyone is getting. I have found a couple other little things I overlooked. I have been busy and worked on the last big update in little pieces over a long period of time and ended up making a bunch of stupid mistakes. I hope this next update will rectify all of them.

    Don't forget to preface the language files with userfiles- (ex. userfiles-es_ES.mo) so wordpress knows the language file is for the plugin. Also, the plugin will use the same language as your wordpress site, the language is not independent from the rest of the site.

    Thanks for the bug reports.

  5. etruel
    Member
    Posted 9 months ago #

    I replaced some code that fix a lot of warning and work better

    in user_files.php replace all function getDownloads()
    [Code moderated as per the Forum Rules. Please use the pastebin]

    And for fix in admin manage-files-main to download files from other users
    in functions.php around line 159

    Line:
    echo '<td align="right"><a rel="download.png" href="admin.php?page=manage-files-main&theDLfile='.$files.'"> <img title="Download '.$files.'" src="'.plugins_url( '/user-files/img/download.png' , dirname(__FILE__) ). '" alt="" width="20" height="20" /></a> | <a href="admin.php?page=manage-files-main&deletefile='.$userNum.'/'.$files.'"> <img title="Delete '.$files.'" src="'.plugins_url( '/user-files/img/delete.png ' , dirname(__FILE__) ). '" alt="" width="20" height="20" /></a></td>';

    Replace with:
    echo '<td align="right"><a rel="download.png" href="admin.php?page=manage-files-main&theDLfile='.$userNum.'/'.$files.'"> <img title="Download '.$files.'" src="'.plugins_url( '/user-files/img/download.png' , dirname(__FILE__) ). '" alt="" width="20" height="20" /></a> | <a href="admin.php?page=manage-files-main&deletefile='.$userNum.'/'.$files.'"> <img title="Delete '.$files.'" src="'.plugins_url( '/user-files/img/delete.png ' , dirname(__FILE__) ). '" alt="" width="20" height="20" /></a></td>';

  6. etruel
    Member
    Posted 9 months ago #

    OK
    here is the code moderated before
    in user_files.php replace all function getDownloads()

    http://pastebin.com/V27V6iVZ

Reply

You must log in to post.

About this Plugin

About this Topic

Tags