Advanced search  

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

Pages: [1]   Go Down

Author Topic: SSI/Random Image Size  (Read 2814 times)

0 Members and 1 Guest are viewing this topic.

vexd

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
SSI/Random Image Size
« 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.
« Last Edit: November 07, 2004, 04:03:34 am by vexd »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: SSI/Random Image Size
« Reply #1 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.

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.