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?
Please ignore the above..
Quick question, how would I make it so it inserts a <br> tag after 7 pictures?
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.
the problem is that it stretches. i want it to go like 7 pictures per row, then skip to the next line.
here is the example... www.laurindas.com/pictures.php
Quote from: peterbarbosa on January 02, 2007, 04:42:49 AM
here is the example... www.laurindas.com/pictures.php
Your serious???
I suggest you read the documentation.
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.