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: Creating Album List with CPMFetch possible?  (Read 5140 times)

0 Members and 1 Guest are viewing this topic.

bngMONSTER

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 4
Creating Album List with CPMFetch possible?
« on: December 16, 2006, 03:16:39 pm »

Hi!
is it possible to create a list of all albums in my gallery with CPMFetch
sortet A->Z
and the category behind the album in a table?

like this?

| Albumname1 (link to album)| category of Album 1 (link to category) |

| Albumname2 (link to album)| category of Album 1 (link to category) |

| Albumname2 (link to album)| category of Album 1 (link to category) |


other way to do that?
greetz MONSTER
PS Antwort in Deutsch geht auch :)
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Creating Album List with CPMFetch possible?
« Reply #1 on: December 16, 2006, 07:59:11 pm »

Hi!
is it possible to create a list of all albums in my gallery with CPMFetch
sortet A->Z
and the category behind the album in a table?

like this?

| Albumname1 (link to album)| category of Album 1 (link to category) |

| Albumname2 (link to album)| category of Album 1 (link to category) |

| Albumname2 (link to album)| category of Album 1 (link to category) |


other way to do that?
greetz MONSTER
PS Antwort in Deutsch geht auch :)

I have a client that has a requirement similar to that for a project I am working on.  Fortunately that functionality will then be passed back into the development release.

But for now, cpmFetch does not have anything like that...


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

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: Creating Album List with CPMFetch possible?
« Reply #2 on: December 19, 2006, 09:33:12 pm »

hi i did similer thing what you are asking hope can help you.

Code: [Select]
    <?
include "cpmfetch.php";
$objCpm = new cpm('/wallpapers');
$objCpm->cpm_setReturnType("resultset");
$data = $objCpm->cpm_viewLastAddedMediaFrom(1000, 1000, "cat=6,18");

$cnt = 0;
$arrayofalbums = array();

foreach ($data as $row) {
if (! in_array($row['aTitle'],$arrayofalbums))
{
?>
<a href="wallpapers/thumbnails.php?album=<? print $row['pAid']; ?>"> <?
print $row['aTitle'];
print '</a>';
print "";
print "\n";
array_push($arrayofalbums,$row['aTitle']);
$cnt++;
print "<br>";
if ($cnt == 6) break;
}
}
$objCpm->cpm_close();
?>

This displays the list of albums from seleted category but you can leave this blank to get if from all categories.

Thanks
Niks
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.