Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Most Viewed, but not random  (Read 5004 times)

0 Members and 1 Guest are viewing this topic.

die2nite

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Most Viewed, but not random
« on: July 09, 2007, 01:57:50 am »

Is there anyway to get the Most Viewed images, but not have them be randomly displayed and instead from highest viewed to lowest viewed?

Thanks,
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Most Viewed, but not random
« Reply #1 on: July 09, 2007, 04:29:21 am »

Is there anyway to get the Most Viewed images, but not have them be randomly displayed and instead from highest viewed to lowest viewed?

Thanks,

That may be in the next version... That is a tough one to work out.  Not programmatically but theory wise?

Lets say you have 100 pictures or varying views.  From which subset should the random be picked?  See the problem?
Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

die2nite

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Most Viewed, but not random
« Reply #2 on: July 09, 2007, 05:24:20 am »

Well let's say you have the following file set with the views following it.

File 1 - 7 Views
File 2 - 11 Views
File 3 - 7 Views
File 4 - 9 Views
File 5 - 2 Views

Then it should display like this:

File 2
File 4
File 1
File 3
File 5

But since Files 1 and 3 have the same views it could do one of the following to choose which one to show first: make it random for just those two, so positions three and four in the list would be random, or just put the first one the script encounters in the database in position three and the other one in position four.  Personally I would prefer the second way, just so users wouldn't be confused about why they keep interchanging. 

The reason I'm asking for this is begin I'm putting a section on my site for the "Most Popular Files" and I want them to be measured by the views and in descending order so users will immediately know what is the most popular file.

Thanks for the quick response vuud
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Most Viewed, but not random
« Reply #3 on: July 09, 2007, 10:57:51 pm »

Well let's say you have the following file set with the views following it.

File 1 - 7 Views
File 2 - 11 Views
File 3 - 7 Views
File 4 - 9 Views
File 5 - 2 Views

Then it should display like this:

File 2
File 4
File 1
File 3
File 5

But since Files 1 and 3 have the same views it could do one of the following to choose which one to show first: make it random for just those two, so positions three and four in the list would be random, or just put the first one the script encounters in the database in position three and the other one in position four.  Personally I would prefer the second way, just so users wouldn't be confused about why they keep interchanging. 

The reason I'm asking for this is begin I'm putting a section on my site for the "Most Popular Files" and I want them to be measured by the views and in descending order so users will immediately know what is the most popular file.

Thanks for the quick response vuud

Ah sorry, I read it quick and thought you wanted the random.

Yeah, I think that is actually in the works.  Thing is what to do if they are all 0 views?  I plan on letting the query run and have mysql do whatever it does in that instance :D

Check the next dev release when it comes out.

Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

die2nite

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Most Viewed, but not random
« Reply #4 on: July 09, 2007, 11:51:48 pm »

Awesome, thanks vuud!
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.