PDA

View Full Version : Total Counts


richardyoung
9th of November 2002 (Sat), 00:09
It would be nice.. and maybe not that hard to have a total image count.. it is kinda are for me to keep count of the total amount of images on my gallery.. because I have 4 different verison ( i normally just take the total number of files and div / 4) and that will give me a ball park number.. however if I could get a web page that displays.. the TOTAL number of images for ALL gallery that would be great..

I love the utilize graph.. very nice..

maybe change the header part of the admin side ( were you add gallery to some more like this)

setup
(all your first time setup things)

Create
all the stuff you will need to create gallerys

Manage
news.. system admin stuff.. utilize.. backup

Pekka
9th of November 2002 (Sat), 04:39
richardyoung wrote:
It would be nice.. and maybe not that hard to have a total image count.. it is kinda are for me to keep count of the total amount of images on my gallery.. because I have 4 different verison ( i normally just take the total number of files and div / 4) and that will give me a ball park number.. however if I could get a web page that displays.. the TOTAL number of images for ALL gallery that would be great..

Add this function into building_blocks.php
----------------------------------------------------------

function howmanyphotosinall() {

global $pass;

$howmanyphotosinall = mysql_query(
"
SELECT
COUNT(ee_photo.ee_photo_id)
FROM
ee_photo,
ee_exhibition,
ee_photo_to_exhibition
WHERE
ee_photo_to_exhibition.ee_photo_id = ee_photo.ee_photo_id
AND ee_exhibition.ee_exhibition_pass = '$pass'
AND ee_exhibition.ee_exhibition_id = ee_photo_to_exhibition.ee_exhibition_id
");
if (!$howmanyphotosinall) {
print mysql_error();
exit();
}

print "(" . mysql_result($howmanyphotosinall,0) . " photos on display)";

return;
}

----------------------------------------------------------

and now you may place a PHP line

howmanyphotosinall();

in indextemplates, that will display the total number of photos. I would place it under total view count, like

----------------
1893112 PHOTO PAGES HAVE BEEN VIEWED TO DATE ON THIS SITE.
(318 photos on display)
----------------


maybe change the header part of the admin side ( were you add gallery to some more like this)

setup
(all your first time setup things)

Create
all the stuff you will need to create gallerys

Manage
news.. system admin stuff.. utilize.. backup



Yes I know the menu needs reorganizing - but there are some other things to do first before that. I try to get that done in 1.3 release.

seanspeng
12th of November 2002 (Tue), 11:43
I have another question regarding Counter. This might be a trouble.

When I first set up my galleries, I put all of the photos into one folder "D30_photos". Now I really want to seperate all the photo files into different folders in order to make the loading a little bit faster and easier to edit in backstage.

I am guessing that I just need to create new photo folders under the right directory, and move all the existing photos from "D30_photos" to newly created folders. Then re-link the path to the corresponding galleries. If I do that, I will lose all the counter information, right? What is the best appoach?

Currently, I can only see "Reset" option for counters, will I be able to manipulate counter numbers?

Thank you,

Pekka
12th of November 2002 (Tue), 12:07
seanspeng wrote:
I have another question regarding Counter. This might be a trouble.

When I first set up my galleries, I put all of the photos into one folder "D30_photos". Now I really want to seperate all the photo files into different folders in order to make the loading a little bit faster and easier to edit in backstage.

I am guessing that I just need to create new photo folders under the right directory, and move all the existing photos from "D30_photos" to newly created folders. Then re-link the path to the corresponding galleries. If I do that, I will lose all the counter information, right? What is the best appoach?

Currently, I can only see "Reset" option for counters, will I be able to manipulate counter numbers?

Thank you,



If you don't delete a photo it will keep its counter regardless of whatever changes you make for it.
In other words as long a photo exists it has a counter linked to it. Photo's relation to its paths is a totally separate thing.

There's no need to delete and recreate photos in order to move the big photo files or thumbnails to another location.

Here's a couple of how-to's:

A. You want to e.g. divide size path usage so that instead of all being in "folder" you have some big photos in "folder1/" and some "folder2/" and some on other http server "http://www.server2.com/folder3/":

1. Just move the big photos with ftp to corresponding folders.
2. Enter the new size paths in path editor.
3. Go to "EE Editor/utilities/Find and save size paths" and select all photos which were changed (i.e. whole exhibition at a time) and press "Find unexcluded size paths for selected photos". This command will find and save the new photo locations. Usually (when you're hypersafe as I tend to be) it's adviceable to back up the database before this command, because it will _replace_ size path info for each photo. If there is no response from any path the photo will have no size paths and therefore cannot be displayed. So run this only after all photos are uploaded.

You can use the aforementioned utility to "swap" photos between servers by keeping identical sets of photos in two servers and excluding the other server's paths from size path search.

B. You want to change location of thumbs and microthumbs:
1. move the thumbs.
2. edit the old thumb path in path editor to match the new location.

seanspeng
17th of November 2002 (Sun), 15:11
Thanks, Pekka! With extreme care, I successfully finished the transfers. Thanks for your instruction.

richardyoung
5th of March 2003 (Wed), 19:17
is there a script (or page) or some way I can rank the most popular gallery based on

"Combined pageviews in this exhibition is 890."

so.. lets say.. I have 40 galleries..

I would like to know which gallerys people are looking at.. and which one people don't care about..

I know that if I am inside a gallery.. I can display the number of views based on click.. but that is only based "per gallery" and it is hard to do site wide..