News:

Pretty crazy that we're closer to 2030, than we are 2005. Where did the time go!

Main Menu

ospap - Alpha1

Started by iago, September 14, 2005, 06:46:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Blaze

Your username is Blaze, but it requires authorization by an administrator<BR>In the meantime, you can log into a different account<BR><HR>

:-\
And like a fool I believed myself, and thought I was somebody else...

iago


Blaze

http://www.javaop.com/~iago/ospap/show_category.php?category_id=6
Quote
Error!
invalid category_id
After logging out in my private category, and it keeps refreshing.

Thats two so far. :P
And like a fool I believed myself, and thought I was somebody else...

iago

Hmm, yeah, I could see that..

Ok, I'll make it so if it has to refresh more than once, it'll refresh to index.php :)

Sidoh

Sorry for digging up this topic, but I have a quick suggestion for you iago.

As you've probably noticed, thumbnails that are generated on the fly aren't cached, which can be somewhat annoying when you're navigating through a photo album like that.

You may want to consider generating a thumbnail file for each picture added to your gallery.

deadly7

Why not just have a link to the image where if it's bigger then say, 300w or 300h then make it have one side that is 300 w/h?
Example: I uploaded a 300x300 file. It stays that size, that's "thumbnail" size.
I uploaded a 500x400 file.  It reduces in size by 25% to 375 x 300
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
[17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Sidoh

Because that's a waste of bandwidth.

Since all thumbnails are displayed at the same size (or nearly the same size), resizing them in the image HTML tag is a complete waste of resources.

iago

I generate thumbnails when images are uploaded. 


Sidoh


iago

Quote from: Sidoh on October 11, 2005, 08:14:44 PM
Oh?

http://www.javaop.com/~iago/ospap/picture.php?tn=true&picture_id=22

That's the URL to one of your picture thumbnails.

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");

Sidoh

Oh, I see what you're doing.

However, you may want to veer form using that methodology because it still prevents the thumbnails from caching.

iago

Does it? I made sure I didn't put header("pragma: no-cache") in the thumbnail code.. :/

I wanted to make it possible to have "private" images, and to do that it has to go through the .php file. 

Blaze

Couldn't people just type in the picture name manually then?
And like a fool I believed myself, and thought I was somebody else...

Sidoh

Yeah, the thumbnails don't cache -- it's annoying for navigating, but I suppose it makes sense if you're trying to accomplish some level of private-ness.

Additionally, if you want images to be REALLY private, you could store them in a mysql database as blob data.

zorm

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.
"Frustra fit per plura quod potest fieri per pauciora"
- William of Ockham