"New additions" page?

cianclarke

Joined: 2005-08-18
Posts: 13
Posted: Thu, 2005-08-18 19:54

Hello all,
Just wondering is there a way to create a "New additions" page, as in to display the 20 newest images I've added to my gallery? It's quite important that my gallery has this feature, as otherwise I'd have the problem of having to manually add the twenty newest images to a HTML page as well as uploading to the gallery.
Could some sort of basic script be used to display the twenty most recently created JPEG files from the Albums folder? Anything at all?
I'm running V1.5, if it's relevent.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-08-18 20:02

rerun the config wiz and pay attention the statistics tab.

 
cianclarke

Joined: 2005-08-18
Posts: 13
Posted: Thu, 2005-08-18 20:54

Oh dear... My apologies for wasteing your time! I did read that page, but I had always assumed the cache was simply "cache" by the conventional definition of images stored in the users cache to speed up future viewing.
Thanks for the help,
Cian

 
cianclarke

Joined: 2005-08-18
Posts: 13
Posted: Thu, 2005-08-18 23:03

Would there be any way of integrating this into another page? What I want is just the first one or two newest additions displayed in thumbnail form on a static HTML page.
Could the required section of the stats page be extracted as an I-frame, or something of the likes?
My gallery can be found on http://www.cianclarke.com
Thanks,
Cian

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-08-18 23:19
 
cianclarke

Joined: 2005-08-18
Posts: 13
Posted: Thu, 2005-08-18 23:56

Dave, thanks a million for that!
I'm afraid I have one more question... Would there be any easy way to alter the $light part of stats.php to have the light version either not have the thumbnails linking anywhere or the humbnails link simply to /gallery, or /gallery/stats.php.
If it helps my page, and failed effort at integrating "New additions" is at http://www.cianclarke.com/home.htm
The problem arises when I click on the thumbnails.

Many thanks once again.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-08-19 02:53

don't do it in a Iframe. Do it with a include()

The other option is to see if IFrame can have a default "Target". Google for that answer because I don't do Iframes

Dave

 
dantesdedurre

Joined: 2005-08-25
Posts: 4
Posted: Thu, 2005-08-25 03:25

I'm using an include of the stats.php file with the $light version to show 9 recently added photos on my homepage, but wondering if there's an easy way to get the images to display in a 3-column by 3-column table rather than in a single column?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-08-25 03:43

dantesdedurre, the sgr=1 switch with a row=3 and col=3 should work ....on the full verson.

Some of the grid stuff along with the columns and row are taken out in some versons of stats.php. It was a bit buggy I think.

the light version (by me) removed most of that formatting.....I think. So you might have to add some table stuff to get it to render the way you want.

Dave

 
dantesdedurre

Joined: 2005-08-25
Posts: 4
Posted: Thu, 2005-08-25 03:50

What would the syntax be with the sgr=1 switch?
&sgr=1&row=3&col=3 ?

Not quite sure how that works.

 
dantesdedurre

Joined: 2005-08-25
Posts: 4
Posted: Thu, 2005-08-25 04:05

Tried that, it doesn't change anything with the full version, except it just creates a large gap between the image and the info on the right. It doesn't display the thumbs in a grid.

I guess what I'll have to do is modify the Light version to output the thumbs inside of a 3 column table. Should I just create a variable that counts to 3 and then echos a TR set?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-08-25 04:16

Im not going to code this for you but what I would do is make 2 variables say
$start=1
$end=3
for ($i = $start; $i <= $end; $i++) {
do stuff
}
if $i = 3 {
echo "<table row stuff>";
}

or fugure out why the sgr=1 does not work in the full stats.php (it might be set in the stasts config file)

Dave