Discuz! X1.5礼品兑换插件
礼品兑换插件1.5正式版适用版本:discuz X的任何版本版权所属:银领创业协会支持网站: http://www.ylcyxh.cn重要申明:请您在安装之前务必备份相关数据和相关文件。因任何未备份相关数据和相关文件造成的数据丢失我们概不负责。 ----全新安装---一、文件拷贝打开插件源文件的文件夹。将以下文件拷贝到discuzX版的网站的根目录下,各个文件都是独立开的,不会与原来程序有冲突二、执行数据库表//升级之前请先备份好数据库,因任何未备份相关数据和相关文件造成的数据丢失我们概不负责①:打开数据库文件文件夹--> gift_db.sql文件, ②:如果你的数据库表前缀为pre_那么可以直接复制内容,若不是请全局替换gift _db.sql下的表的前缀pre_ =>您原来的表前缀。 ③:打开数据库操作工具如:phpmyadmin将复制的数据表代码黏贴到phpmyadmin操作工具上,点击执行即可三、手动添加礼品图片上传分类代码打开sourceclass_upload.php大概在139行找到function get_target_dir function check_dir_type在这两个方法中添加图片类表原来代码: function get_target_dir($type, $extid = '', $check_exists = true) { $subdir = $subdir1 = $subdir2 = ''; if($type == 'album' || $type == 'forum' || $type == 'portal' || $type == 'category') { $subdir1 = date('Ym'); $subdir2 = date('d'); $subdir = $subdir1.'/'.$subdir2.'/'; } elseif($type == 'group' || $type == 'common') { $subdir = $subdir1 = substr(md5($extid), 0, 2).'/'; } $check_exists && discuz_upload::check_dir_exists($type, $subdir1, $subdir2); return $subdir; } function check_dir_type($type) { return !in_array($type, array('forum', 'group', 'album', 'portal', 'paimai','common', 'temp', 'category')) ? 'temp' : $type; } ----修改后代码:红色字体为添加的新代码function get_target_dir($type, $extid = '', $check_exists = true) { $subdir = $subdir1 = $subdir2 = ''; //e动代码//xiaozhi edit 2010-8-5 14:48:24 //增加图片存储文件夹中日期分类'eg_gift' if($type == 'eg_gift' || $type == 'album' || $type == 'forum' || $type == 'portal' || $type == 'paimai' || $type == 'category') { $subdir1 = date('Ym'); $subdir2 = date('d'); $subdir = $subdir1.'/'.$subdir2.'/'; } elseif($type == 'group' || $type == 'common') { $subdir = $subdir1 = substr(md5($extid), 0, 2).'/'; } $check_exists && discuz_upload::check_dir_exists($type, $subdir1, $subdir2); return $subdir; } function check_dir_type($type) { //e动代码//xiaozhi edit 2010-8-5 14:48:24 //增加图片存储文件夹'eg_gift' return !in_array($type, array('eg_gift','forum', 'group', 'album', 'portal', 'paimai','common', 'temp', 'category')) ? 'temp' : $type; }详细看图片:四、登陆网站后台更新缓存ok插件前台:http://您的域名/gift.php插件后台:http://您的域名/giftadmin.php插件个人中心:http://您的域名/giftmember.php四、首次使用进行基本配置其他说明:合作单位页面:egbaba_gifttemplatedefaultgift_partner.htm广告页面:egbaba_gifttemplatedefaultgift_ads.htm
715.12KB
文件大小:
评论区