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: Newbie Question.  (Read 6193 times)

0 Members and 1 Guest are viewing this topic.

peterbarbosa

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Newbie Question.
« on: January 02, 2007, 12:44:35 am »

I just installed cpmfetch.. as much as it looks easy, im still a tad confused.

What code do I have to put to display the most recent 25 images from album 1, or even all albums?
Logged

peterbarbosa

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Newbie Question.
« Reply #1 on: January 02, 2007, 12:50:51 am »

Please ignore the above..

Quick question, how would I make it so it inserts a <br> tag after 7 pictures?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Newbie Question.
« Reply #2 on: January 02, 2007, 02:30:24 am »

Please ignore the above..

Quick question, how would I make it so it inserts a <br> tag after 7 pictures?

Why would you want to?  it generates a table.

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

peterbarbosa

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Newbie Question.
« Reply #3 on: January 02, 2007, 03:42:10 am »

the problem is that it stretches. i want it to go like 7 pictures per row, then skip to the next line.
Logged

peterbarbosa

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Newbie Question.
« Reply #4 on: January 02, 2007, 04:42:49 am »

here is the example... www.laurindas.com/pictures.php
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Newbie Question.
« Reply #5 on: January 02, 2007, 05:41:14 am »

here is the example... www.laurindas.com/pictures.php

Your serious???

I suggest you read the documentation. 






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

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Newbie Question.
« Reply #6 on: January 02, 2007, 01:11:07 pm »

Vuud has gone to great lengths to document his code and it spells out clearly what each function does and the variables it can use. Please read the comments throughout the cpmfetch.php file and you'll find your answer. Here is the code for displaying the last images from any album and you'll find the others for specific albums and categories after this function in the cpmfetch.php file.
Code: [Select]
/**
* Displays images of last added media
*
* This will generate a table and populate it with the last added media and style
* it based on entries in the style hash. The number of photos returned matches the number
* of rows multiplied by the number of columns.    Supports the setReturnType option.
*
* @param int $rows The number of rows desired in the output
* @param int $columns The number of columns desired in the output
* @param array $options Optional, Configuration options
* @return string XHTML code
* @since Version 0.5
* @todo allow for media to be specified / filtered - jpg, mp3, etc
*/
function cpm_viewLastAddedMedia($rows, $columns, $options="") {
$this->loadOptions($options);
//$resultset = $this->cpm->getLastAddedMedia($rows*$columns);
$resultset = $this->cpm->getLastAddedMediaFrom("",$rows*$columns);
$retval = "";
switch ($this->returntype) {
case ('resultset'):
$retval = $resultset;
break;
case ('html'):
$retval = $this->createTable($resultset,$rows,$columns);
break;
case ('print'):
default:
print $this->createTable($resultset,$rows,$columns);
}

$this->clearOptions();
return ($retval);
}

Also, next time use a better descriptive title to make reviewing and searching questions a bit more clear.
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.