Archive

Archive for the ‘PHP’ Category

TFU 2.15 is online.

November 23rd, 2011

Hi everyone,

TFU 2.15 is available. Get it here.

This is the new stuff:

New: The freeware version does not have a 3 MB limit anymore! It is replaced by a 3 MB popup where you can continue after entering a number.
New: You can switch the server and upload windows. See switch_sides in the config.
New: Support of IDN-Domains. Please read howto 20 of the TFU FAQ.
New: $date_format: you can define how the date in the flash is displayed.
New: TWG uses the index of a file and not the filesnames directly to support all encodings. Now you can use the file names as well to support parallel use of the flash. See $use_index_for_files or howto 21 of the TFU FAQ
New: Memory is shown when extended debug is enabled! So you can now track the memory usage even during upload!
New: Serbian language file added. Thanks to Zoran Kuzmanovic.
Fix: Date on the serverside was only shown when the directory had no special chars. Now the directory can have special chars, spaces…
Fix: Directory limit was not working properly because of a number format problem.
Fix: Directory limits where not checked when after showing the error message again. So it was possilbe to upload even when the limit was present.
Fix: hide_remote_side was not hidding the remote side label. Now it is and the ‘upload queue’ is shown at this location.

Please still register TFU even when there is no limit anymore.

So have fun with this new release,

Michael

Wordpress flash uploader 2.15 is online

October 26th, 2011

WFU 2.15 is online.

This is the new stuff:

  • New configuration options for the ‘Sync media library’. You can define which file extensions should be syncronized.
  • You can enable automatically sync which is executed as cron job in WordPress. I have added several cron job times as well. You have to set “define(’ALTERNATE_WP_CRON’, true);” in wp-config.php to enable the cron jobs.
  • Running upload detection: The file size is read twice during the process. If the filesize changes then the file is still uploading and not synchronized!
  • Updated the flash to TFU 2.15

simply get it from wordpress.org directly:

http://wordpress.org/extend/plugins/wordpress-flash-uploader/

Have fun using WFU,

Michael

TWG 1.8.6 is available in the forum

October 23rd, 2011

Hi,

TWG 1.8.6 is available in the forum.

Please see here:

http://www.tinywebgallery.com/forum/viewtopic.php?f=14&t=3133&start=0

I’ll update the website an then this version will be officially released.
Please update to this version because it fixes too big Textareas in Firefox!

Have fun using TWG,

Michael

TFU/JFU 2.14.2 bugfix release

July 13th, 2011

Hi,

this are 2 quick releases because I did some optimizations and found out that some stuff could be better:

JFU 2.14.2
Includes TFU 2.14.2
Fix: The editor button was not working because of an error in the language file which caused the Javascript to fail.

TFU 2.14.2
Fix: (php) The check if a file can be deleted is now working on even more servers.
Fix: (php) Normalize function does now support ÖÄÜ which are now converted to lowercase as well.
Fix: (php) Normalize function does now work for utf-8 as well.

TFU 2.14.1
Fix: When creation of folders was disabled and write protected folders where detected then the “Add files” button was not activated again if you go to a directory that was working again. Now the Button is activated if the folder is writable again.
Fix: If you add files and move afterwards to a diretory which is not writeable the flash was still showing an active upload button. Now the button is disabled and enabled again in a directory where the upload would work.
Fix: (php) fix encoding and normalize filenames switched in tfu_uplad.php to have the correct file encoding
Fix: (php) $sort_directores_by_date was not working properly – now it does.
Fix: (php) error_log can be not allowed which was shown in Joomla on the frontend. Now this message is hidden.

So please update to this versions, WFU will be updated soon as well.

Have fun using TFU/JFU,

Michael

TFU/JFU/WFU 2.14.1 released

July 6th, 2011

Hi,

I have updated TFU 2.14 to 2.14.1.

This is new:

Fix: (php) $sort_directores_by_date was not working properly – now it does.
Fix: (php) error_log can be not allowed which was shown in Joomla on the frontend. Now this message is hidden.

JFU/WFU do now include this version as well!

JFU for Joomla 1.6.x has some small layout fixes as well and the installer does now check for errors if Joomla adds wrong menu entries to the DB.

Have fun using TFU/JFU/WFU,

Michael

JFU 2.14 for Joomla 1.5.x and 1.6.x is available

June 6th, 2011

JFU 2.14 for Joomla 1.5.x and 1.6.x is available:

This is the new stuff:

