forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: vexd on November 07, 2004, 03:58:00 am

Title: SSI/Random Image Size
Post by: vexd on November 07, 2004, 03:58:00 am
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.
Code: [Select]
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:
Code: [Select]
$imgsize,$imgsize_w
then after
Code: [Select]
if ($numargs > 5) {$cpg_link_target=$arg_list[5];} on the top add:

Code: [Select]
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:

Code: [Select]
$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.
Title: Re: SSI/Random Image Size
Post by: Joachim Müller on November 07, 2004, 11:54:19 am
Your posting went into the wrong board. You should have replied to the thread where the mod is being discussed (http://forum.coppermine-gallery.net/index.php?topic=5921.0).

Joachim