101

Re: Another File Browser

Hi havliteam,

What php version are you using? Could you mail me a link to your file browser installation so I can see it in action? phpThumb should return an error message when creating a thumbnail fails, do you see any? I need some more information to help you.

Greetings,

Guido

102

Re: Another File Browser

Hi,

this looks great - it's just what I'm looking for....

I've had a problem with my install of this and I'd be grateful if anyone can help.... It opens the popup window, but this stays blank....if I view source, this is what I get.....

I'm guessing the problem is with the 'Unterminated string literal' but i have no idea what I've done to cause it!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PDW File Browser v1.2 (beta)</title>
<link rel="shortcut icon" href="mediabrowser.ico" />
<script type="text/javascript">
    var editor = "tinymce";
    var funcNum = "0";
    var select_one_file = "Select only one file to insert!";
    var insert_cancelled = "Insert cancelled because there is no target to insert to!";
    var invalid_characters_used = "These characters are not allowed: ^ \\ / ? * \" ' < > : | .";
    var rename_file = "Please give a new name for {0}{1}File extension is added automatically!{1}(These characters are not allowed {2})";
    var rename_folder = "Please give a new name for {0}{1}(These characters are not allowed {2})";
    var rename_error = "Rename failed!";
</script>
<script type="text/javascript">
//<![CDATA[
Unterminated string literal.

any help gratefully received! I'm using a local (testing) ubuntu server with apache 2 and php 5

edit - I tried uploading it in case it'd work on the actual server, and the popup page comes up with a 500 error...

Last edited by mistafeesh (2010-10-13 17:05:02)

103

Re: Another File Browser

What's the best way of contributing to this project? I've added a few fixes / enhancements and not sure of the best way of sharing them. (Maybe setting up the code as a GitHub git repository?)

Michal.

104

Re: Another File Browser

Hi michal,

I've added git to my SourceForge project.

git://pdwfilebrowser.git.sourceforge.net/gitroot/pdwfilebrowser/pdwfilebrowser

This is the first time I'm using git so I will have to learn (and by looking at the documention I will have to learn a lot :-)). I've pushed all js, php and css files to the tree. The only thing I don't understand is how you can contribute to the project, because the above url is read only. How will I get to see your changes?

The files I pushed to the tree are from version 1.3 so those can be somewhat different then the files you changed.

Guido

Last edited by Guido Neele (2010-10-19 21:50:51)

105

Re: Another File Browser

Hi Guido,

small tip for the next version.

You should make a little bit in the security.

Reason:
Know one the exact path, can upload of these pictures.

e.g.
http://www.neele.name/pdw_file_browser/index.php
Without having called the MCE one day.

I have solved it now in such a way that I launch a query before.
if ($logging_in == 1)

But this is applicable of course only for me.


2:
Is it possible then to indicate the folder "upload" always opened out?

I can see the cascade menus first, if I draufklicke.

Maybe in the Configs purely. With levels.
Speak:
1 level always open.

106

Re: Another File Browser

Hi

Will this work on Windows server? Do you have any plan to make some basic resize feature so I can specify max height and width and the image would be resized to the max allowed if bigger else it would be aploaded just the way it is?

107

Re: Another File Browser

Hi Guido,

What I've done is cloned the project and created my own repository at

http://github.com/michalc/PDW-File-Browser

Any changes I make you can then "pull" into your own repository. I've sort of followed the instructions at http://help.github.com/forking/, although as you're not using GitHub, it's a bit different as there isn't really a concept of "forking" in plain git (as far as I know), just cloning. I'm not entirely sure what effect this would have... Although one thing I can think of is that as far as I know a "pull request" is a GitHub enhancement to Git, so it might be good to have your main repository on GitHub as well, and then I would fork it.

Michal.

108

Re: Another File Browser

Michalc,

OK I've added your repository and I will monitor it from time to time.

Thanks,

Guido

109

Re: Another File Browser

Hi Jerry,

