TWG 1.8 is now using css sprites for most of the icons and buttons.
Sprites is a technique that only one big image is loaded which contains all the other images. The position of the images inside the big image are defined in a css. This saves a lot of requests (e.g. in TWG only one language flag is now loaded instead of 29) and bandwith (1 language image = 5kb; 29 language images = 28 kb).
There are a lot of different tutorials out there and I have read quite a
lot to find the best way which should be used if you have an existing
application and you want to introduce sprites.
I have tried different implementation methods and this are the 3 main ways
you will find in the web:
- with ul/li like explained in http://www.alistapart.com/articles/sprites
- with divs like you can see at http://css-sprit.es/
- and with using a img tag as explained here: http://cssglobe.com/post/3028/creating-easy-and-useful-css-sprites
And unfortunately the first ones you find with google if you search for “css sprites” are not the easiest and best way in my opinion! Most of the time they use the ul/li solution.
This works fine if you don’t have a complex layout where each pixel counts and should look
exacly the same. I have started with this in the TWGXplorer but was not able to get the exact same positions as before.
Then I tried using divs. This works quite nice at a lot of places but at the end I also had problems to adjust the divs exacly the way I needed it.
So I finally ended up by using the img tag solution. And for an existing application this is the way to go. You simply replace all images with a transparent 1px image and apply the class for the big image and the class for the sprite. That’s really simple and worked for me in all browsers without any modifications.
I was using the sprite generator you find at http://css-sprit.es/. It has the advantage that the size of each image is specified in the css too and not only the position. The disadvantage is that if you run the generator twice with the same images a different sprite can be created because it does not sort the images. I have contacted the author about this and maybe this is already fixed when you read this post.
I hope I have saved someone a little bit time because for me it took quite a while to compare them.
Have fun using sprites,
Michael
Hi,
I have finished the last tests and everything seems very good.
Therefore I uploaded the final of TWG 1.8 to the forum
http://www.tinywebgallery.com/forum/viewtopic.php?t=2321
Please note that the additional language files are not included in the download anymore. You can always download the latest versions from the website. You find a link in the forum thread.
When the new website will be online there will be a direct link in the menu.
Have fun using TWG,
Michael
The RC4 of TWG 1.8 is now available in the forum:
http://www.tinywebgallery.com/forum/viewtopic.php?t=2321
- New: The left/right buttons of the non-scolling dhtml navigation are now using Javascript as well and not html links as before
- Fix: Non-scolling dhtml navigation + a dynamic background image was not working together – now it is.
Seems pretty close to the final
.
Best,
Michael
The RC1 of TWG 1.8 is now available in the forum:
http://www.tinywebgallery.com/forum/viewtopic.php?t=2321
This version of TWG will use sprites to improve loading times (I have already removed 315 images without loosing any functionality!), has an impoved administration (e.g. I added the config parameters for sorting) and I added the new language strings for the new features of TWG 1.8.x
Please check your language file if it is fully translated AND the file language/language_default.php.
Translate it to your language and sent it back to me. The backend has some new translations as well – please check the folder admin/_languages if you can help to finish the translations there.
Have fun using TWG,
Michael
Hi,
TWG has a new logo. A friend of mine was designing a new logo for TWG that works for an image gallery as well as for an uploader.
If you go to www.tinywebgallery.com you already can see the favicon in the address bar.
I’m currently preparing the new pages with the new logo and I will release this together with TWG 1.8
So stay tuned…
- Michael
Hi,
TWG 1.8 is almost ready. The sprites work better than expected (315 images less!!!! in the TWG download).
I will post the new version in the forum most likely on Saturday. Just go there and look in the Release candidate section for it !
You will find a nice howto use sprites here in the forum soon. I have tried all ways I have found in the net and at the end most them are simly not good. Stay tuned for how this was done in TWG and not in a 2 line example!
- Michael
Hi,
I updated TWG 1.7.8.1 again because I added TFU 2.10.4 there. Additionally I lowered the restrictions for passwords you can use in the private.txt. now special characters like öäü! can be used as well.
Download it as usual from the TWG website.
- Michael
Hi,
I have updated TWG to version 1.7.8.1. This version has the following enhancements:
- New: Added $video_flv_buffer to video.php for videos that you can specify the buffer fors flv’s before a video starts
- New: Update TFU to 2.10.2
- New: Detection of not readable xml files. I try to delete the file and debugging this problem
- New: flush() after the header. The increases TWG because css and js files can already be loaded.
- Fix: FLV part was rewritten because it was still using code which was needed for older players. Now the code is up to date again.
This is only a minor update and therefore the download and the official version is still 1.7.8. You see that you have the new version in version.txt.
Have fun using TWG,
Michael
Hi,
TWG had the problem that when your where renaming or moving folders you had to manually rename the xml files. now this is solved
:
New: $autocreate_folder_id added. Since 1.7.7 you can use a folder.id file which is the prefix for all xml files – You can now create this file automatically with the current directory in it. This enables you to move folders without loosing any xml data like comments or tags.
http://www.tinywebgallery.com/forum/viewtopic.php?t=1653
Have fun,
Michael
Hi,
The new version 1.7.8 of TWG is available in the forum. Get it here:
http://www.tinywebgallery.com/forum/viewtopic.php?t=1653
I’m currently updating TFU and JFU. When I’m done with it this version will be released officially.
Lot of things have changed:
New: Speed optimisations. Compared to TWG 1.7.7 e.g. the thumbnail page is ~ 20% faster than before!
New: cache folder can look like the original folder structure. On some servers long directory listings are slow. set $use_cache_with_dir=true if you like to use this!
New: Autoenable of the cache. After 3 requests the cache is now activated by default. Too many users were using TWG without! See: $autoenable_cache
New: Support of right.htm – works like left.htm. But you have to set the width e.g. with a div because otherwise this is ignored by some browser.
New: Meaning of header.htm, top.htm, footer.htm, bottom.htm has changed a little bit. Please check the updated howto!
New: Updated TFU to v2.9.1.1
New: Module für Joomla does now include css for litebox.
Fix: Sometimes invalid characters are in the counter files. I have added an additional check which should prevent that these are written.
Fix: If Flash was used $use_nonscrolling_dhtml has to be false. Otherwise the page was refreshed all the time. I set this now to false no matter what you set in the config.
Fix: The funpic javascript is now only loaded if you are on funpic.
Fix: $icon_set was not used for the menu_home.gif button. Now it should be displayed fine.
Fix: Check of the onlineuser.txt file was added – sometimes php does write invalid data there.
Fix: latvian language files was updated by Andra – Many thanks.
Fix: relative video folders where not working in all level depths – now it works on all levels
Fix: If you disable the login in the frontend the caption iframe link was not updated and the caption was entered for the wrong image. Now this works fine.
Fix: If someone sets $install_dir then php_include is set to true automatically.
Fix: The newest language strings where not added in all language files.
Fix: For dynamic backgrounds a width was missing. when the gallery was loaded the first time it was not displayed over the whole browser. I was actually looking quite some time for this bug and could finally solve it.
Fix: Using hashed cache names was not working for files whith special characters in the flash. Now this works fine too.
Fix: loading a language in an iframe without the default en language installed was not working if you had english as default language in the browser. Now this is checked as well.
Fix: bbc codes where not generated properly anymore after a refactoring – now they are fine again.
Fix: Poart where missing at link and bcc code
Fix: When using $use_cache_with_dir the fading slideshow was not working.
Fix: When uploading with the flash the detail images where automatically clipped! Now it works properly!
Have fun,
Michael
Recent Comments