Tutorial For WP-DownloadManager Plugin|中文教程


先看这个|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 )

点击这里 下载这个插件。你也可以在这里找到它。中文语言包

» 如何安装

  1. 打开wp-content/plugins 这个目录
  2. 把压缩包如下面名字的文件夹放在上面那个目录里:

    文件夹: wp-downloadmanager

  3. 把中文语言包里的文件解压到2中的目录下
  4. 激活WP-DownloadManager 插件
  5. 进入后台,按 (管理首页 -> 设置 -> 永久链接 -> 保存修改)这个操作
  6. 根据 使用说明 获取更多介绍

» 使用说明注意:以下的【 】换成[ ]

大概用法
  1. 为了在日志或者页面中嵌入单个下载的文件,可以在指定的位置写上代码 【download id=”2“】 这里的“2”是你上传的文件的id
  2. 为了在日志或者页面中嵌入多个下载的文件,可以在指定的位置写上代码 【download id=”1,2,3“]】这里的“1,2,3”是你上传的文件的id
  3. 已经嵌入进来的文件可以选择默认显示信息, 用 【download id=”1” display=”both“]】“ 1 ”是文件的id,” both” 的意思是同时显示文件名和文件描述, 要是换成“ name ”的话就只会显示文件名.这意味着它会覆盖“下载附件文件”这个下载模块(后台)里的显示方式。
  4. 如果你用的永久链接默认模式, 嵌入的文件的直接下载地址就是:’http://yoursite.com/index.php?dl_id=2‘.如果你用的永久链接友好模式, 嵌入的文件的直接下载地址就是:’http://yoursite.com/download/2/‘, 这里的 yoursite.com 就是你的 WordPress URL地址 , 2 文件的id。
  5. 某一下载分类的地址可以这样写: ‘http://yoursite.com/downloads/?dl_cat=3‘, 这里的 yoursite.com 就是你的 WordPress URL地址, downloads 是你的下载页的页名 , 3 是你下载分类的id。
  6. 为了让文件上传到指定的下载目录中,设置的下载目录必需开启777权限。你可以在下载设置中指定特定的下载目录。
  7. 可以按 ‘管理首页 -> 下载 -> 下载选项‘更改下载设置
  8. 可以按 ‘管理首页 -> 下载 -> 下载模版‘更改模版设置
关于下载页
  1. 按 ‘管理首页 -> 撰写 -> 页面‘操作
  2. 输入任何你喜欢的标题
  3. 假如你开启了永久链接的友好模式(非默认格式)的话,当你写完标题,下面就会出现一个编辑永久链接的“编辑”的链接。
  4. 点击并且往文本框内写入downloads(无空格) 然后点击保存。
  5. 在页面编辑区写入【page_download】(无空格),当然你也可以写入 【page_download category=”1″】, 这个的意思是显示id为1的分类的所有文件。
  6. 点击发布。
下载统计 (以 Widgets 显示)
  1. 激活 WP-DownloadManager Widget 插件
  2. 按 ‘管理首页 -> 外观 -> Widgets‘操作
  3. 选择显示 Most Downloaded
  4. 你能增加 the Most Downloaded Widget ,只要按”添加”就OK了.
  5. 添加显示后,你还可以对他编辑
  6. 选择显示 Newest Downloads
  7. 你能增加 the Newest Downloads Widgett ,只要按”添加”就OK了.
  8. 添加显示后,你还可以对他编辑
  9. 点击“保存修改”
下载统计 (在WP循环外<关于WP大循环可以网上找教程>)
  • 要显示 最热下载
  • 用以下代码:

    <?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

  1. Open wp-content/plugins Folder
  2. Put:

    Folder: wp-downloadmanager

  3. Activate WP-DownloadManager Plugin
  4. You Need To Re-Generate The Permalink (WP-Admin -> Settings -> Permalinks -> Save Changes)
  5. Refer To Usage For Further Instructions

» Usage InstructionsPS.the following “【 】” must be changed into ” [ ] ”

General Usage
  1. To embed a specific file to be downloaded into a post/page, use 【download id=”2“】where 2 is your file id.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. You can configure the Download Options in ‘WP-Admin -> Downloads -> Download Options
  8. You can configure the Download Templates in ‘WP-Admin -> Downloads -> Download Templates
Downloads Page
  1. Go to ‘WP-Admin -> Write -> Write Page
  2. Type any title you like in the post’s title area
  3. After typing the title, WordPress will generate the permalink to the page. You will see an ‘Edit’ link just beside the permalink.
  4. Click ‘Edit’ and type in ‘downloads‘ in the text field (without the quotes) and click ‘Save’.
  5. 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.
  6. Click ‘Publish’
Download Stats (With Widgets)
  1. Activate WP-DownloadManager Widget Plugin
  2. Go to ‘WP-Admin -> Design -> Widgets
  3. To Display Most Downloaded
  4. You can add the Most Downloaded Widget Widget by clicking on the ‘Add’ link besides it.
  5. After adding, you can configure the Downloaded Widget Widget by clicking on the ‘Edit’ link besides it.
  6. To Display Newest Downloads
  7. You can add the Newest Downloads Widget Widget by clicking on the ‘Add’ link besides it.
  8. After adding, you can configure the Newest Downloads Widget Widget by clicking on the ‘Edit’ link besides it.
  9. Click ‘Save Changes’
Download Stats (Outside WP Loop)
  • 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.

————————————————————————-

13 Responses to Tutorial For WP-DownloadManager Plugin|中文... »

  1. HE Yi 评论 2008-09-16 21:14

    建议但开英文博客,方便欧美人士阅读习惯。否则英汉双语,感觉像是学习英文的博客了,呵呵。 :razz:

    回复

    joe 回复 九月 16th, 2008 at 22:19

    :razz: 我本来就在学英文的~编辑是乱了点

    回复

    joe 回复 九月 16th, 2008 at 22:25

    :wink: 谢谢建议

    回复

  2. HE Yi 评论 2008-09-16 21:17

    语言多了,对在一块,有些乱糟糟,哈哈。^_^ :grin:

    回复

  3. 空心土豆 评论 2008-09-17 11:55

    很有追求嘛,啥时候俺也试试双语

    回复

  4. Буронабивные сваи 评论 2008-09-24 02:58

    Здорово!

    回复

    joe 回复 九月 24th, 2008 at 08:30

    :oops: Спасибо!

    回复

  5. WP-DownloadManager 中文教程 - 5mu’s blog Pingback 2008-11-05 23:54

    [...]       参考文章: Tutorial For WP-DownloadManager Plugin|中文教程 [...]

  6. Cms 评论 2009-06-01 17:23

    博主对于WP所作出的贡献真是无以言谢,作为WP用户在这里还是要感谢一下

    回复

    joe 回复 六月 2nd, 2009 at 21:05

    :( 最近比较懒了

    回复

  7. Dianso 评论 2010-07-25 22:53

    你的介绍很详细,对我很有用

    回复

  8. Lvtu 评论 2011-06-27 14:29

    这款主题真漂亮!

    回复

Leave a Reply

Email address is not published

You should say a Chinese word to pass spam check. If you can not input Chinese, just copy 你好 and paste them into comment text box.