Last Picture / Top 10 on my index.php

Bendra

Joined: 2002-07-15
Posts: 3
Posted: Mon, 2002-08-19 10:10

hi

is there any possibility to show the last added photo on the homepage (index.php)? then i want to show the top 10 pictures by clicks, possible?

thank you and best regards.

Bendra

 
Davey
Davey's picture

Joined: 2002-08-21
Posts: 4
Posted: Wed, 2002-08-21 03:18

That would be a great idea, if it can be done.

Firstly though, i think it would be better if the last photo uploaded into an album should be the one that is highlighted. Also email notification upon any new uploads or comments. :smile:

 
Bendra

Joined: 2002-07-15
Posts: 3
Posted: Thu, 2002-08-29 06:42

hi

somebody any idea how to realise this query?

THX

Bendra

 
t7
t7's picture

Joined: 2002-08-31
Posts: 2
Posted: Sat, 2002-08-31 03:41

I am also interested in these features.

 
Dabitz
Dabitz's picture

Joined: 2002-08-22
Posts: 20
Posted: Wed, 2002-09-25 00:00

It seems like nobody cared to reply to this threat. I would also be interested in doing something similar.

Please help.

 
Kommercial
Kommercial's picture

Joined: 2002-08-19
Posts: 38
Posted: Wed, 2002-09-25 08:26

Maybe its not that nobody cared, just that nobody reading this knows how.

As far as showing the last picture on the main page- I want this idea on my website as well, I figure it doesnt necessarily have to even be related to gallery at all. Just a php/perl/etc script on a page calling up the newest dated file in your image dir. Im still trying to get it to work.
Having it be highlighted is a good idea too but of course that requires tweakin gallery.
If i get it to work Ill post it

 
.pixelchimp

Joined: 2002-08-19
Posts: 13
Posted: Sun, 2002-10-06 12:44

hey all,

I managed to code a '10 last updated' albums page that utilised the block-random code to speed it up.
results can be seen at <!-- BBCode Start --><A HREF="http://www.chaoslibrary.com" TARGET="_blank">chaoslibrary.com</A><!-- BBCode End -->
drop me a mail if you would like a copy of the code.

I would love to see a top 10 pics script, can't think of an easy way to do it though.

if i come up with something i will post here though.

laters.

 
BorgKing
BorgKing's picture

Joined: 2002-09-12
Posts: 314
Posted: Sun, 2002-10-06 14:17

<!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=phpWiki&amp;file=index&amp;pagename=Send%20me%20an%20email%20when%20something%20is%20uploaded%20to%20my%20gallery" TARGET="_blank">Click here</A><!-- BBCode End --> for an e-mail script.

 
Davey
Davey's picture

Joined: 2002-08-21
Posts: 4
Posted: Thu, 2002-10-17 12:56

Any chance of sending me the code that you have on your index page Pixelchimp ??

Or even post it on here. It looks great.

Dave
Sheffield uk :grin:

 
josephp

Joined: 2002-10-03
Posts: 172
Posted: Fri, 2002-10-18 00:14
Quote:
hey all,

I managed to code a '10 last updated' albums page that utilised the block-random code to speed it up.
results can be seen at <!-- BBCode Start --><A HREF="http://www.chaoslibrary.com" TARGET="_blank">chaoslibrary.com</A><!-- BBCode End -->
drop me a mail if you would like a copy of the code.

I would love to see a top 10 pics script, can't think of an easy way to do it though.

if i come up with something i will post here though.

laters.

I would be interested to see that 10 last update code be available for use on my gallery

Thanks :grin:

 
scorpius

Joined: 2002-10-22
Posts: 3
Posted: Tue, 2002-10-22 05:21
Quote:

I would love to see a top 10 pics script, can't think of an easy way to do it though.

.

Would be tough, if you wanted top 10 of all time you'd have to keep counters for all of the pics, take a good amount of code to do that. Alternately and much easier to do would be a script that parsed your log files for the top 10 in the last month, or 3 month or however long you keep your logs for. This would be especially easy since the URL to the pic will be right in the logs.

 
josephp

Joined: 2002-10-03
Posts: 172
Posted: Tue, 2002-10-22 05:32

Gee, you mean the logs will grow and wont empty it or what?

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3474
Posted: Tue, 2002-10-22 06:50

I haven't investigated this much, but food for thought:

There's a $photo->clicks number which stores the number of times a given photo was viewed. So it's already almost all done for you.

