SSI/Random Image Size SSI/Random Image Size
 

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]

Main Menu

SSI/Random Image Size

Started by vexd, November 07, 2004, 03:58:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vexd

I just tweaked SSI a bit so I could specify a size/height of the image. Unless there was already a feature to do so, sorry I didnt RTFM thorougly. Well here it is, param 6,7 are width/height. e.g. print cpg_thumb($cpg_include_link,$cpg_link_singlepic,$cpg_how_many,$cgp_limit_album,$cpg_random,"",40,40);
would produce a 40x40 image.

after the GLOBAL declaration add:
$imgsize,$imgsize_w

then after if ($numargs > 5) {$cpg_link_target=$arg_list[5];} on the top add:

if ($numargs > 6) {$imgsize=$arg_list[6];}
if ($numargs > 7) {$imgsize_w=$arg_list[7];}


replace the first instance of: $return_value.= "<img src=\"". etc. with:

$return_value.= "<img src=\"".$url_of_cpg_dir.$cpg_album_path.$row['filepath'].$cpg_thumb_pfx.$row['filename']."\" width=\"".$imgsize."\" height=\"".$imgsize_w."\" alt=\"\" title=\"";


and your set.

Joachim Müller

Your posting went into the wrong board. You should have replied to the thread where the mod is being discussed.

Joachim