Hi,
The final version of TWG 1.8.5 is available in the forum.
http://www.tinywebgallery.com/forum/viewtopic.php?f=14&t=2944
I now update the website and the this version will be released with the tinywebgallery-wrapper for Wordpress.
- Michael
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
Hi,
when using round corners and the magnifying glass of the lightbox the magnifying glass shows above the image.
This is a style sheet issue which is now fixed in the 1.8.5 preview of the forum.
- Michael
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;
}
Hi,
The 1.8.5 preview does now support canonical URLs.
This means that there is an additional attribute in the header that tells search engines that e.g.
http://www.tinywebgallery.com/demo/index.php?twg_album=01_Administration&twg_show=Administration+Help+Screen.gif
and
http://www.tinywebgallery.com/demo/index.php?twg_album=01_Administration&twg_show=Administration+Help+Screen.gif&twg_rot=90&twg_zs=1301827018
are the same page!
This is important to avoid duplicate content on your site. I have this now running at the demo and will check in the webmaster tools of google how this works
.
More info about this: http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=139066
Have fun using TWG,
Michael
Hi,
I have already started with TWG 1.8.5 and one of the main features is that folder.txt and foldername.txt can be edited in the front end.
I have implemented this already and the reason why this is available is that new translations are needed as well.
Additionally some small fixes are included.
So if you can help with the translation or want to use this new feature you can already use 1.8.5. But be aware that in the final a lot of more stuff will come.
For details and the download please go here:
http://www.tinywebgallery.com/forum/viewtopic.php?f=14&t=2944&start=0
Have fun using TWG,
Michael
Hi,
The website was refactored. It still looks the same but I removed most of the duplicate content.
I had english content under the /de part as well.
So if you have any bookmarks this are not working anymore please update them.
Best,
Michael
Hi,
if you update to TWG to 1.8.4 (actually 1.8.3 also) you have to set
$video_flash_site = “”;
in the video.php if your FLV’s are not working anymore. This is documented in the howto but before that this was not mandatory. In the next version I will make this optional again.
Best,
Michael
Hi,
I have created a fan page on facebook where you can get a fan of.
I always post this blog there too. So if you like TWG, JFU, TFU or WFU – please click “like it” on the twg home page.
See: http://www.facebook.com/pages/TinyWebGallery/132473886826220
I need at least 25 likers that I can get a nice url.
So please help.
Best,
Michael
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
Recent Comments