广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 5296 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
香吉士 手机
个人文章 个人相簿 个人日记 个人地图
特殊贡献奖 创作大师奖 创作大师奖-2 创作大师奖-3
知名人士
级别: 知名人士 该用户目前不上站
推文 x234 鲜花 x555
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[5.5][分享] 附件下载档名追加版权 (完整针对FireFox修正)
【原作】:已忘记
【5.0】:翡璃月
【5.5】:翡璃月
【修正 by 风星】
【数据升级】:
【数据查询增加】:

附注:使用此插件 请将后台附件设置 修改 下载附件来路检查 打勾:

演示图




==================================================

attachment.php


复制程式
 
periodscheck('attachbanperiods'); 
$attachexists = $ispaid = FALSE; 
if(!empty($aid)) { 
  $query = $db->query("SELECT * FROM {$tablepre}attachments WHERE aid='$aid'"); 
  if($attach = $db->fetch_array($query)) { 
      $query = $db->query("SELECT tid, fid, price, special FROM {$tablepre}threads WHERE tid='$attach[tid]' AND displayorder>=Ɔ'"); 
      $thread = $db->fetch_array($query); 
      if($thread['fid']) { 
          $query = $db->query("SELECT COUNT(*) FROM {$tablepre}posts WHERE pid='$attach[pid]' AND invisible=Ɔ'"); 
          if($db->result($query, 0)) { 
            $attachexists = TRUE; 
          } 
      } 
  } 
}

改成


periodscheck('attachbanperiods');
$attachexists = $ispaid = FALSE;
if(!empty($aid)) {
  $query = $db->query("SELECT * FROM {$tablepre}attachments WHERE aid='$aid'");
  if($attach = $db->fetch_array($query)) {
      $query = $db->query("SELECT tid, fid, price, special FROM {$tablepre}threads WHERE tid='$attach[tid]' AND displayorder>=Ɔ'");
      $thread = $db->fetch_array($query);
      if($thread['fid']) {
          $query = $db->query("SELECT COUNT(*) FROM {$tablepre}posts WHERE pid='$attach[pid]' AND invisible=Ɔ'");
          $query = $db->query("SELECT author FROM {$tablepre}posts WHERE pid='$attach[pid]' AND invisible=Ɔ'");
          if($db->result($query, 0)) {
          if($db->num_rows($query)) {
            $attach['author'] = $db->result($query, 0);
            $attachexists = TRUE;
            }
          }
      }
  }
}




复制程式
 dheader('Content-Disposition: inline; filename='.$attach['filename'].'.thumb.jpg'); 

改成


dheader('Content-Disposition: inline; filename="['.$bbname.' by '.$attach['author'].'] '.$attach['filename'].'.thumb.jpg"');



复制程式
 
if($isimage && !empty($noupdate)) { 
dheader('Content-Disposition: inline; filename='.$attach['filename']); 
} else { 
dheader('Content-Disposition: attachment; filename='.$attach['filename']); 
} 


改成

if($isimage && !empty($noupdate)) {
  dheader('Content-Disposition: inline; filename="['.$bbname.' by '.$attach['author'].'] '.$attach['filename'].'"');
} else {
  dheader('Content-Disposition: attachment; filename="['.$bbname.' by '.$attach['author'].'] '.$attach['filename'].'"');
}



献花 x0 回到顶端 [楼 主] From:台湾新世纪资通股份有限公司 | Posted:2008-08-14 11:30 |

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