【原作】:已忘记
【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'].'"');
}