Changeset 152535
- Timestamp:
- 09/06/2009 05:22:33 PM (17 years ago)
- Location:
- wp-download-codes/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (1 diff)
-
dc_functions.php (modified) (1 diff)
-
wp-download-codes.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-download-codes/trunk/README.txt
r151836 r152535 1 1 === Plugin Name === 2 2 3 Contributors: misanthrop 4 3 5 Donate link: http://wordpress.org/extend/plugins/wp-download-codes/ 6 4 7 Tags: download, download code, code generator 8 5 9 Requires at least: 2.5 10 6 11 Tested up to: 2.8.4 7 Stable tag: 1.0.6 12 13 Stable tag: 1.0.7 14 15 8 16 9 17 The plugin enables to generation and management of download codes for .zip files. It was written to enable the free download of records and CDs with dedicated codes printed on the cover of the releases or on separate download cards. 10 18 19 20 11 21 == Description == 22 23 12 24 13 25 The plugin enables to generation and management of download codes for .zip files. It was written to enable the free download of records and CDs with dedicated codes printed on the cover of the releases or on separate download cards. 14 26 27 28 15 29 With the plugin you can: 16 30 31 32 17 33 * Create and manage **releases**, which are items bundled as zips (e.g. digital versions of vinyl albums) to be downloaded with download codes. 34 18 35 * Specify the allowed number of downloads for each release. 36 19 37 * Create alphanumeric **download codes** for each release using a prefix for each code. The number of characters can be specified for each code. 38 20 39 * Review downloads codes and set them to "final" when you want to use and distribute them. 40 21 41 * Export final download codes in a plain list. 42 22 43 * Analyze the use of the download codes. 44 45 23 46 24 47 == Installation == 25 48 49 50 26 51 1. Upload the `wp-download-codes` folder to the `/wp-content/plugins/` directory. 52 27 53 1. Activate the plugin through the 'Plugins' menu in WordPress. 54 28 55 1. Create a folder within the `wp-content` directory and upload one or several zip files via FTP. 56 29 57 1. Go to the 'Settings' page and enter the zip folder specified above. 58 30 59 1. Create a new release and assign a valid zip file to it. 60 31 61 1. Create download codes for the release via 'Manage codes' and make them final. 62 32 63 1. Put `[download-code id="xyz"]` in a page or post, where "xyz" is the ID of the respective release. 64 65 33 66 34 67 == Frequently Asked Questions == 35 68 69 70 36 71 = Can I have download forms for several releases? = 72 73 37 74 38 75 No, currently each download code form must have assigned the ID of a specific release. 39 76 77 78 40 79 = Why do I have to upload the zip files via FTP? = 41 80 81 82 42 83 Most providers do not allow an upload quota which is sufficient to upload larger zip files. Therefore, an option using an upload form has not been considered yet. 84 85 43 86 44 87 == Screenshots == 45 88 46 89 90 91 92 47 93 == Changelog == 48 94 95 96 = 1.0.7 = 97 98 * Fixed different behavior of upload path determination (absolute, relative). 99 100 49 101 = 1.0.6 = 102 50 103 * Fixed side effects to media library. 51 104 105 106 52 107 = 1.0.5 = 108 53 109 * Added header for information about the length of the downloaded file. 110 54 111 * Fixed deletion of session. 55 112 113 114 56 115 = 1.0.4 = 116 57 117 * Fixed "Make final" functionality for WP 2.7. 118 58 119 * Introduced differentiation between absolute and relative upload paths. 59 120 121 122 60 123 = 1.0.3 = 124 61 125 * Added "mp3" to the allowed file types. 126 62 127 * Reworked constraints for fields on 'Manage Releases'. 63 128 129 130 64 131 = 1.0.2 = 132 65 133 * Bug fix: (Existing) zip folders below the upload directory can now be selected via drop-down. 134 66 135 * Bug fix: On the 'Manage Codes' page, the non-existence of releases was handled (link to 'Add new release' sub page was displayed'). 67 136 137 138 68 139 = 1.0.1 = 140 69 141 * Improved editing and addition of releases. 142 70 143 * Corrected setting of options during initialization. 71 144 145 146 72 147 = 1.0.0 = 148 73 149 * Initial version. 74 150 151 152 75 153 == Arbitrary section == 154 -
wp-download-codes/trunk/dc_functions.php
r148897 r152535 60 60 } 61 61 else { 62 return $wp_upload_dir['basedir'] . $upload_path .'/' . get_option( 'dc_zip_location' );62 return $wp_upload_dir['basedir'] . '/' . get_option( 'dc_zip_location' ); 63 63 } 64 64 } -
wp-download-codes/trunk/wp-download-codes.php
r151836 r152535 1 1 <?php 2 2 3 /* 4 3 5 Plugin Name: WP Download Codes 6 4 7 Plugin URI: http://wordpress.org/extend/plugins/wp-download-codes/ 8 9 5 10 6 11 Description: The plugin enables to generation and management of download codes for .zip files. It was written to enable the free download of records and CDs with dedicated codes printed on the cover of the releases or on separate download cards. 7 12 8 Version: 1.0.6 13 14 15 Version: 1.0.7 16 9 17 Author: misanthrop 18 10 19 Author URI: http://www.misantropolis.de 20 21 11 22 12 23 Copyright 2009 Armin Fischer (email : misantropolis@gmail.com) 13 24 25 26 14 27 This program is free software; you can redistribute it and/or modify 28 15 29 it under the terms of the GNU General Public License as published by 30 16 31 the Free Software Foundation; either version 2 of the License, or 32 17 33 (at your option) any later version. 18 34 35 36 19 37 This program is distributed in the hope that it will be useful, 38 20 39 but WITHOUT ANY WARRANTY; without even the implied warranty of 40 21 41 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 42 22 43 GNU General Public License for more details. 23 44 45 46 24 47 You should have received a copy of the GNU General Public License 48 25 49 along with this program; if not, write to the Free Software 50 26 51 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 52 53 54 28 55 /** 56 29 57 * Inclusion of administration, template and general functions. 58 30 59 */ 31 60 61 62 32 63 include( 'dc_administration.php' ); 64 33 65 include( 'dc_template.php' ); 66 34 67 include( 'dc_functions.php' ); 35 68 69 70 36 71 /** 72 37 73 * Addition of dc functions to hooks. 74 38 75 */ 39 76 77 78 40 79 if (is_admin()) { 80 41 81 // Create administration menu 82 42 83 add_action('admin_menu','dc_admin_menu'); 43 } 44 else { 45 // Sending headers for download of files 46 add_action( 'send_headers', 'dc_headers'); 84 47 85 } 48 86 87 else { 88 89 // Sending headers for download of files 90 91 add_action( 'send_headers', 'dc_headers'); 92 93 } 94 95 96 49 97 // Shortcode for [download-code id="..."] 98 50 99 add_shortcode( 'download-code', 'dc_download_form' ); 51 100 101 102 52 103 // Activation of plugin 104 53 105 register_activation_hook( __FILE__, 'dc_init' ); 54 106 107 108 55 109 // Uninstallation of plugin 110 56 111 if ( function_exists('register_uninstall_hook') ) 112 57 113 register_uninstall_hook(__FILE__, 'dc_uninstall'); 114 58 115 ?>
Note: See TracChangeset
for help on using the changeset viewer.