上海ABC > 服务器 > 服务器技术 > php程序发布
UCHOME1.5个人网盘插件(最后更新:3月31日)  

点击数:152  |   回复数:1   |   最后回复发表于2009.08

1
宁采臣
发表于 2009.08.09 09:32:19

内含gb2312 utf8两个版本 下载: http://abc.shlan.net/tq2/?code=k5zkilty

一、首先要感谢zhyx886http://www.discuz.net/viewthread.php?tid=1198753,本插件是在这个插件的基础上修改的,但原插件界面不够规范,使用上也有些问题。

网盘功能基本完成,全部使用UCH本身的代码功能,我只是作了一些自定义扩展。

因为本人第一次做插件,基本上没有多少经验,所以做得比较粗糙,但我会在接下去尽可能地完善它。

二、收费说明:收1个金币是为了小小满足一下自己的虚荣性,假如你确实没有金币,可以回贴说明,我一天可以给十个金币。

三、目前存在的问题:
1、批量上传到网盘的功能没有实现;
2、单个文件删除时,个人空间容量计数不正确;注:3月31日13:29:09 更新后此问题已完美解决!

四、界面演示:






五、安装过程:
1、升级数据库

  1. -- 表的结构 `uchome_udisk`

  2. CREATE TABLE `uchome_udisk` (
  3.   `albumid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4.   `albumname` varchar(50) NOT NULL DEFAULT '',
  5.   `uid` mediumint(8) unsigned NOT NULL DEFAULT '0',
  6.   `username` varchar(15) NOT NULL DEFAULT '',
  7.   `dateline` int(10) unsigned NOT NULL DEFAULT '0',
  8.   `updatetime` int(10) unsigned NOT NULL DEFAULT '0',
  9.   `picnum` smallint(6) unsigned NOT NULL DEFAULT '0',
  10.   `pic` varchar(60) NOT NULL DEFAULT '',
  11.   `picflag` tinyint(1) NOT NULL DEFAULT '0',
  12.   `friend` tinyint(1) NOT NULL DEFAULT '0',
  13.   `password` varchar(10) NOT NULL DEFAULT '',
  14.   `target_ids` text NOT NULL,
  15.   PRIMARY KEY (`albumid`),
  16.   KEY `uid` (`uid`,`updatetime`),
  17.   KEY `friend` (`friend`,`updatetime`),
  18.   KEY `updatetime` (`updatetime`)
  19. ) ENGINE=MyISAM DEFAULT CHARSET=gbk;

  20. -- --------------------------------------------------------

  21. -- 表的结构 `uchome_files`

  22. CREATE TABLE `uchome_files` (
  23.   `picid` mediumint(8) NOT NULL AUTO_INCREMENT,
  24.   `albumid` mediumint(8) unsigned NOT NULL DEFAULT '0',
  25.   `uid` mediumint(8) unsigned NOT NULL DEFAULT '0',
  26.   `dateline` int(10) unsigned NOT NULL DEFAULT '0',
  27.   `postip` char(20) NOT NULL DEFAULT '',
  28.   `filename` char(100) NOT NULL DEFAULT '',
  29.   `title` char(150) NOT NULL DEFAULT '',
  30.   `type` char(20) NOT NULL DEFAULT '',
  31.   `size` int(10) unsigned NOT NULL DEFAULT '0',
  32.   `unit` varchar(20) NOT NULL,
  33.   `fileext` varchar(20) NOT NULL,
  34.   `filepath` char(60) NOT NULL DEFAULT '',
  35.   `thumb` tinyint(1) NOT NULL DEFAULT '0',
  36.   `remote` tinyint(1) NOT NULL DEFAULT '0',
  37.   PRIMARY KEY (`picid`),
  38.   KEY `albumid` (`albumid`,`dateline`)
  39. ) ENGINE=MyISAM DEFAULT CHARSET=gbk;

2、上传附件内文件到UCH目录:
注:附件内所有文件为新文件,正常情况下应该没有覆盖提示;

3、修改以下几个UCH文件:
(1)template/default/header.htm
在:

  1. <li><img src="image/app/share.gif"><a href="space.php?do=share">分享</a></li>

后添加:

  1. <li><img src="image/app/udisk.gif"><a href="space.php?do=udisk">网盘</a><em><a href="cp.php?ac=uploadudisk">上传</a></em></li>

(2)template/default/network_header.htm
在合适位置添加:

  1. <li$actives[udisk]><a href="network.php?ac=udisk"><span>网盘</span></a></li>

(3)language/lang_cp.php
在结尾添加:

  1. ,
  2. 'create_a_new_udisk' => '创建了新目录',
  3. 'only_allows_upload_udiskfile_types' => '只允许上传gif, jpg, png, rar, txt, doc, xls, ppt, htm, html, mht, zip, bmp的文件',
  4. 'mobile_picture_temporary_failure_udisk' => '无法转移临时文件到服务器指定目录',
  5. 'upload_a_new_file' => '上传了一个新文件{udisk}'

(4)cp.php
原代码:

  1. $acs = array('space', 'doing', 'upload', 'comment', 'blog', 'album', 'relatekw', 'common', 'class',
  2.         'swfupload', 'thread', 'mtag', 'poke', 'friend',
  3.         'avatar', 'profile', 'theme', 'import', 'feed', 'privacy', 'pm', 'share', 'advance', 'invite','sendmail',
  4.         'userapp', 'task', 'credit', 'password', 'domain');

修改为:

  1. $acs = array('space', 'doing', 'upload', 'comment', 'blog', 'album', 'relatekw', 'common', 'class',
  2.         'swfupload', 'thread', 'mtag', 'poke', 'friend',
  3.         'avatar', 'profile', 'theme', 'import', 'feed', 'privacy', 'pm', 'share', 'advance', 'invite','sendmail',
  4.         'userapp', 'task', 'credit', 'password', 'domain', 'udisk', 'uploadudisk', 'udiskrecode');

(5)network.php
原代码:

  1. $acs = array('space', 'doing', 'blog', 'album', 'mtag', 'thread', 'share');

修改为:

  1. $acs = array('space', 'doing', 'blog', 'album', 'mtag', 'thread', 'share', 'udisk');

(6)space.php
原代码:

  1. $dos = array('feed', 'doing', 'mood', 'blog', 'album', 'thread', 'mtag', 'friend', 'wall', 'tag', 'notice', 'share', 'home', 'pm');

修改为:

  1. $dos = array('feed', 'doing', 'mood', 'blog', 'album', 'thread', 'mtag', 'friend', 'wall', 'tag', 'notice', 'share', 'home', 'pm', 'udisk');

2楼 宁采臣 发表于 2009.08.09 09:34:51
经过检查utf8是假的
1

发表回复 

  • 您未登录,帖子将以匿名回复。设置昵称 | 登录 | 注册
  • 是否将文章中的外部图片采集回来(网速慢时,很影响速度)

  • 快捷键:Ctrl+Enter