- Check what database and table the plugin is using, under Options, Database Files
- 在“选项”下的“数据库文件”下,检查插件正在使用的数据库和表 li>
- Turn the plugin off in the Plugin Management page.
- 在“插件管理”页面中关闭插件。 li>
- Delete the dbfiles directory in the WordPress plugin directory
- 删除WordPress插件目录中的dbfiles目录 li>
- Optional: delete the files table mentioned in Options, Database Files, Destination database / Destination table
- 可选:删除选项,数据库文件,目标数据库/目标表中提到的文件表 li>
- Optional: delete the options added in wp_options (see “Options added and used in wp_options” below)
- 可选:删除wp_options中添加的选项(请参见下面的“ wp_options中添加和使用的选项”) li>
ul>
Files
文件 h3>
This is how the structure should look when installed correctly:
这是正确安装后结构的外观: p>
/wordpress/plugins/dbfile/dbfile.inc – the db_file class with all functionality to access database files
/wordpress/plugins/dbfile/dbfile.inc –具有访问数据库文件所有功能的db_file类
dbfile.php – all actions (edit, view, get, delete) are handled via this file
dbfile.php –通过此文件处理所有操作(编辑,查看,获取,删除)
dbfiles.php – the plugin main activation file
dbfiles.php –插件主激活文件
LICENSE.TXT – GPL license
LICENSE.TXT – GPL许可证
readme.txt – this file
readme.txt –此文件 p>
Tables
表格 h3>
The files table (defaults to wp_files in the WordPress database) consists of these fields:
文件表(在WordPress数据库中默认为wp_files)包含以下字段:
id – the id of the database file
id –数据库文件的ID
name – the name of the file
名称–文件名
mimeType – the mime type of the file, i.e. image/png for a .png file
mimeType –文件的mime类型,即.png文件的image / png
content – the actual file, stored as a blob – binary large object
内容–实际文件,以斑点形式存储–二进制大对象
description – a short description of the file
description –文件的简短描述
created – date and time when the file was uploaded (first time)
创建-文件上传的日期和时间(第一次)
modified – date and time when the file was modified/uploaded (after first time)
Modifyed –修改/上传文件的日期和时间(第一次之后)
hits – the number of times the file has been downloaded/viewed.
点击数–文件被下载/查看的次数。
This only increments if hit counting is turned on with the dbfile_use_hitcounter option.
仅当使用dbfile_use_hitcounter选项打开命中计数时,此计数才会递增。 p>
The post2file table (defaults to wp_post2file in the WordPress database) consists of these fields:
post2file表(在WordPress数据库中默认为wp_post2file)包含以下字段:
relID – the relational id
relID –关系ID
postID – the id of the post record
postID –帖子记录的ID
dbfileID – the id of the dbfile record
dbfileID – dbfile记录的ID
sortNo – the sorting number used when displaying dbfiles in a post, to sort the entries
sortNo –在帖子中显示dbfile时用于对条目进行排序的排序号
For now, the dbfile plugin handles only one to one relation between a post and a dbfile.
目前,dbfile插件仅处理帖子和dbfile之间的一对一关系。
This is soon to be changed.
这将很快改变。 p>
Options added and used in wp_options
在wp_options中添加和使用的选项 h3>
dbfile_use_fileupload – “1” to enable uploads, “0” to disable.
dbfile_use_fileupload –“ 1”启用上载,“ 0”禁用。
Default is “0”
默认值为“ 0”
dbfile_database – The name of the database to use for upload/download of files.
dbfile_database –用于上传/下载文件的数据库的名称。
Defaults to “wordpress” (or whatever you have named it).
默认为“ wordpress”(或任何您命名的名称)。
dbfile_table – The name of the table to use for upload/download of files.
dbfile_table –用于上传/下载文件的表的名称。
Defaults to “wp_files” (actually the wp_ part is dynamically fetched from your installation).
默认为“ wp_files”(实际上wp_部分是从安装中动态获取的)。
dbfile_post2file_table – The name of the table to use for relations between posts and db files.
dbfile_post2file_table –用于发布和db文件之间关系的表的名称。
Defaults to “wp_post2file” (the wp_ part is dynamically fetched from your installation).
默认为“ wp_post2file”(wp_部分是从安装中动态获取的)。
dbfile_upload_maxk – The maximum number of kilobytes that will be received when uploading.
dbfile_upload_maxk –上传时将接收的最大千字节数。
Defaults to 300
默认为300
dbfile_upload_allowedtypes – The file extensions that are allowed to be uploaded, separated by spaces.
dbfile_upload_allowedtypes –允许上传的文件扩展名,以空格分隔。
Defaults to “jpg jpeg gif png”
默认为“ jpg jpeg gif png”
dbfile_upload_minlevel – The minimum user level required to upload files.
dbfile_upload_minlevel –上载文件所需的最低用户级别。
Defaults to 6.
默认为6。
dbfile_preview_types – The file types that should be previewed when editing a file, separated with space, excluding the extension dot
dbfile_preview_types –编辑文件时应预览的文件类型,以空格分隔,但扩展名点除外
Defaults to jpg jpeg gif png
默认为jpg jpeg gif png
dbfile_entry – The structure of a dbfile entry in a post.
dbfile_entry –帖子中dbfile条目的结构。
Use %name and %link inside the string
在字符串中使用%name和%link
Defaults to
默认为 p>
- %name
- %name li>
dbfile_use_hitcounter – Turn on hit counter by setting this to 1
dbfile_use_hitcounter –通过将其设置为1来打开命中计数器。
Defaults to 0
默认为0 p>
Todo
Todo h3>
As this is a new project, there are several items/bugs that could be fixed in the future:
由于这是一个新项目,因此将来可能会修复多个项目/错误:
* Localization
*本地化
* Check FIXMEs
*检查FIXME
* Security/SQL-injection?
*安全性/ SQL注入?
* Compression
*压缩
* Use the ORIGINAL created and modified of the file?
*使用原始创建和修改的文件?
Add a field “uploaded” to wp_files then.
然后将一个字段“ uploaded”添加到wp_files。
* Follow WordPress coding standards
*遵循WordPress编码标准
* Different files for the different actions?
*不同文件的不同动作?
adddbfile.php, editdbfile.php, admindbfiles.php?
adddbfile.php,editdbfile.php,admindbfiles.php?
* Add “read” and “edit” rights to files
*为文件添加“读取”和“编辑”权限
* Separate content from presentation better
*更好地将内容与演示文稿分开
* Remove hard coded links/paths
*删除硬编码的链接/路径
* More documentation
*更多文档
* Sortable table in Database File Management (see http://www.kryogenix.org/code/browser/sorttable/ for an example)
*数据库文件管理中的可排序表(有关示例,请参见http://www.kryogenix.org/code/browser/sorttable/)
* Nicer error messages for users (XHTML compliant)
*为用户提供更好的错误消息(符合XHTML)
* Integrate with the image/file browser in ChenPress/FCKeditor
*与ChenPress / FCKeditor中的图像/文件浏览器集成
* Caching (on/off) (cache files on filesystem?)
*缓存(打开/关闭)(在文件系统上缓存文件吗?)
* Add referrer checking, so external sites can not link directly (on/off)
*添加引荐来源网址检查,使外部站点无法直接链接(打开/关闭)
* Change the content field in the files table to LONGBLOB
*将文件表中的内容字段更改为LONGBLOB
* Export files from the database to the file system
*将文件从数据库导出到文件系统
* Rename files
*重命名文件 p>