本帖最后由 xinxinv1 于 2009-12-27 20:12 编辑
在 'templates/<您的模版>/post_editor.htm' 中找到:- <!--{if $allowpostattach}-->
- 把您的脚本复制到这里...
- <!--{/if}-->
复制代码- <script type="text/javascript">
- // <![CDATA[
- function fs2you_show_upctrl(){
- var fu = document.getElementById("fs2you_upctrl");
- if(fu)fu.innerHTML='<img src="http://static.rayfile.com/media/img/loading.gif" style="border: 0px" />';
- var obj = document.createElement("script");
- obj.setAttribute("type", "text/javascript");
- obj.setAttribute("src", "http://www.rayfile.com/jslib/upctrl.js");
- document.body.appendChild(obj);
- }
- // ]]>
- </script>
- <style type="text/css">
- #fs2you_upctrl
- {
- border: solid 1px #BBE9FF;
- color: #4F6B72;
- background: #F5FBFF none repeat scroll 0%;
- padding: 5px;
- }
- </style>
- <script type="text/javascript">
- // <![CDATA[
- var fs2you_account = "这里是您的邮箱";
- var fs2you_message_body_name = "atc_content";
- var fs2you_display_template = "%7B%25%20for%20file%20in%20files%20%25%7D%0A%u6587%u4EF6%u540D%3A%20%5BURL%3D%7B%7B%20file.downloadUrl%20%7D%7D%5D%7B%7B%20file.fileName%20%7D%7D%5B/URL%5D%0A%u63CF%u8FF0%3A%20%7B%7B%20file.description%20%7D%7D%0A%u4E0B%u8F7D%u5730%u5740%3A%20%5BURL%3D%7B%7B%20file.downloadUrl%20%7D%7D%5D%7B%7B%20file.downloadUrl%20%7D%7D%5B/URL%5D%0A%7B%25%20if%20file.thumbnailUrl%20%25%7D%u9884%u89C8%3A%0A%5BURL%3D%7B%7B%20file.downloadUrl%20%7D%7D%5D%5BIMG%5D%7B%7B%20file.thumbnailUrl%20%7D%7D%5B/IMG%5D%5B/URL%5D%7B%25%20endif%20%25%7D%0A%7B%25%20endfor%20%25%7D";
- // ]]>
- </script>
- <div id="fs2you_upctrl"><a href="javascript:fs2you_show_upctrl()">我想要上传一些文件</a></div>
复制代码 您需要在'include/global.func.php'这个文件中找到这段代码:- if($allowget || ($_SERVER['REQUEST_METHOD'] == 'POST' && $GLOBALS['formhash'] == formhash() && (empty($_SERVER['HTTP_REFERER']) ||
- preg_replace("/https?:\/\/([^\:\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) == preg_replace("/([^\:]+).*/", "\\1", $_SERVER['HTTP_HOST'])))) {
复制代码 更改为下面这段代码:- if($allowget || ($_SERVER['REQUEST_METHOD'] == 'POST' && $GLOBALS['formhash'] == formhash() && (empty($_SERVER['HTTP_REFERER']) ||
- preg_replace("/https?:\/\/([^\:\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) == preg_replace("/([^\:]+).*/", "\\1", $_SERVER['HTTP_HOST'])||
- preg_replace("/https?:\/\/([^\:\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) == "dyn.www.rayfile.com"))) {
复制代码 附件是我改自己好的 教程是RayFile提供的
更改时记得备份原文件 避免意外 |