PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro How Do I...? (http://www.photopost.com/forum/photopost-pro-how-do-i/)
-   -   Top Posters and Highest rated (http://www.photopost.com/forum/photopost-pro-how-do-i/123379-top-posters-highest-rated.html)

stmpspaz February 27th, 2006 11:44 AM

Top Posters and Highest rated
 
I would like to change the Top Posters listing on my site to display only the results from the past month or current month - rather than over all time.

Also - I would like for the Highest Rated to be changed - to show the most viewed for the month.

Are either of these possible?

Patti

Chuck S February 27th, 2006 01:56 PM

Hello look at the queries and you would need to add something like this to the highest rated and top posters queries

Code:

Content visible to verified customers only.

SaN-DeeP March 5th, 2006 10:23 PM

Hey Chuck,
Can you give the correct/complete statement to be searched and replaced with in the required filename as well ?

thanks this should be quite handy

SaN-DeeP March 7th, 2006 10:10 PM

bumping back, chuck sorry to bother ya, but can you look forward for a possible solution here ? :)

thanks.

Chuck S March 8th, 2006 09:31 AM

Sandeep what are you looking for I posted what needs to be added to a query above.

Simple add the AND clause anywhere right after the WHERE clause in any specific query you are trying to do. For specific ways to see how it would look simply look at other queries within our files. Many examples of the use of an AND clause in queries. The queries you want to modify are in index.php

SaN-DeeP March 8th, 2006 08:00 PM

I tried to change
Quote:

// Lets get the Top Posters
$queryz = ppmysql_query("SELECT user,userid,COUNT(*) AS pcount FROM {$Globals['pp_db_prefix']}photos GROUP BY user ORDER BY pcount DESC LIMIT
to

Quote:

// Lets get the Top Posters
$queryz = ppmysql_query("SELECT user,userid,COUNT(*) AS pcount FROM {$Globals['pp_db_prefix']}photos GROUP BY user ORDER BY pcount AND date > UNIX_TIMESTAMP( DATE_SUB(NOW(), INTERVAL 1 MONTH) ) DESC LIMIT
but this wont work.

cannot find toprated query..

Chuck S March 8th, 2006 08:13 PM

Thats because there is no WHERE CLAUSE and you have it in the wrong spot

Code:

Content visible to verified customers only.

SaN-DeeP March 8th, 2006 08:45 PM

this works fine now for both top posters and highest rated images pal.
thanks chuck.

stmpspaz March 29th, 2006 10:35 PM

File name?
 
I apologize if this seems obvious, but I am unable to find the location of the queries to change to make this work. Can you tell me if they are in a specific directory or the main directory - and what the file name would be.

Thank you
Patti

Chuck S March 29th, 2006 10:49 PM

index.php is the file being discussed

stmpspaz March 30th, 2006 10:42 AM

What file would I go to, to change the "title" of each category - for instance to Top Posters for Month instead of just Top Posters.

Also - is there a simple way to change the Top Rated - to most viewed? I tried a couple of changes - but not knowing PHP very well - it didn't work!

Chuck S March 30th, 2006 11:22 AM

You post is not making sense to me here

category titles and a top posters pal box have no correlation so your loosing me here. The top rated pal already pulls photos highest rated secondary sorted by most views

stmpspaz March 30th, 2006 11:55 AM

Each "pal" box has a title on it. One says "Top Posters" at the top, and under it the results of the query. I want to change that "title".

Chuck S March 30th, 2006 12:09 PM

Okay yeah saying edit the category titles threw me off. Just edit your language file english.php and change the language string.

stmpspaz October 17th, 2006 09:49 AM

I have had thumbincluder running fine for quite some time. I recently moved to a new server and my hosting company transferred everything over for me. My gallery is working fine - no problems.

But - my thumbincluder wont show the most recent images. It will show only the last 5 images that were uploaded before the server move.

Any ideas??

Chuck S October 17th, 2006 10:44 AM

I would suggest you look at your thumbnailer to see your looking for the proper database and other info ;)

stmpspaz October 24th, 2006 10:30 PM

top posters and highest rated
 
I made the modifications in this thread and all was working great until I upgraded to the newest version (5.5). Now the index.php refers to a "topposterspal" and doesn't have anywhere to make the changes to make this work again.

Any ideas on how I can go back to showing the top posters for the month and higest rated for the month?

Patti

Chuck S October 25th, 2006 07:32 AM

the query is now within a function in pp-inc.php

stmpspaz January 19th, 2008 05:35 PM

Top Poster
 
I have the following information in my pp-inc.php file. However, the numbers *never* change. The same people are always listed, and it just seems to stay static.

Quote:

// Lets get the Top Posters
$queryz = ppmysql_query("SELECT user,userid,COUNT(*) AS pcount FROM {$Globals['pp_db_prefix']}photos WHERE date < UNIX_TIMESTAMP( DATE_SUB(NOW(), INTERVAL 1 MONTH) ) GROUP BY user ORDER BY pcount DESC LIMIT {$Globals['numtoppal']}", $link);

$numfound = 1;

while ( list($cache['top']['topposters'][$numfound], $uid, $cache['top']['topposts'][$numfound]) = mysql_fetch_row($queryz))
{
if ( $Globals['spider'] == "yes" )
{
$cache['top']['toplink'][$numfound] = "{$Globals['maindir']}/showgallery.php/ppuser/$uid/cat/500";
}
else
{
$cache['top']['toplink'][$numfound] = "{$Globals['maindir']}/showgallery.php?ppuser=$uid&amp;cat=500";
}
$numfound++;
}

return;
}

Chuck S January 19th, 2008 07:29 PM

But I would ask are the results accurate though because based on the query they would be. You can try turning off the category cache in admin global options and see if they change.


All times are GMT -5. The time now is 10:48 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97