下载论坛附件时,附件名前自动加网站名 显示为“你的网站名称_附件原名”
, ^8 y8 B+ Y& l7 S! W+ o5 _% R7 o. H
5 N4 D- R/ v2 @
一:打开source/module/forum/forum_attachment.php
$ `0 @; N4 D. V( U- s
找到:
- $thread && $attachexists = TRUE;
复制代码改为:
- $thread && $attachexists = TRUE;
, b7 ~8 M7 d7 o8 s7 A+ `6 v - $attach['filename'] = '你的网站名称_'.$attach['filename'];3 S( D1 W! H6 C) K/ n2 p
复制代码二:打开source/function/function_attachment.php
2 ]3 l e. z: M# v& N) a找到:
改为:
- continue;3 D* s/ Y' [! G u+ r
- $attach['filename'] = '你的网站名称_'.$attach['filename'];
复制代码把上面代码里的“你的网站名称”修改成你所需要的附件前缀名就可以了
/ R) ?4 E2 m" }/ m0 q5 G
修改好,上传覆盖更新即可。演示见本站附件(点下载就可以看到)