forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: Shade 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 ( ??? ::))
-
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...
-
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!?)
-
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 :-[
-
<?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
-
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
-
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
-
Ah Thank you very much, it works! :D