下载论坛附件时,附件名前自动加网站名 显示为“你的网站名称_附件原名”
9 ~2 x( L5 o c
* P3 B' a4 ` i
一:打开source/module/forum/forum_attachment.php
2 G( J# v- M2 ~/ U* |找到:
- $thread && $attachexists = TRUE;
复制代码改为:
- $thread && $attachexists = TRUE;
" [8 D. s3 o1 a# P7 [ - $attach['filename'] = '你的网站名称_'.$attach['filename'];
" Z+ j% B8 ^6 z: P; G. W& V
复制代码二:打开source/function/function_attachment.php
N, m( U1 ]2 P" H找到:
改为:
- continue;7 d( f# O7 z# s- D$ C' T, ^
- $attach['filename'] = '你的网站名称_'.$attach['filename'];
复制代码把上面代码里的“你的网站名称”修改成你所需要的附件前缀名就可以了
! t6 h+ `' F4 r0 M: F( j修改好,上传覆盖更新即可。演示见本站附件(点下载就可以看到)