Wouldn't it be trivial to scan every album for the top 10 (stored in the album databases)? Since this is slow, maybe do it just once a day (similar to how Bharat's <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=GalleryDocs&amp;file=index&amp;req=viewarticle&amp;artid=23&amp;artid=23" TARGET="_blank">Random Photo Block</A><!-- BBCode End --> only updates the album counts once a day using stat() to check if the file's timestamp is over a day old).

Using the Gallery infrastructure (init.php, etc.), just load the albums... $var = new Album(); $var->loadFromFile(...album.dat...), extract all the clicks in a for() loop... compare, write a file.

I'm kind of busy myself now, but I'll give someone a little assistance if they want to spearhead this. It would only be at most 100 lines of code.

Cheers,
-Beckett

 
.pixelchimp

Joined: 2002-08-19
Posts: 13
Posted: Sun, 2002-11-17 02:35

I've created a basic page with my scripts for the last updated and top 10 albums scripts,
<!-- BBCode Start --><A HREF="http://www.pixelchimp.co.uk/scripts" TARGET="_blank">www.pixelchimp.co.uk/scripts</A><!-- BBCode End -->

also, i'm going to start working on a script that displays the top 10/50/100 clicked pics.
i'll let you know the progress of that.

 
josephp

Joined: 2002-10-03
Posts: 172
Posted: Sun, 2002-11-17 05:52

Alright my man

I m glad I could be one of the help :grin:

 
pbaden

Joined: 2002-12-01
Posts: 16
Posted: Tue, 2002-12-03 22:40

I was wondering if I could get some help with this mod... I'm having 2 problems (I think)

1. if you go to my site (http://www.baden5.com) you will see that the iframe command is producing a window full of code. Not sure why?

2. It's been more than 24 hours and the .cache files that are supposed to be generated in the /albums directory aren't there yet. How do they get there? Can I download them somewhere?

Thanks, in advance.

Philip

 
danpeg

Joined: 2003-05-05
Posts: 2
Posted: Mon, 2003-05-19 23:57

Has anybody come up with a script for the top 10 viewed photos?

Thanks,

Dan.

 
drazin

Joined: 2002-11-23
Posts: 144
Posted: Tue, 2003-05-20 05:17

i got mine to work i used iframes......check it out. www.drazin.org

 
danpeg

Joined: 2003-05-05
Posts: 2
Posted: Tue, 2003-05-20 18:10

Hey drazin,

I couldn't find the top 10 section. Where is it exactly?

 
Carl_in_Florida
Carl_in_Florida's picture

Joined: 2003-01-07
Posts: 110
Posted: Wed, 2003-05-21 03:09

I am no php wizard but I got this thing up, running and configured to look like my site. This is a really cool mod!
But can someone tell me how do I get rid of the date. I don't care when the album was modified I just want to show it. I tried to modify the code at the bottom around here:

$cacheRealName[$i] . "</a>");
echo ("<br>
last updated: " . $cacheDate[$i] ."</td></tr>");
}

}

?>

but it would no longer work. Can anyone tell me what to manipulate to make it not show the "last updated: " date?

Thanks
Carl

 
daoist

Joined: 2002-08-22
Posts: 38
Posted: Mon, 2003-05-26 13:11

change the echo to:
echo ("</td></tr>");

 
Carl_in_Florida
Carl_in_Florida's picture

Joined: 2003-01-07
Posts: 110
Posted: Mon, 2003-05-26 14:33

I have no idea how i did not try that. thanks!

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Wed, 2003-05-28 09:47

just wanted to say thanks, i used your top X and last updated blocks in my website (fryfrog.com). i realized that most of my albums were not showing or tracking visits, so i have enabled them very recently... but can you tell me if the top 5 albums also polls sub-albums? :)

 
Cuxy

Joined: 2003-06-03
Posts: 7
Posted: Wed, 2003-06-04 17:02

Got a question when i uploaded this script
and thanks by the way
it listed all the top and latest but not linked correctly to albums ?

view it here http://gallery.cuxy.com/

all mine are linked via the view_albums.php
not the dir that these scripts point to

any help is appriciated

thank you :roll:

 
obamausa8

Joined: 2009-07-02
Posts: 1
Posted: Thu, 2009-07-02 02:52

I am not so knowledgeable about this matter. So i have to learn it. Thanks for the post.

pret auto