Yes, PDW File Browser will work on Windows Server. You will have to set the constant DOCUMENTROOT manually because I have experienced that $_SERVER['DOCUMENT_ROOT'] is not working on Windows Servers. Just use something like...

define('DOCUMENTROOT', 'c:\\webroot\\example.com\\www');

I will add your request, for setting a maximum height and width, to the list. It will be included in one of the next versions. It will not be included in the upcoming version that is due by the end of the week. Maybe the next one.

Guido

110

Re: Another File Browser

lord_icon wrote:

Hi Guido,

small tip for the next version.

You should make a little bit in the security.

Reason:
Know one the exact path, can upload of these pictures.

e.g.
http://www.neele.name/pdw_file_browser/index.php
Without having called the MCE one day.

I have solved it now in such a way that I launch a query before.
if ($logging_in == 1)

But this is applicable of course only for me.


2:
Is it possible then to indicate the folder "upload" always opened out?

I can see the cascade menus first, if I draufklicke.

Maybe in the Configs purely. With levels.
Speak:
1 level always open.

lord_icon,

Authorization is an important issue, because if you don't "anyone" will be able to browse, upload and create folders (depending on your configuration) on your server. The trouble is that there is no golden formula to authorize this plug-in, because I don't know which CMS/application everyone is using. So, everyone who is installing this plug-in will have to write the authorization code him or herself. I did however add a comment to the configuration file on how you could do it and where the best place is to put your code. I'm afraid I can't do more than that.

I will mark your second point as a feature request and will add it in one of the future versions. This feature will be added because I've been annoyed by it as well :-).

I hope this answers your questions.

Greetings,

Guido

Last edited by Guido Neele (2010-10-21 13:24:20)

111

Re: Another File Browser

Thanx. I didn't mean just size constraint but option to resize if too big (automatically). Ok, we would all love the full featured picture editor but hey, I know how much work that is ;-)

112

Re: Another File Browser

The weirdest thing... I'd just like to check if there's anyone else with the same problem.

