How did you even find this place?
0 Members and 1 Guest are viewing this topic.
You should be able to append a .jpg/.gif/.whatever to the end of the url and have the browser cache it. Then use mod_rewrite or such on the server to fix it so that it gets processed by the php script.
The thumbnail files do end in image extentions, but he's listing them in the gallery using his php script to load them. He wanted to do that so the URL's of the thumbnails weren't public, but I'm suggesting that he doesn't load them through the script because they don't cache.
http://www.javaop.com/~iago/ospap/picture.php?tn=true&picture_id=22
http://www.javaop.com/~iago/ospap/picture.php?tn=true&picture_id=22.jpg
http://www.javaop.com/~iago/ospap/picture/tn-22.jpg
Quote from: Sidoh on October 12, 2005, 06:00:48 pmThe thumbnail files do end in image extentions, but he's listing them in the gallery using his php script to load them. He wanted to do that so the URL's of the thumbnails weren't public, but I'm suggesting that he doesn't load them through the script because they don't cache.No they don't.Code: [Select]http://www.javaop.com/~iago/ospap/picture.php?tn=true&picture_id=22Doesn't look like an image extention to me.What I am suggesting is that he could doCode: [Select]http://www.javaop.com/~iago/ospap/picture.php?tn=true&picture_id=22.jpgorCode: [Select]http://www.javaop.com/~iago/ospap/picture/tn-22.jpgand then use mod_rewrite to force his php script (picture.php) to handle the request. This will allow browsers to cache the images but also allow access control in the event of private images.
I don't think the prior would work (I know you could get it to work, but it would defeat the purpose of what you're trying to accomplish), but the second thing you suggested is what I recommended to begin with.
I'd personally do as Joe suggests
You might be right about that, Joe.
Whats that checkbox next to "Create" do? (Create a category)
Yep, and that loads the thumbnail file:Quote if(isset($_GET['tn']) && $_GET['tn'] == "true") $tn = true; else $tn = false;// ................... if($tn == true) show_image("$upload_directory/tn-$file"); else show_image("$upload_directory/$file");
if(isset($_GET['tn']) && $_GET['tn'] == "true") $tn = true; else $tn = false;// ................... if($tn == true) show_image("$upload_directory/tn-$file"); else show_image("$upload_directory/$file");
Quote from: iago on October 11, 2005, 08:21:27 pmYep, and that loads the thumbnail file:Quote if(isset($_GET['tn']) && $_GET['tn'] == "true") $tn = true; else $tn = false;// ................... if($tn == true) show_image("$upload_directory/tn-$file"); else show_image("$upload_directory/$file");Your code could be more efficient ^^IE: $tn is already assigned the value of $_GET['tn'], and since there is no type declaration, you can use true instead of "true". There, I just saved you a cycle or two.
class img { var $img; var $color_back; ...}
Hell, you don't even need a class to do it :\
Is there some way to make it show an error if you don't declare variables like that?On Perl, it's "use strict;"