Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Image Scroller  (Read 2598 times)

0 Members and 1 Guest are viewing this topic.

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Image Scroller
« on: December 15, 2007, 10:33:30 pm »

Hi guys

Folou as recently customized me an image scroller for my latest images to my gallery but it doesn't show & ' ,

I believe something in this code needs changing

Code: [Select]
<?php 
// image scoroller function
function makeScroller($catID$title='') {
global $CONFIG;
$id rand(1000,9999);    
$date date("Ymd");



/*

sts_bs("jwscroller$id",[$date,"","","images/blank.gif",0,1,0,5,"100%","left",1,3,100,120,1],["none",1,"#454545","#FFFFFF","","repeat"]);
sts_til([0,"$title","left"],["bold 9pt Verdana,Arial","#000000","none","transparent","images/bgtitle.gif","repeat"]);
sts_pag(["transparent","7pt Verdana,Arial","#000000","none","transparent","7pt Verdana,Arial","#000000","none","#336600","7pt Verdana,Arial","#FFFFFF","none","#336600","7pt Verdana,Arial","#FFFFFF","none"]);
sts_sca(["center","middle","center","middle"],["images/arrowl_out.gif","images/arrowl_over.gif","images/arrowl_gray.gif",13,13,"images/arrowr_out.gif","images/arrowr_over.gif","images/arrowr_gray.gif",13,13]);
sts_sbd([1],["solid",1,"#454545",5,"images/round_tl.gif","images/round_tr.gif","images/round_br.gif","images/round_bl.gif","transparent","images/round_t.gif","repeat","transparent","images/round_r.gif","repeat","images/transparent","images/round_b.gif","repeat","transparent","images/round_l.gif","repeat"]);
sts_tbd([1],["solid",1,"#454545",5,"images/round_tl.gif","images/round_tr.gif","images/round_br.gif","images/round_bl.gif","transparent","images/round_t.gif","repeat","transparent","images/round_r.gif","repeat","images/transparent","images/round_b.gif","repeat","transparent","images/round_l.gif","repeat"]);


*/




    
$SLIDE = <<<EOT
<script type="text/javascript">

sts_bs("jwscroller
$id",[$date,"","","images/blank.gif",6,1,0,5,"100%","left",3,3,150,150,1],["none",1,"#006699","#FFFFFF","","repeat"]);
sts_til([0,"
$title","left"],["bold 12pt Verdana","#000000","none","#EFF5F9","images/title.gif","repeat"]);
sts_pag(["transparent","9pt Verdana","#894417","none","transparent","9pt Verdana","#894417","none","#FF6600","bold 9pt Verdana","#FFFFFF","none","#FF6600","bold 9pt Verdana","#FFFFFF","none"]);
sts_sca(["center","middle","center","middle"],["images/arrow_01.gif","images/arrow_01.gif","images/arrow_01.gif",25,50,"images/arrow_02.gif","images/arrow_02.gif","images/arrow_02.gif",25,50]);
sts_sbd([1],["solid",0,"#0099CC #FFFFFF",10,"images/border01_tl.gif","images/border01_tr.gif","images/border01_br.gif","images/border01_bl.gif","transparent","images/border01_t.gif","repeat","transparent","images/border01_r.gif","repeat","transparent","images/border01_b.gif","repeat","transparent","images/border01_l.gif","repeat"]);
sts_tbd([0],["solid",2,"#AFAF83"]);


EOT;
$result cpg_db_query("SELECT *, p.title as title FROM `{$CONFIG['TABLE_PICTURES']}` as p, `{$CONFIG['TABLE_ALBUMS']}` as a WHERE p.aid = a.aid AND a.category IN $catID AND approved = 'YES' ORDER by p.pid DESC LIMIT 20;");
$rowset cpg_db_fetch_rowset($result);
$i 0;
foreach ($rowset as $row) {
$thumb get_pic_url($row'thumb');
$imgSize getimagesize(str_repeat(' ','%20',$thumb));
if (!is_image($row['filename'])) {
        
$image_info getimagesize(urldecode($thumb));
            
$row['pwidth'] = $image_info[0];
            
$row['pheight'] = $image_info[1];
}
        if(
$row['system_icon']=='true'){
        
$image_size compute_img_size($row['pwidth'], $row['pheight'], $CONFIG['thumb_width'], true);
} else {
        
$image_size compute_img_size($row['pwidth'], $row['pheight'], $CONFIG['thumb_width']);
}                
        
$row['title'] = $row['title'] ? $row['title'] : $row['filename'];                 
$SLIDE .= "sts_ai(\"i{$i}\",[0,\"{$row['title']}\",\"displayimage.php?pos=-{$row['pid']}\",\"_self\",\"".$thumb."\",{$image_size['width']},{$image_size['height']},\"center\"],[\"transparent\",\"9pt Verdana,Arial\",\"#000000\",\"none\",\"9pt Verdana,Arial\",\"#000000\",\"none\"]);";
$i++;
}
 $SLIDE .= <<<EOT
sts_es();
</script>

EOT;
return $SLIDE;
}
?>

Can anyone help me so that it shows & ' ,
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 19 queries.