Show only album thumbs from category Show only album thumbs from category
 

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

Main Menu

Show only album thumbs from category

Started by vrba, September 02, 2008, 01:12:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vrba

I ckecked the forum - but I dont find answer:
How to show (with cpmfetch) only (random) albums thumbs on first page of portal from specific category?

Please, help me.

p.s.: I have some albums in category nr. 7 and the latest coppermine gallery

thanks advance... :-*

vrba

For random media for specific category I found solution for my portal (see bellow) but I dont find answer for abowe question.. :'(

<?php
require_once "./gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_setfilter($filter = ".jpg");
$options = array('windowtarget' => '_top',"imagewidth"=>"130","subtitle" => "<center></center>","tablestyle" => "cpmfetch");
$objCpm->cpm_viewRandomMediaFrom ("cat=2", 1, 6, $options);
$objCpm->cpm_close();
?>

Joachim Müller

http://forum.coppermine-gallery.net/index.php/topic,35221.msg197845.html#msg197845
From that posting:
Quote from: vuud on February 28, 2007, 07:19:12 PM
Things to include in a cry for help:

    * The Exact error message.  "I get an error about something..." - Copy and paste
    * What version of coppermine you are using
    * What version of CoppermineFetch you are using
    * A link to your website and gallery
    * A link to an example of the problem (if possible)
    * How computer savvy you are (newbie, intermediate, damn good)
    * What kind of web server you are running on (if known)
    * Include the code you are using.

vrba

@Joachim: I thing you dont uderstand me!
There is no error message, i am using the latest coppermine gallery as I wrote in my first message. And latest cpmfetch (2.0.0.).
I only want that someone write some code which I need because I am lost. Thats all.
Anyway thanks for your help...

fangweile

After I read your message, I still can't understand what you are trying to do. Can you have a further explanation on what you are trying to achieve. ::)
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

vrba

#5
I have a portal at: http://www.sloscena.net/portal/
Nove I have some random images form gallery (in red square)

http://www.sloscena.net/temp/screen_portal.jpg [Edit GauGau] Replaced hotlinked images with attachment screen_portal.jpg [/Edit]

I also have a gallery.
I have some albums in specific category (now I have only two for testing).

See at: http://www.sloscena.net/portal/galerija/index.php?cat=4

There is two thumb for each album:
http://www.sloscena.net/temp/screen_galerija.jpg [Edit GauGau] Replaced hotlinked images with attachment screen_galerija.jpg [/Edit]

I want to have in portal only random thumbs of albums from this category everytime you come to the portal.

For example:
http://www.sloscena.net/temp/screen_portal_case1.jpg [Edit GauGau] Replaced hotlinked images with attachment screen_portal_case1.jpg [/Edit]

And next time:
http://www.sloscena.net/temp/screen_portal_case2.jpg [Edit GauGau] Replaced hotlinked images with attachment screen_portal_case2.jpg [/Edit]


And so on...
Sorry, my english is very poor i hope you understand me...
Thanks for your time! :D





Joachim Müller

Don't hotlink images in the future, but attach them. I edited your posting accordingly.

vrba

Quote from: Joachim Müller on September 03, 2008, 09:27:24 AM
Don't hotlink images in the future, but attach them. I edited your posting accordingly.

ok, thanks,..

fangweile

If you want to display the albums thumbnail in this category -->http://www.sloscena.net/portal/galerija/index.php?cat=4

the code must be similar to this


<?php
require_once "./gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_setfilter($filter ".jpg");
$options = array('windowtarget' => '_top',"imagewidth"=>"130","subtitle" => "<center></center>","tablestyle" => "cpmfetch");
$objCpm->cpm_viewRandomMediaFrom ("cat=4"16$options);
$objCpm->cpm_close();
?>



If you want to display pictures in an album, use this code


<?php
require_once "./gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_setfilter($filter ".jpg");
$options = array('windowtarget' => '_top',"imagewidth"=>"130","subtitle" => "<center></center>","tablestyle" => "cpmfetch");
$objCpm->cpm_viewRandomMediaFrom ("album=4"16$options);
$objCpm->cpm_close();
?>



Here are some useful links for your additional needs.
http://forum.coppermine-gallery.net/index.php/topic,35450.0.html
http://cpmfetch.fistfullofcode.com/docs/stable_basic/index.html
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희