广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 5101 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
musclenet
数位造型
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x2 鲜花 x35
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[5.30][程式] 滚轮可放大缩小图片
【类型】插件
【版本】5.30

烟台俱乐部   http://www.ytj...m/bbs  
感谢wind_liu修改

修改template\wind\下的文件header.htm:

查找 <html xmlns="http://www.w3.org/199...uot;>

在下面添加:

复制程式
<script>
function bbimg(o)
{
var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%'  
return false;
}
</script>


修改require\下的文件bbscode.php:

找到代码:

复制程式
function cvpic($url,$type='',$picwidth='',$picheight=''){
    global $db_bbsurl,$picpath,$attachpath,$code_num,$code_htm;
    $code_num++;

    $lower_url=strtolower($url);
    if(substr($lower_url,0,4)!='http' && !$type)$url=$db_bbsurl.$url;
    if(strpos($lower_url,'login')!==false && (strpos($lower_url,'action=quit')!==false || strpos($lower_url,'action-quit')!==false)){
        $url=preg_replace('/login/i','log in',$url);
    }
    if($picwidth || $picheight){
        $onload = "onload=\"";
        $picwidth  && $onload .= "if(this.width>'$picwidth')this.width='$picwidth'";
        $picheight && $onload .= "if(this.height>'$picheight')this.height='$picheight'";
        $onload .= "\"";
        $code="<img src=\"$url\" border=\"0\" onclick=\"if(this.width>=$picwidth) window.open('$url');\" $onload>";
    } else{
        $code="<img src=\"$url\" border=\"0\" onclick=\"if(this.width>screen.width-461) window.open('$url');\">";
    }
    $code_htm[-1][$code_num]=$code;

    if($type){
        return $code;
    } else{
        return "<\twind_code_$code_num\t>";
    }
}


用以下代码替换:

复制程式
function cvpic($url,$type='',$picwidth='',$picheight=''){ 
global $db_bbsurl,$picpath,$attachpath,$code_num,$code_htm; {
$code_num++;
if(strtolower(substr($url,0,4)) != 'http' && !$type)$url=$db_bbsurl.$url;  
if($picwidth && $picheight){  
$code = "<img src='$url' border=0 onmousewheel=\"return bbimg(this)\" onclick=\"if(this.width>=$picwidth) window.open('$url');\" onload=\"if(this.width > $picwidth)this.width = $picwidth;if(this.height > $picheight) this.height = $picheight;\">";} else{  
$code = "<img src='$url' border=0 onmousewheel=\"return bbimg(this)\" onclick=\"if(this.width>screen.width-461) window.open('$url');\" onload=\"if(this.width>screen.width-460)this.width=screen.width-460;\">"; 
}
}  
$code_htm[-1][$code_num]=$code; 
if($type){
return $code; 
} else{  
return "<\twind_code_$code_num\t>"; 
}
}



http://musclenet.dyndns.tv/index.php
献花 x0 回到顶端 [楼 主] From:台湾中华HiNet | Posted:2007-05-05 16:07 |

首页  发表文章 发表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.026619 second(s),query:15 Gzip disabled
本站由 瀛睿律师事务所 担任常年法律顾问 | 免责声明 | 本网站已依台湾网站内容分级规定处理 | 连络我们 | 访客留言