album included into a page album included into a page
 

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]

Main Menu

album included into a page

Started by londonhogfan, March 30, 2007, 06:45:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

londonhogfan

I would like to add all the photos (clickable thumbnails) into a page.  I am pretty sure I have seen it done before.

I am using this code to get 3 random pics from my gallery...

include("http://www.the-rota.com/gallery/get_photo.php?&nb=3");


How could I pick a specific album and include all the pics from it.

Thanks, Jacob
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.razorbacklegacy.com%2Fhog_archive%2Fpic.jpg&hash=3d1b2bbde092be74414169a519ae11559f8adf22)

vuud

Quote from: londonhogfan on March 30, 2007, 06:45:52 PM
I would like to add all the photos (clickable thumbnails) into a page.  I am pretty sure I have seen it done before.

I am using this code to get 3 random pics from my gallery...

include("http://www.the-rota.com/gallery/get_photo.php?&nb=3");


How could I pick a specific album and include all the pics from it.

Thanks, Jacob

Is get_photo. php CpmFetch code?

If you use CpmFetch, yes you can easily do what you are asking.  Its all in the documentation.

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

londonhogfan

I looked through the docs, but couldn't find anything about including an album.

COuld you point me to the right page?

Thanks,

btw:  getphoto.php was a code posted on tinyportal.net.  I thought it was cpmFetch.  Here is the code...

define('IN_COPPERMINE', true);
define('INDEX_PHP', true);
require('include/init.inc.php');

//How many items you want to show in your get_photo script
if(isset($_GET['nb'])) {
     $thumb_per_page=$_GET['nb'];
} else {
     $thumb_per_page = 1;
}
$thumb_count = 1;
$lower_limit = 0;

if(isset($_GET['album'])){
    $album = $_GET['album'];
}

//If it is a numeric album get the name and set variables
if ((is_numeric($album))){
     $album_name_keyword = get_album_name($album);
     $CURRENT_CAT_NAME = $album_name_keyword['title'];
     $ALBUM_SET = "AND aid IN (".(int)$_GET['album'].")".$ALBUM_SET;
     //Set the album to last uploaded
     $album = 'random';
}

//If the album is not set set it to lastup - this is the default
if(!isset($album)){
     $album = 'random';
}


//Changes these to point to your site if the following is not giving correct results.
$link_url = $CONFIG['ecards_more_pic_target']."displayimage.php?pos=-";
$image_url = $CONFIG['ecards_more_pic_target']."albums/";


$data = get_pic_data($album, $thumb_count, $album_name, $lower_limit, $thumb_per_page);


foreach($data AS $picture) {
    $thumb_url = "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
    $description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '"  alt="Photo alĂ©atoire"/></a><hr>';
    echo $description;

}
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.razorbacklegacy.com%2Fhog_archive%2Fpic.jpg&hash=3d1b2bbde092be74414169a519ae11559f8adf22)

vuud

Quote from: londonhogfan on March 30, 2007, 08:05:39 PM
I looked through the docs, but couldn't find anything about including an album.

COuld you point me to the right page?

Thanks,

btw:  getphoto.php was a code posted on tinyportal.net.  I thought it was cpmFetch.  Here is the code...

define('IN_COPPERMINE', true);
define('INDEX_PHP', true);
require('include/init.inc.php');
...




If you want to use that code, you should seek help on the board you found it.

CpmFetch has functions for this in the docs.  See the functions section.


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

londonhogfan

I have read the docs, but im not getting anywhere...

In the functions > Functions that return images or image data (which seems like it would be the best place to look - although I looked at the others also)

it has a bunch of show last uplaoded, most viewed, etc.

I just want to know how to return all the thumbnails from a specified album.  Is there not a way to just tell it what album number you want and it will return all the thumbnails?
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.razorbacklegacy.com%2Fhog_archive%2Fpic.jpg&hash=3d1b2bbde092be74414169a519ae11559f8adf22)

vuud

Quote from: londonhogfan on March 30, 2007, 11:31:09 PM
I have read the docs, but im not getting anywhere...

In the functions > Functions that return images or image data (which seems like it would be the best place to look - although I looked at the others also)

it has a bunch of show last uplaoded, most viewed, etc.

I just want to know how to return all the thumbnails from a specified album.  Is there not a way to just tell it what album number you want and it will return all the thumbnails?

Okay, it takes some reading to get it.  The docs are being re-written.

From this page:
http://cpmfetch.fistfullofcode.com/docs/manual_1.6/ch07s03.html

cpm_viewRandomMediaFrom ( $rows, $columns, $source, [array $options = ""])
    Shows random images from albums and categories specific in the $source string

The top of that page notes:

For information on the $source string see the section on Selecting specific albums or categories For information on the $options array, see the section detailing the options array.

So if we check this page:
http://cpmfetch.fistfullofcode.com/docs/manual_1.6/ch05s02.html

There is a whole slew of info on it.

So you can't really just skim the docs and get it all.  These doc's are being somewhat re-written, but I don't have much interest in writing them, and so far no one has volunteered to write any.   So I don't envision them getting better.    The rewritten ones are more to make it easier for me to keep them "technically" up to date.

Mind you, if you are using the dev release (you should at this point), the order of the parameters have changed and $source is now the first entry.








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