TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-25-2009, 07:56 PM   #1 (permalink)
FSX
The Wanderer
 
FSX's Avatar
 
Join Date: Oct 2008
Posts: 15
Thanks: 0
FSX is on a distinguished road
Default ImgBrowz0r 0.3

Hey people, I was getting mails from this board, because I was inactive. So I thought let's try it again.

I released a beta of script, ImgBrowz0r, some days ago. The first update after almost 7 months and it includes lots of improvements. :)

It would be cool it someone wants to test it.

Here the project page: http://61924.nl/projects/imgbrowz0r.html
And here the development page: http://bitbucket.org/fsx/imgbrowz0r/

0.3-dev is the most recent one and you can download it from the development page (click on "get source"). 0.3-beta can be downloaded from the project page, but is a bit older than 0.3-dev.

I'll appriciate it if someone would like to test it and give feedback. :)
__________________
61924
FSX is offline  
Reply With Quote
Old 04-26-2009, 01:03 AM   #2 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

More than one? I hope it hasn't been annoying you. Sorry about that!
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 04-26-2009, 07:11 AM   #3 (permalink)
FSX
The Wanderer
 
FSX's Avatar
 
Join Date: Oct 2008
Posts: 15
Thanks: 0
FSX is on a distinguished road
Default

It's no problem, I got this wonderful delete button. ;)

But stay ontopic and test my script (please). :)
__________________
61924
FSX is offline  
Reply With Quote
The Following User Says Thank You to FSX For This Useful Post:
Enfernikus (04-29-2009)
Old 04-28-2009, 02:04 PM   #4 (permalink)
FSX
The Wanderer
 
FSX's Avatar
 
Join Date: Oct 2008
Posts: 15
Thanks: 0
FSX is on a distinguished road
Default

Hmm, it's pretty inactive here, just like some months ago when I registered. How can I delete my account?
__________________
61924
FSX is offline  
Reply With Quote
Old 04-28-2009, 02:33 PM   #5 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
Jim is on a distinguished road
Default

You'll have to run around your kitchentable screaming "LALALOOMPOOR" a total 25 times, come back to the forum, click on your avatar and pray to the gods to delete it.
__________________
Nunchaku! Who doesn't like martial arts? =)
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote
Old 04-28-2009, 04:12 PM   #6 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

Quote:
Originally Posted by FSX View Post
Hmm, it's pretty inactive here, just like some months ago when I registered. How can I delete my account?
Why would you wan to do that?
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Old 04-29-2009, 07:23 AM   #7 (permalink)
FSX
The Wanderer
 
FSX's Avatar
 
Join Date: Oct 2008
Posts: 15
Thanks: 0
FSX is on a distinguished road
Default

Well, it's no use if I'm when it's inactive here.
__________________
61924
FSX is offline  
Reply With Quote
Old 04-29-2009, 10:29 AM   #8 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

TalkPHP is a very small forum, you knew that when signing up. We aren't the type of forum which posts 2,000 new topics a day just to appear active; we're just here for when people need us for anything.

That your topic hasn't got any meaningful replies in two days (wow two whole days!) isn't particularly worrying. I had a quick look at your script the other day, and shelved it as "too look at later". After another quick look today, there are a few comments:
  • Your main (imgbrowz0r) class does pretty much everything. It is doing far too much, and should be split out into more useful discrete components. Your class mixes thumbnail generation, with HTML generation, with caching, etc.. In this sense, it isn't any more than procedural code wrapped up inside a class.
  • You repeat identical code a number of times. An example being checking against a whitelist of file extensions. You do this three times, there is scope for those whitelists not correlating in the future, after a few edits.
  • Thumbnails are name-based. What happens if I upload a new version of a file (keeping the same name). It doesn't appear as though the thumbnail will be regenerated. Will it?
  • HTML generation: what if I want to use different HTML for my site? I have to edit the imgbrowz0r class to do that. This should not be the case.
  • Making thumbnails. On line 354 you check to see if the cache directory is writable and it is not a directory (ie, a writable file). If not, you stop the execution with a contradictory error message. Also in this method (make_thumb), you don't destroy the $image GD resource.
  • The get_ext method. This will not do its job properly if provided a file without an extension. File "agif" will return extension "gif" even though it does not really have an extension. Suggestion: use pathinfo($file_name, PATHINFO_EXTENSION) or at least check if the file does really have an extension (strrpos will return boolean false if it can't find the needle).

All in all, a fair start and I'm sure many people would find the imgbrowz0r more than suitable for them. The above are just some thoughts, you don't have to heed them.
Salathe is offline  
Reply With Quote
Old 04-29-2009, 03:23 PM   #9 (permalink)
FSX
The Wanderer
 
FSX's Avatar
 
Join Date: Oct 2008
Posts: 15
Thanks: 0
FSX is on a distinguished road
Default

Ok, that was my fault then, sorry. When I signed up and asked for help I didn't get an answer at all.

I'm really grateful for your feedback.

1. I tried to make something that is ready to use in lets say 10 minutes, plug-in and run. I've not much experience with object-oriented programming (some things don't even make sense to me like interfaces) and I prefer to do everything procedural.

2. I'll fix that.

3. No, it doesn't. I could use timestamps in the names to ensure a new thumbnail is generated.

4. The HTML shouldn't be edited. With CSS and Javascript you should be able to do any visual changes. I've already separated the functions that generate the navigation from the display function.

5. Hehe, my mistake. I only focused on improving the quality of the thumbnails.

6. You're right. Thanks for the suggestion.

Thanks for your thoughts. I really appreciate it.

Edit:
I've committed the fixes for the bugs.
__________________
61924

Last edited by FSX : 04-29-2009 at 03:56 PM.
FSX is offline  
Reply With Quote
Old 07-05-2009, 02:48 PM   #10 (permalink)
FSX
The Wanderer
 
FSX's Avatar
 
Join Date: Oct 2008
Posts: 15
Thanks: 0
FSX is on a distinguished road
Default

I've released some updated for ImgBrowz0r.

Project page: http://61924.nl/projects/imgbrowz0r.html
Screencast at CSS-Tricks: http://css-tricks.com/video-screenca...photo-gallery/
Wordpress integration: http://css-tricks.com/forums/viewtop...&t=3077#p14228
__________________
61924
FSX is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 06:00 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design