New: TFU 2.14 is included with all the new features that comes with it. e.g directory quota, creation of files.
New: JFUploader Editor extension was extended:
- JFUploader Editor extension can be configured.
- Links can be inserted
- Thumbnails of pdf’s can be created.
- html and css was optimized to work with different templates (some templates destroyed the divs)
- Google doc viewer can be used directly.
- many small fixes…

Get it here:
1.5.x: http://www.tinywebgallery.com/dl.php?fi … 14_J15_all
1.6.x: http://www.tinywebgallery.com/dl.php?fi … 14_J16_all

I now prepare the website and then this version will be offically released!

Best,
Michael

Author: TinyWebGallery Categories: Joomla Flash Uploader, PHP Tags:

TWG 1.8.5 preview was updated

April 15th, 2011

Hi,

a couple of nice improvements have been made to 1.8.5.

Please see details here:

http://www.tinywebgallery.com/forum/viewtopic.php?f=14&t=2944

Have fun using TWG,

Michael

Author: TinyWebGallery Categories: PHP, TinyWebGallery Tags:

Optimized function to read the directory size

April 4th, 2011

Hi,

I was looking for the best and fastest way to read the size of a directory. I found a lot of pure php functions which are very slow. I also found some optimized ways depending on the OS. I put all of them together where first the OS dependent versions are used and then the php one as backup.

On my local system the windows version was 18 times faster than the php version.

I have tested this on a couple of systems which where all using the optimized version. So feel free to use this methods.

You can download the functions here:
http://www.tinywebgallery.com/dl.php?file=getFoldersize

Below you find the (unfortunately) unformatted code.

Have fun using it ;) ,

Michael


/**
*   Optimized way to the the size of a directoy.
*
*    First the windows or Unix way is tried. If this fails
*    the php internal stuff is used.
*
*    if you select legacy = false only the pure php
*    version is used.
*/
function getFoldersize($path, $legacy = true) {
$size = -1;
if ($legacy) {
if (substr(@php_uname(), 0, 7) == "Windows"){
// we have to make the path absolute !
$path_ab = realpath($path);
$obj = new COM ( 'scripting.filesystemobject' );
if ( is_object ( $obj ) ) {
$ref = $obj->getfolder ( $path_ab );
$size = $ref->size;
$obj = null;
}
} else { // hopefully unix -  du has to be in the path. If it is not you have to adjust the path.
$io = popen ( 'du -sb ' . $path, 'r' );
$usize = trim(fgets ( $io, 4096));
$split = preg_split('/\s+/', $usize);
$usize = $split[0];
pclose ( $io );
if (is_numeric($usize)) {
$size = $usize;
}
}
}
// backup if both ways fail. It is ~ 18 times slower (tested on windows) than one of the solutions above.
if ($size == -1) {
$size = foldersize($path);
}
return $size;
}

/**
*  The basic php way to go through all directories and adding the file sizes.
*/
function foldersize($p) {
$size = 0;
$fs = scandir($p);
foreach($fs as $f) {
if (is_dir(rtrim($p, '/') . '/' . $f)) {
if ($f!='.' && $f!='..') {
$size += foldersize(rtrim($p, '/') . '/' . $f);
}
} else {
$size += filesize(rtrim($p, '/') . '/' . $f);
}
}
return $size;
}

TWG 1.8.4.1 is online

March 25th, 2011

Hi,

Some minor bugfixes which makes TWG 1.8.4.1 even nicer ;) .

New: The default for $direct_folderpng was chaged to true. This gives better performance because no php calls are needed. Special characters in the path are not supported. If you have this set this to false again.
New: $direct_folderpng is now used for private.png as well. It has the same performance impact and restrictions as folder.png.
Fix: I updated the flash thumbnailer. There where some undefined strings in the url which where not right. It should not change anything but the requests are now correct.
Fix: I added the new zip class I made to TWG itself. I also updated TFU 2.13 to the latest version where this zip class was included first.
Fix: removed the duplicate zip class from the admin/upload folder. One was from TFU, one from TWG. I only use the one from TFU here.
Fix: Some smilies where not displayed properly because I was sorting the file names but not the display names.

The official version is still 1.8.4. the .1 is the internal build. Always look in version.txt to see the latest changes.

I’m now working on TWG 1.8.5.

have fun using TWG,

Michael

Author: TinyWebGallery Categories: PHP, TinyWebGallery Tags:

TFU 2.13.1 is available

March 13th, 2011

This is a very small update. I added a new functionality for the zip files to add the folder name to the zip file.

I made this an official release because it is included in JFU 2.13.

Have fun using TFU,

Michael