Ive made mine work with the mini thumbs
Open the file cpmfetch.php
find
function getPrefixToUse() {
//$fileprefix=$this->defaultimagesize;
$fileprefix = "";
if (array_key_exists('imagesize',$this->optionHash)) {
if ($this->optionHash['imagesize'] == 'thumb') {
$fileprefix = $this->cfg['thumb_pfx'];
} elseif ($this->optionHash['imagesize'] =='int') {
$fileprefix = $this->cfg['normal_pfx'];
} elseif ($this->optionHash['imagesize'] == 'large') {
$fileprefix="";
}
}
elseif ($this->cfg['cfDefaultImageSize'] == "thumb") {
$fileprefix = $this->cfg['thumb_pfx'];
}
elseif ($this->cfg['cfDefaultImageSize'] == "normal") {
$fileprefix = $this->cfg['normal_pfx'];
}
elseif ($this->cfg['cfDefaultImageSize'] == "large") {
$fileprefix="";
}
return $fileprefix;
}
Replace with
function getPrefixToUse() {
//$fileprefix=$this->defaultimagesize;
$fileprefix = "";
if (array_key_exists('imagesize',$this->optionHash)) {
if ($this->optionHash['imagesize'] == 'mini') {
$fileprefix = $this->cfg['mini_pfx'];
} elseif ($this->optionHash['imagesize'] == 'thumb') {
$fileprefix = $this->cfg['thumb_pfx'];
} elseif ($this->optionHash['imagesize'] =='int') {
$fileprefix = $this->cfg['normal_pfx'];
} elseif ($this->optionHash['imagesize'] == 'large') {
$fileprefix="";
}
}
elseif ($this->cfg['cfDefaultImageSize'] == "mini") {
$fileprefix = $this->cfg['mini_pfx'];
}
elseif ($this->cfg['cfDefaultImageSize'] == "thumb") {
$fileprefix = $this->cfg['thumb_pfx'];
}
elseif ($this->cfg['cfDefaultImageSize'] == "normal") {
$fileprefix = $this->cfg['normal_pfx'];
}
elseif ($this->cfg['cfDefaultImageSize'] == "large") {
$fileprefix="";
}
return $fileprefix;
}
Open the file cpmfetch_dao.php
find
function cpm_setMediaPrefixes( $_thumb, $_intermediate, $_large = "") {
$this->cfg['thumb_pfx'] = $_thumb;
$this->cfg['normal_pfx'] = $_intermediate;
}
replace with
function cpm_setMediaPrefixes( $_mini, $_thumb, $_intermediate, $_large = "") {
$this->cfg['mini_pfx'] = $_mini;
$this->cfg['thumb_pfx'] = $_thumb;
$this->cfg['normal_pfx'] = $_intermediate;
}
upload the changed files
Here is my include code
<?php
include "./gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(2,4,array( "imagesize" => "mini" , "imagestyle" => "gallery_home"));
$objCpm->cpm_close();
?>