廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 5267 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為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.016648 second(s),query:15 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言