Newbie Question. Newbie Question.
 

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

Newbie Question.

Started by peterbarbosa, January 02, 2007, 12:44:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

peterbarbosa

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?

peterbarbosa

Please ignore the above..

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

vuud

Quote from: peterbarbosa 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?

Why would you want to?  it generates a table.

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

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

peterbarbosa


vuud

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

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.

/**
* 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.
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