2020年11月

第一个文件:./source/function/function_attachment.php

$attachexists = TRUE;

在后面增加,其中获取到的$_G'setting'就是论坛名字。.'-'就是增加一个破折号。研究了好长时间才发现这个。

$attach['filename'] = $_G['setting']['bbname'].'-'.$attach['filename'];

第二个文件:./source/module/forum/forum_attachment.php搜索

$thread && $attachexists = TRUE;

在后面增加,这是未插入帖内的附件增加文件名前缀

$attach['filename'] = $_G['setting']['bbname'].'-'.$attach['filename'];

再后面一行。--这个是插入页面的附件增加文件名前缀

$attachexists = TRUE;

同样增加

$attach['filename'] = $_G['setting']['bbname'].'-'.$attach['filename'];

到此就修改完成了,现在上传覆盖下,看看是不是下载附件会增加你站点的名称了呢?