Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: newest + best voted + most viewed pictures  (Read 7382 times)

0 Members and 1 Guest are viewing this topic.

Shade

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
newest + best voted + most viewed pictures
« on: April 27, 2007, 07:08:15 pm »

Hello,

First i want to say, that my english is not so good. ;-)

My Question: How i can put 1 row with 4 newest Pics + 1 row with 4 best voted Pics + 1 row with 4 most viewed Pics + 1 row with 4 random Pics in one page?
Like this:
new new new new
view view view view
vote vote vote vote
random random random random

I look forward to hear from you ( ??? ::))
« Last Edit: April 28, 2007, 02:05:06 pm by GauGau »
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: newest + best voted + most viewed pictures
« Reply #1 on: April 27, 2007, 08:01:33 pm »

Hello,

First i want to say, that my english is not so good. ;-)

My Question: How i can put 1 row with 4 newest Pics + 1 row with 4 best voted Pics + 1 row with 4 most viewed Pics + 1 row with 4 random Pics in one page?
Like this:
new new new new
view view view view
vote vote vote vote
random random random random

I look forward to hear from you ( ??? ::))


Just do 4 calls...   one to each of them...



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

Shade

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: newest + best voted + most viewed pictures
« Reply #2 on: April 27, 2007, 08:23:25 pm »

Why?
Is that so heavy? I have seen functions for this (best voted, most viewed)....but i only dont know how to make the code.

(Or maybe i dont understand you!?)
Logged

Shade

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: newest + best voted + most viewed pictures
« Reply #3 on: April 27, 2007, 08:26:19 pm »

Sry for Doublepost  :(


I have this code:
<?php
  include "././gallery/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("././gallery/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>

But thats only for the last added pictures.
How i can edit the code that the most viewed pictures and the best voted (and radnom pictures) are showed there too?

Shade  :-[
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: newest + best voted + most viewed pictures
« Reply #4 on: April 27, 2007, 09:56:54 pm »

Code: [Select]
<?php
include "././gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("././gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_view...(1,4);
$objCpm->cpm_view...(1,4);
$objCpm->cpm_view....(1,4);
$objCpm->cpm_close();
?>



Replace the ... with the functions you want.

It will be light... there is only one database connection being made.

Vuud
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

Shade

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: newest + best voted + most viewed pictures
« Reply #5 on: April 27, 2007, 10:35:08 pm »

Hi,

That:
<?php
include "././gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("././gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_viewTopRatedMediaFrom(1,4);
$objCpm->cpm_viewRandomMostViewedMediaFrom(1,4);
$objCpm->cpm_viewRandomMediaFrom(1,4);
$objCpm->cpm_close();
?>

....doesnt work!  ??? What have i maked wrong?
And what is cpm_viewRandomMostViewedMediaFrom? Why RandomMostViewed... ? What does it mean? I want only the 4 most viewed picture.
(Im missing a help or example for that.)

Shade
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: newest + best voted + most viewed pictures
« Reply #6 on: April 28, 2007, 01:48:36 am »

Hi,

That:
<?php
include "././gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("././gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_viewTopRatedMediaFrom(1,4);
$objCpm->cpm_viewRandomMostViewedMediaFrom(1,4);
$objCpm->cpm_viewRandomMediaFrom(1,4);
$objCpm->cpm_close();
?>

....doesnt work!  ??? What have i maked wrong?
And what is cpm_viewRandomMostViewedMediaFrom? Why RandomMostViewed... ? What does it mean? I want only the 4 most viewed picture.
(Im missing a help or example for that.)

Shade



$objCpm->cpm_viewTopRatedMediaFrom("",1,4);
$objCpm->cpm_viewRandomMostViewedMediaFrom("",1,4);
$objCpm->cpm_viewRandomMediaFrom("",1,4);

cpm_viewRandomMostViewedMediaFrom is because my thought is that you can have a lot that are viewed the same amount.  Since I was lucky enough to write it, it reflects my thought process.  :D



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

Shade

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: newest + best voted + most viewed pictures
« Reply #7 on: April 28, 2007, 08:38:31 am »

Ah Thank you very much, it works!  :D
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.