Cmsware使用
2.6自定义函数部分
//自定义增加的调用函数请加到此行以下
function
addautoimg($str){
$clear_pattern =
array(
'1' =>
array(
'pattern'=>"/]+src=\"([^\"]+)\"[^>]*>/isU" ,replace=>"src=\"$1\" border=\"0\" onload=\"if(this.width>1024*0.5)
{this.resized=true;this.width=1024*0.5; this.alt='Click here to open new window
CTRL+Mouse wheel to zoom in/out/点击这里打开一个新的窗口观看,可以使用CTRL+鼠标滚动来放大或缩小';}\"
onmouseover=\"if(this.width>1024*0.5) {this.resized=true;
this.width=1024*0.5; this.style.cursor='hand'; this.alt='Click here to open new
window CTRL+Mouse wheel to zoom in/out/点击这里打开一个新的窗口观看,可以使用CTRL+鼠标滚动来放大或缩小';}\"
onclick=\"if(!this.resized) {return true;} else {window.open('$1');}\"
onmousewheel=\"return
imgzoom(this);\">"
),
);
foreach($clear_pattern as $key=>$var)
{
$str = preg_replace($var['pattern'],$var['replace'],
$str);
}
return $str;
}
//自定义增加调用函数结束
?>
评论