
先看这个|Read This First
*从今天开始所有教程日志均使用双语编写(>_<!虽然英文很难,但是我会继续的,欢迎勘误),
*From now on,articles here will be written in English and Chinese.>_<! In spite of my poor english. I will try my best to carry on. Welcome to point out the mistakes i make.
点击这里 跳转到中文教程
skip to the Tutorial in English
原创双语教程,转载请注明:作者小JOE | 地址:http://xiebiji.com/?p=675
copyright@joe.http://xiebiji.com/?p=675
——————————————中文教程————————————-
» 下载插件(版本 1.31 )
» 如何安装
- 打开wp-content/plugins 这个目录
- 把压缩包如下面名字的文件夹放在上面那个目录里:
文件夹: wp-downloadmanager
- 把中文语言包里的文件解压到2中的目录下
- 激活WP-DownloadManager 插件
- 进入后台,按 (管理首页 -> 设置 -> 永久链接 -> 保存修改)这个操作
- 根据 使用说明 获取更多介绍
» 使用说明(注意:以下的【 】换成[ ] )
- 为了在日志或者页面中嵌入单个下载的文件,可以在指定的位置写上代码 【download id=”2“】 这里的“2”是你上传的文件的id
- 为了在日志或者页面中嵌入多个下载的文件,可以在指定的位置写上代码 【download id=”1,2,3“]】这里的“1,2,3”是你上传的文件的id
- 已经嵌入进来的文件可以选择默认显示信息, 用 【download id=”1” display=”both“]】“ 1 ”是文件的id,” both” 的意思是同时显示文件名和文件描述, 要是换成“ name ”的话就只会显示文件名.这意味着它会覆盖“下载附件文件”这个下载模块(后台)里的显示方式。
- 如果你用的永久链接是默认模式, 嵌入的文件的直接下载地址就是:’http://yoursite.com/index.php?dl_id=2‘.如果你用的永久链接是友好模式, 嵌入的文件的直接下载地址就是:’http://yoursite.com/download/2/‘, 这里的 yoursite.com 就是你的 WordPress URL地址 , 2 文件的id。
- 某一下载分类的地址可以这样写: ‘http://yoursite.com/downloads/?dl_cat=3‘, 这里的 yoursite.com 就是你的 WordPress URL地址, downloads 是你的下载页的页名 , 3 是你下载分类的id。
- 为了让文件上传到指定的下载目录中,设置的下载目录必需开启777权限。你可以在下载设置中指定特定的下载目录。
- 可以按 ‘管理首页 -> 下载 -> 下载选项‘更改下载设置
- 可以按 ‘管理首页 -> 下载 -> 下载模版‘更改模版设置
- 按 ‘管理首页 -> 撰写 -> 页面‘操作
- 输入任何你喜欢的标题
- 假如你开启了永久链接的友好模式(非默认格式)的话,当你写完标题,下面就会出现一个编辑永久链接的“编辑”的链接。
- 点击并且往文本框内写入downloads(无空格) 然后点击保存。
- 在页面编辑区写入【page_download】(无空格),当然你也可以写入 【page_download category=”1″】, 这个的意思是显示id为1的分类的所有文件。
- 点击发布。
- 激活 WP-DownloadManager Widget 插件
- 按 ‘管理首页 -> 外观 -> Widgets‘操作
- 选择显示 Most Downloaded
- 你能增加 the Most Downloaded Widget ,只要按”添加”就OK了.
- 添加显示后,你还可以对他编辑
- 选择显示 Newest Downloads
- 你能增加 the Newest Downloads Widgett ,只要按”添加”就OK了.
- 添加显示后,你还可以对他编辑
- 点击“保存修改”
- 要显示 最热下载 则:
- 用以下代码:
<?php if (function_exists(‘get_most_downloaded’)): ?>
<?php get_most_downloaded(); ?>
<?php endif; ?>你需要更改的参数就是默认显示的文件数(显示多少个文件)
默认: get_most_downloaded(10);
- 要显示 最近下载 则:
- 用以下代码:
<?php if (function_exists(‘get_recent_downloads’)): ?>
<?php get_recent_downloads(); ?>
<?php endif; ?>你需要更改的参数就是默认显示的文件数(显示多少个文件)
默认: get_recent_downloads(10);
- 要显示 特定分类下载 则:
- 用以下代码:
<?php if (function_exists(‘get_downloads_category’)): ?>
<?php get_downloads_category(1); ?>
<?php endif; ?>你需要更改的参数1就是要显示的分类的id
你需要更改的参数1就是要显示的文件数目默认: get_downloads_category(1, 10);
» 使用注意
博客空间支持.htaccess的话,永久链接那里设置友好模式(非默认)才会有作用。不设置友好模式的话,该插件貌似会出现问题,例如下载文件地址不存在。因此请开启博客空间的.htaccess功能
——————————–Tutorial in English—————————————–
» Download the file(Version 1.31 )
Click here to download the Plugin.You can also visit here.
» Installation Instructions
- Open wp-content/plugins Folder
- Put:
Folder: wp-downloadmanager
- Activate WP-DownloadManager Plugin
- You Need To Re-Generate The Permalink (WP-Admin -> Settings -> Permalinks -> Save Changes)
- Refer To Usage For Further Instructions
» Usage Instructions(PS.the following “【 】” must be changed into ” [ ] ” )
- To embed a specific file to be downloaded into a post/page, use 【download id=”2“】where 2 is your file id.
- To embed multiple files to be downloaded into a post/page, use 【download id=”1,2,3“】where 1,2,3 are your file ids.
- To choose what to display within the embedded file, use 【download id=”1” display=”both“】 where 1 is your file id and both will display both the file name and file desccription, whereas name will only display the filename.Note that this will overwrite the “Download Embedded File” template you have in your Download Templates.
- If you are using Default Permalinks, the file direct download link will be ‘http://yoursite.com/index.php?dl_id=2‘. If you are using Nice Permalinks, the file direct download link will be ‘http://yoursite.com/download/2/‘, where yoursite.com is your WordPress URL and 2 is your file id.
- The direct download category link will be ‘http://yoursite.com/downloads/?dl_cat=3‘, where yoursite.com is your WordPress URL, downloads is your Downloads Page name and 3 is your download category id.
- In order to upload the files straight to the downloads folder, the folder must be first CHMOD to 777. You can specify which folder to be the downloads folder in Download Options.
- You can configure the Download Options in ‘WP-Admin -> Downloads -> Download Options‘
- You can configure the Download Templates in ‘WP-Admin -> Downloads -> Download Templates‘
- Go to ‘WP-Admin -> Write -> Write Page‘
- Type any title you like in the post’s title area
- After typing the title, WordPress will generate the permalink to the page. You will see an ‘Edit’ link just beside the permalink.
- Click ‘Edit’ and type in ‘downloads‘ in the text field (without the quotes) and click ‘Save’.
- Type ‘【page_download】‘ in the post’s content area (without the quotes)
You can also use 【page_download category=”1″】, this will display all downloads in Category ID 1. - Click ‘Publish’
- Activate WP-DownloadManager Widget Plugin
- Go to ‘WP-Admin -> Design -> Widgets‘
- To Display Most Downloaded
- You can add the Most Downloaded Widget Widget by clicking on the ‘Add’ link besides it.
- After adding, you can configure the Downloaded Widget Widget by clicking on the ‘Edit’ link besides it.
- To Display Newest Downloads
- You can add the Newest Downloads Widget Widget by clicking on the ‘Add’ link besides it.
- After adding, you can configure the Newest Downloads Widget Widget by clicking on the ‘Edit’ link besides it.
- Click ‘Save Changes’
- To Display Most Downloaded
- Use:
<?php if (function_exists(‘get_most_downloaded’)): ?>
<?php get_most_downloaded(); ?>
<?php endif; ?>The first value you pass in is the maximum number of files you want to get.
Default: get_most_downloaded(10);
- To Display Recent Downloads
- Use:
<?php if (function_exists(‘get_recent_downloads’)): ?>
<?php get_recent_downloads(); ?>
<?php endif; ?>The first value you pass in is the maximum number of files you want to get.
Default: get_recent_downloads(10);
- To Display Downloads By Category
- Use:
<?php if (function_exists(‘get_downloads_category’)): ?>
<?php get_downloads_category(1); ?>
<?php endif; ?>The first value you pass in is the category id.
The second value you pass in is the maximum number of files you want to get.
Default: get_downloads_category(1, 10);
» FAQ
Permalinks will not work if your server space doesn’t support “.htaccess”。It seems that if you do not change Permalinks to “Nice Permalinks“,the Plugin will not work well.For example,the file direct download link is not been found。So makesure “.htaccess” can work.
————————————————————————-
建议但开英文博客,方便欧美人士阅读习惯。否则英汉双语,感觉像是学习英文的博客了,呵呵。
回复
回复
回复
语言多了,对在一块,有些乱糟糟,哈哈。^_^
回复
很有追求嘛,啥时候俺也试试双语
回复
Здорово!
回复
回复
[...] 参考文章: Tutorial For WP-DownloadManager Plugin|中文教程 [...]
http://muz-on.net/banner.gif
回复
博主对于WP所作出的贡献真是无以言谢,作为WP用户在这里还是要感谢一下
回复
回复
你的介绍很详细,对我很有用
回复
这款主题真漂亮!
回复