DISCUZ X1.5下载附件名称前加本站名称

效果:用户在下载DISCUZ论坛附件时,附件名前自动加网站名

操作方法:
1.修改source/module/forum/forum_attachment.php

view plaincopy to clipboardprint?
  1. //替换:
  2. $thread?&&?$attachexists?=?TRUE;
  3. //为
  4. $thread?&&?$attachexists?=?TRUE;
  5. $attach[‘filename’]?=?’你的网站名称_’.$attach[‘filename’];

*****做到步骤一,DISCUZ X1.5已经实现了下载DISCUZ论坛附件时,附件名前自动加网站名的效果,但网上也有下面步骤二,不知道什么意思*****
2.修改source/function/function_attachment.php

view plaincopy to clipboardprint?
  1. //替换:
  2. continue;
  3. //为:
  4. continue;
  5. $attach[‘filename’]?=?’你的网站名称_’.$attach[‘filename’];

这时再去你的DISCUZ论坛下载附件,你会发现名称前就自动加上了你要的字符串(不管是老附件还是新附件,都一样的效果)

为您推荐