下载论坛附件时,附件名前自动加网站名 显示为“你的网站名称_附件原名”
6 z- V0 T7 l' ^4 k- c
' U$ t! W6 ^: E8 o6 `' j一:打开source/module/forum/forum_attachment.php
' J) q- W! e' O; ]7 Z1 o8 L6 y' d找到:
- $thread && $attachexists = TRUE;
复制代码改为:
- $thread && $attachexists = TRUE;, ^2 A h/ w7 X; f
- $attach['filename'] = '你的网站名称_'.$attach['filename'];+ s% i6 W9 N( H6 ~
复制代码二:打开source/function/function_attachment.php
) H5 R$ Z; ?- o4 |& J
找到:
改为:
- continue;
, E# S0 z+ j8 @0 F8 P& Z4 d" y - $attach['filename'] = '你的网站名称_'.$attach['filename'];
复制代码把上面代码里的“你的网站名称”修改成你所需要的附件前缀名就可以了
: w5 z; A4 G2 v, J: s* r9 D9 b
修改好,上传覆盖更新即可。演示见本站附件(点下载就可以看到)