This script works perfectly on one server, and works fine on the other except that I can't upload anything (kind of crucial wink). Of course the files and CHMOD settings are completely identical. Could it be something in my server's settings (http://www.unisoncms.com/phpinfo.php)?

Maybe an interesting detail is that on the server that's not working in the cache folder there are only 2 minify files and on the working several folders and 3 minify files.

Last edited by mysticmind (2010-10-23 14:03:34)

113

Re: Another File Browser

Misticmind,

The cache folder is only filled with folders if there are images in the upload folder. If your upload folder is empty then the cache folder will not contain any folders.

Could you create a file with the following code in the folder swfupload ....

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form action="upload.php" method="post" enctype="multipart/form-data" name="form" id="form">
  <input type="hidden" name="uploadpath" id="uploadpath" value="/path/to/upload/folder/" />
  <input type="file" name="Filedata" id="Filedata" />
  <input type="submit" name="send" id="send" value="Send"/>
</form>
</body>
</html>

/path/to/upload/folder/ is same as $uploadpath in config.php.

Call the file in a browser and select an image to submit. Please report the error message that you are receiving. If the screens stays blank then the upload has succeeded. You should see the file in the file browser.

Please let me know what happened.

Guido

114

Re: Another File Browser

New version 1.3 online!

Go to http://www.neele.name/filebrowser/ or http://sourceforge.net/projects/pdwfilebrowser/ for download.

-----------------------------------------
Version 1.3 beta
-----------------------------------------
+ Added Italian language (by Paolo Battistella http://www.paolobattistella.it)
+ Added Serbian language (by krsman http://tinymce.moxiecode.com/punbb/view … 81#p81381)
+ Added Czech language (by Piotr @ SourceForge Project http://sourceforge.net/projects/pdwfilebrowser/)
+ Image preview (A modified version of SlimBox 2 (Christophe Beyls http://www.digitalia.be/software/slimbox2))
+ Standalone File Browser (Please see http://www.neele.name/filebrowser/standalone.php)
+ Returning links with or without hostname
+ New skin "Mountain View Dark"
* Rename cookie view to pdw-view because Joomla is using the same cookie

Last edited by Guido Neele (2010-10-25 15:55:25)

115

Re: Another File Browser

Guido Neele wrote:

Misticmind,

The cache folder is only filled with folders if there are images in the upload folder. If your upload folder is empty then the cache folder will not contain any folders.

Could you create a file with the following code in the folder swfupload ....

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form action="upload.php" method="post" enctype="multipart/form-data" name="form" id="form">
  <input type="hidden" name="uploadpath" id="uploadpath" value="/path/to/upload/folder/" />
  <input type="file" name="Filedata" id="Filedata" />
  <input type="submit" name="send" id="send" value="Send"/>
</form>
</body>
</html>

/path/to/upload/folder/ is same as $uploadpath in config.php.

Call the file in a browser and select an image to submit. Please report the error message that you are receiving. If the screens stays blank then the upload has succeeded. You should see the file in the file browser.

Please let me know what happened.

Guido

With this form the upload succeeds (only when the upload folder is CHMOD 777 by the way otherwise it gives the error message "File could not be saved."). There are folders in the cache folder now, but uploading with the file browser is not yet possible.

116

Re: Another File Browser

Guido Neele wrote:

New version 1.3 online!

Go to http://www.neele.name/filebrowser/ or http://sourceforge.net/projects/pdwfilebrowser/ for download.

-----------------------------------------
Version 1.3 beta
-----------------------------------------
+ Added Italian language (by Paolo Battistella http://www.paolobattistella.it)
+ Added Serbian language (by krsman http://tinymce.moxiecode.com/punbb/view … 81#p81381)
+ Added Czech language (by Piotr @ SourceForge Project http://sourceforge.net/projects/pdwfilebrowser/)
+ Image preview (A modified version of SlimBox 2 (Christophe Beyls http://www.digitalia.be))
+ Standalone File Browser (Please see http://www.neele.name/filebrowser/standalone.php)
+ Returning links with or without hostname
+ New skin "Mountain View Dark"
* Rename cookie view to pdw-view because Joomla is using the same cookie

The standalone File Browser and everything else seems to works very well (on my other server wink)! Very good job!!

117

Re: Another File Browser

well thats just a kick in the teeth lol we have just done the italian translation aswell. oh well.

118

Re: Another File Browser

the following line is showing up errors : $editor = isset($_GET["editor"] ? $_GET["editor"] : '' ; // If you want to use the file browser for both editors and/or standalone

Anyway nice work on 1.3 i was actualy gona ask about a field based image uploader. You have saved my skin there. now to figer out how to allow files to be uploaded but not viewed by users.... and an auto close. All for the future i guess.

BTW could i ask to be contacted at some point please. I understand that this project is a NON restricted project. i would like to include this in our Corperate CMS we use for our customers and would just like your blessing please.

Thanks again for an amazing plugin

119

Re: Another File Browser

my bad i found the error.

Again nice work

120

Re: Another File Browser

Very nice work!!!!!!

Can you make a button to download content, such as exists for the upload. In that case PDW could be used as ftp for upload/download files.

121

Re: Another File Browser

i'm having a similar install problem as mistafeesh, and i haven't really gotten my head around what's going on with the various files yet. basically, when i go to browse i get a blank screen with the following code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PDW File Browser v1.3 (beta)</title>
<link rel="shortcut icon" href="mediabrowser.ico" />
<script type="text/javascript">
//<![CDATA[
    var returnID = "";
    var editor = "tinymce";
    var funcNum = "0";
    var select_one_file = "Select only one file to insert!";
    var insert_cancelled = "Insert cancelled because there is no target to insert to!";
    var invalid_characters_used = "These characters are not allowed: ^ \\ / ? * \" ' < > : | .";
    var rename_file = "Please give a new name for {0}{1}File extension is added automatically!{1}(These characters are not allowed {2})";
    var rename_folder = "Please give a new name for {0}{1}(These characters are not allowed {2})";
    var rename_error = "Rename failed!";
//]]>
</script>
<script type="text/javascript">//<![CDATA[<br />
<b>Fatal error</b>:  Allowed memory size of 41943040 bytes exhausted (tried to allocate 65536 bytes) in <b>//pdw_file_browser/jsmin.php</b> on line <b>246</b><br />

The only thing I have changed is the config file where i set the upload folder as a variable to change depending on which user is managing files, etc. As for the allowed memory, I'm not sure where that figure is coming from, and I'm sure I've got loads of free space as the site is still under development. Just confused really.

Thanks

122

Re: Another File Browser

Updated the Russian language file for version 1.3:

<?php
/*
Language: Russian
File: lang/ru.php
*/ 


$lang = array(
    "decimal seperator" => ".",
    "thousands separator" => ",",
    "datetime format" => "d.m.Y H:i", // www.php.net/manual/en/function.date.php
    "Insert" => "????????",
    "File" => "????",
    "Root" => "??????",
    "Close" => "???????",
    "New folder" => "????? ?????",
    "Upload" => "????????",
    "Clipboard" => "????? ??????",
    "items" => "????????",
    "Change view" => "???????? ???",
    "View" => "???",
    "Large images" => "???????????",
    "Small images" => "??????",
    "List" => "??????",
    "Details" => "???????",
    "Tiles" => "??????",
    "Content" => "?????????",
    "Show the preview pane" => "???????? ?????? ?????????????",
    "Help" => "??????",
    "Search" => "?????",
    "All files" => "??? ?????",
    "Dimensions" => "??????????",
    "Filename" => "??? ?????",
    "Filetype" => "???",
    "Size" => "??????",
    "Modified on" => "????????",
    "Directory" => "??????????",
    "Add a new folder" => "???????? ????? ?????",
    "New folder is created in" => "????? ????? ????? ??????? ?",
    "Name of the new folder" => "???????? ????? ?????",
    "Create folder" => "??????? ????? ?????",
    "Upload a new file" => "???????? ????? ????",
    "Image editor" => "???????? ???????????",
    "Browse..." => "???????...",
    "Upload queue" => "??????? ???????",
    "Currently uploading in folder" => "???????????? ? ?????",
    "Select your file" => "???????? ????(?)",
    
    //Context menu
    "Edit" => "????????????? ???????????",
    "Copy" => "??????????",
    "Cut" => "????????",
    "Paste" => "????????",
    "Delete" => "???????",
    "delete_confirm_message_folder" => "?? ????????????? ?????? ??????? ??? ????? ?? ???? ???????????",
    "delete_confirm_message_file" => "?? ????????????? ?????? ??????? ???? ?????",
    "delete_confirm_message_image" => "?? ????????????? ?????? ??????? ??? ????????????",
    "Open" => "???????",
    "Refresh" => "????????",
    "Rename" => "?????????????",
    
    //Messages
    "The folder path was tampered with!"                         => "???? ? ????? ??? ???????!",
    "Creating new folder failed!"                                => "????? ????? ?? ???????!<br />??????????? ????????????? ????????? ????????: ^ \\ / ? * \" ' < > : |",
    "A new folder was created!"                                  => "????? ????? ???????!",
    "Creating the new folder failed!"                            => "????? ????? ?? ???????!",
    "The files where successfully copied!"                       => "????? ???????????!",
    "The file or folder path was tampered with!"                 => "???? ? ????? ??? ????? ??? ???????!",
    "Deleting file failed!"                                      => "???? ?? ??????!",
    "Deleting folder failed!"                                    => "????? ?? ???????!",
    "%d file(s) successfully removed!"                           => "%d ????? ???????!",
    "Select only one file to insert!"                            => "???????? ???? ???? ??? ???????!",
    "Insert cancelled because there is no target to insert to!"  => "??????? ?? ???????????, ?? ??????? ???????????????!",
    "Directory already exists!"                                  => "????? ?????????? ??? ????!",
    "File already exists!"                                       => "????? ???? ??? ????!",
    "Name successfully changed!"                                 => "???????? ????????!",
    "Rename failed!"                                             => "?????????????? ?? ???????????!",
    "Please give a new name for file"                            => "?????????? ??????? ????? ??? ??? {0}{1}?????????? ??????????? ?????????????!{1}(????????? ??????? ???????????: {2})",
    "Please give a new name for folder"                          => "?????????? ??????? ????? ??? ??? {0}{1}(????????? ??????? ???????????: {2})",
    "Action not allowed!"                                        => "???????? ?? ?????????!",
    "Invalid characters used!"                                   => "????????? ??????? ???????????: ^ \\\ / ? * \\\" ' < > : | .",
    
    //Upload
    "Upload limited to %d MB!"      => "??????????? ?? ??????? — %d ??!",
    "bytes"                         => "????",
    "kB"                            => "??",
    "MB"                            => "??",
    "Cancel all uploads"            => "???????? ??? ???????",

    //Settings
    "Settings"                      => "?????????",
    "Language"                      => "????",
    "Theme"                         => "????",
    "Cookies need to be enabled to save your settings!"          => "???? ?????? ???? ????????? ??? ?????????? ????????!",
    "Save settings"                 => "????????? ?????????",
    "Settings saved!"               => "????????? ?????????!",
    
    "Absolute URL with hostname"    => "?????????? ?????? ? ?????? ?????",

    "EOF" => TRUE
);

?>

123

Re: Another File Browser

Hi Guido,

Your plugin has been very useful so far. I have a couple of ideas for the next version;

"Insert for web" button
When you select an image, and click "Insert for web" (or right mouse click on the image and select "Insert for web") the File Browser creates a smaller version of the image (maximum height and width defined in the config), something like "web_originalfilename.jpg" and inserts that instead of the sometimes huge files.

"Insert as detail" button
When you select an image, and click "Insert as detail" (or right mouse click on the image and select "Insert as detail") the File Browser shows you an area select menu (something like on http://odyniec.net/projects/imgareaselect/) where you can select your thumbnail. After confirming the File Browser puts the link of the thumbnail in the Image URL section and the best thing would be if it gets automatically linked to the original version with a "Lightbox" ID.

What do you think?

124

Re: Another File Browser

Hungarian lang file:

<?php
/*
Language: Hungarian
File: lang/hu.php
*/ 


$lang = array(
    "decimal seperator"             => ".",
    "thousands separator"           => ",",
    "datetime format"               => "Y/m/d H:i", // www.php.net/manual/en/function.date.php
    "Insert"                        => "Beilleszt",
    "File"                          => "Fájl",
    "Root"                          => "Gyökér",
    "Close"                         => "Bezár",
    "New folder"                    => "Új mappa",
    "Upload"                        => "Feltölt",
    "Clipboard"                     => "Vágólap",
    "items"                         => "tételek",
    "Change view"                   => "Nézet váltása",
    "View"                          => "Nézet",
    "Large images"                  => "Nagy képek",
    "Small images"                  => "Kis képek",
    "List"                          => "Lista",
    "Details"                       => "Részletek",
    "Tiles"                         => "Bélyegképek",
    "Content"                       => "Tartalom",
    "Show the preview pane"         => "El?nézet mutatása",
    "Help"                          => "Segítség",
    "Search"                        => "Keresés",
    "All files"                     => "Minden fájl",
    "Dimensions"                    => "Méretek",
    "Filename"                      => "Név",
    "Filetype"                      => "Típus",
    "Size"                          => "Méret",
    "Modified on"                   => "Módosítás dátuma",
    "Directory"                     => "Könyvtár",
    "Add a new folder"              => "Új mappa létrehozása",
    "New folder is created in"      => "Az új mappa létrehozva: ",
    "Name of the new folder"        => "Az új mappa neve",
    "Create folder"                 => "Új mappa létrehozása",
    "Upload a new file"             => "Új fájl feltöltése",
    "Image editor"                  => "Kép szerkeszt?",
    "Browse..."                     => "Böngészés...",
    "Upload queue"                  => "Feltöltési sor",
    "Currently uploading in folder" => "Feltöltés a következ? mappába:",
    "Select your file"              => "Válassza ki a fájl(oka)t",

    //Context menu
    "Edit"                          => "Kép szerkesztése",
    "Copy"                          => "Másolás",
    "Cut"                           => "Kivágás",
    "Paste"                         => "Beillesztés",
    "Delete"                        => "Törlés",
    "Do you really want to delete this folder and its contents?" => "Biztosan törölni szeretné a mappát és annak tartalmát?",
    "Do you really want to delete this file?"                    => "Biztosan törölni szeretné ezt a fájlt?",
    "Do you really want to delete this image?"                   => "Biztosan törölni szeretné ezt a képet?",
    "Open"                          => "Megnyitás",
    "Refresh"                       => "Frissítés",
    "Rename"                        => "Átnevezés",

    //Error, success and general messages
    "The folder path was tampered with!"                         => "A mappa elérési útvonala piszkálva lett!",
    "Creating new folder failed!"                                => "Új mappa létrehozása sikertelen!<br />A következ? bet?k nem engedélyezettek: ^ \\ / ? * \" ' < > : |",
    "A new folder was created!"                                  => "Új mappa létrehozva!",
    "Creating the new folder failed!"                            => "Az új mappa létrehozása sikertelen!",  
    "The files where successfully copied!"                       => "A fájlok sikeresen átmásolva!",
    "The file or folder path was tampered with!"                 => "A fájl vagy mappa elérési útvonala piszkálva lett!",
    "Deleting file failed!"                                      => "Fájl törlése sikertelen!",
    "Deleting folder failed!"                                    => "Mappa törlése sikertelen!",
    "%d file(s) successfully removed!"                           => "%d fájl(ok) sikeresen eltávolítva!",
    "Select only one file to insert!"                            => "Csak egy fájt válasszon ki beillesztéshez!",
    "Insert cancelled because there is no target to insert to!"  => "Beillesztés megszakítva mert nincs cél meghatározva!",
    "Directory already exists!"                                  => "A mappa már létezik!",
    "File already exists!"                                       => "A fájl már létezik!",
    "Name successfully changed!"                                 => "A név sikeresen megváltozott!",
    "Rename failed!"                                             => "Az átnevezés sikertelen!",
    "Please give a new name for file"                            => "Kérem adjon új fájlnevet {0}{1}Fájl kiterjesztés automatikusan hozzáadva!{1}(Nem engedélyezett karakterek {2})",
    "Please give a new name for folder"                          => "Kérem adjon új mappanevet {0}{1}(Nem engedélyezett karakterek {2})",
    "Action not allowed!"                                        => "Parancs nem engedélyezett!",
    "Invalid characters used!"                                   => "Ezek a karakterek nem engedélyezettek: ^ \\\ / ? * \\\" ' < > : | .",

    //Upload
    "Upload limited to %d MB!"      => "A feltöltés korlátozott %d MB-ra!",
    "bytes"                         => "bytes",
    "kB"                            => "kB",
    "MB"                            => "MB",
    "Cancel all uploads"            => "Minden feltöltés megszakítása",

    //Settings
    "Settings"                      => "Beállítások",
    "Language"                      => "Nyelv",
    "Theme"                         => "Téma",
    "Cookies need to be enabled to save your settings!"          => "Engedélyezze a Cookie-kat a beállítások elmentéséhez!",
    "Save settings"                 => "Beállítások elmentése",
    "Settings saved!"               => "Beállítások elmentve!",
    
    "Absolute URL with hostname"    => "Abszolút URL cím hosztnévvel",

    "EOF" => TRUE
);

?>

125

Re: Another File Browser

So far this image uploader was what i needed.

Not sure how to delete images though, once they are uploaded.  I assumed it would be in the PDW browser window where I select a photo. Couldn't find any info on that?

Thanks for any help!