'; _e('

Download URL updated - You need to re-save your permalinks settings (Options/settings -> Permalinks) for the changes to occur in your blog.

If your .htaccess file cannot be written to by WordPress, add the following to your .htaccess file above the "# BEGIN WordPress" line:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^download/([^/]+)$ *your wp-content dir*/plugins/download-monitor/download.php?id=$1 [L]

replacing "download/" with your custom url and "*your wp-content dir*" with your wp-content directory.

',"wp-download_monitor"); echo '
'; } else { echo '
'; _e('

Download URL updated - You need to re-save your permalinks settings (Options/settings -> Permalinks) for the changes to occur in your blog.

If your .htaccess file cannot be written to by WordPress, remove the following from your .htaccess file if it exists above the "# BEGIN WordPress" line:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^download/([^/]+)$ *your wp-content dir*/plugins/download-monitor/download.php?id=$1 [L]

replacing "download/" with your previous custom url and "*your wp-content dir*" with your wp-content directory.

',"wp-download_monitor"); echo '
'; } $save_url = true; $show=true; break; case "saveoptions" : update_option('wp_dlm_disable_news', $_POST['wp_dlm_disable_news']); update_option('wp_dlm_image_url', $_POST['wp_dlm_image_url']); update_option('wp_dlm_default_format', $_POST['wp_dlm_default_format']); update_option('wp_dlm_does_not_exist', $_POST['wp_dlm_does_not_exist']); update_option('wp_dlm_member_only', $_POST['wp_dlm_member_only']); update_option('wp_dlm_log_downloads', $_POST['wp_dlm_log_downloads']); update_option('wp_dlm_enable_file_browser', $_POST['wp_dlm_enable_file_browser']); update_option('wp_dlm_auto_mirror', $_POST['wp_dlm_auto_mirror']); update_option('wp_dlm_global_member_only', $_POST['wp_dlm_global_member_only']); update_option('wp_dlm_log_timeout', $_POST['wp_dlm_log_timeout']); update_option('wp_dlm_ip_blacklist', $_POST['wp_dlm_ip_blacklist']); if ($_POST['wp_dlm_file_browser_root']) update_option('wp_dlm_file_browser_root', $_POST['wp_dlm_file_browser_root']); else update_option('wp_dlm_file_browser_root', ABSPATH); $save_opt=true; echo '
'; _e('

Options updated

',"wp-download_monitor"); echo '
'; $show=true; break; case "upgrade" : wp_dlm_upgrade(); $show=true; break; case "cleanup" : wp_dlm_cleanup(); echo '

'.__('Database Cleaned',"wp-download_monitor").'

'; $show=true; break; case "formats" : wp_cache_flush(); if (isset($_POST['savef'])) { $loop = 0; if (is_array($_POST['formatfieldid'])) { foreach($_POST['formatfieldid'] as $formatid) { if ($_POST['formatfield'][$loop]) { $query_update = sprintf("UPDATE %s SET `format`='%s' WHERE id = %s;", $wpdb->escape( $wp_dlm_db_formats ), $wpdb->escape( stripslashes($_POST['formatfield'][$loop]) ), $wpdb->escape( $formatid )); $wpdb->query($query_update); } //echo htmlspecialchars($wpdb->escape( stripslashes($_POST['formatfield'][$loop]) )); $loop++; } echo '

'.__('Formats updated',"wp-download_monitor").'

'; $ins_format=true; } } else { $name = $_POST['format_name']; $format = $_POST['format']; if (!empty($name) && !empty($format)) { $query_ins = sprintf("INSERT INTO %s (name, format) VALUES ('%s','%s')", $wpdb->escape( $wp_dlm_db_formats ), $wpdb->escape( $name ), $wpdb->escape( $format )); $wpdb->query($query_ins); echo '

'.__('Format added',"wp-download_monitor").'

'; $ins_format=true; } } $show=true; break; case "deleteformat" : wp_cache_flush(); $id = $_GET['id']; // Delete $query_delete = sprintf("DELETE FROM %s WHERE id=%s;", $wpdb->escape( $wp_dlm_db_formats ), $wpdb->escape( $id )); $wpdb->query($query_delete); echo '

'.__('Format deleted Successfully',"wp-download_monitor").'

'; $ins_format=true; $show=true; break; } } if (!isset($show)) $show = false; if ( ($show==true) || ( empty($action) ) ) { ?>

This allows you to define formats in which to output your downloads however you want.

',"wp-download_monitor"); ?>
escape( $wp_dlm_db_formats )); $formats = $wpdb->get_results($query_select_formats); if (!empty($formats)) { foreach ( $formats as $f ) { echo ''; } } else { echo ''; } ?>
'.$f->id.''.$f->name.' '.__('Delete',
'.__('No formats exist',"wp-download_monitor").'

" />

:
:

" />

note if you use " (quote) characters within the special attributes e.g. "before" you should either escape them or use html entities.',"wp-download_monitor"); ?>

  • {url} -
  • {id} -
  • {user} -
  • {version} -
  • {version,"before","after"} -
  • {title} -
  • {size} -
  • {categories} -
  • {categories, "link"} - % replaced with category id. %2 replaced with category name. This can be used with the [download_page].',"wp-download_monitor"); ?>
  • {category,"before","after"} {category} -
  • {category_other,"before","after"} {category_other} -
  • {category_ID} -
  • {hits} -
  • {hits,"No hits","1 Hit","% hits"} - % replaced with hit count.',"wp-download_monitor"); ?>
  • {image_url} -
  • {description,"before","after"} {description} -
  • {description-autop,"before","after"} {description-autop} -
  • {date,"Y-m-d"} -
  • {tags} -
  • {tags, "link"} - % replaced with tag id. %2 replaced with tag name.',"wp-download_monitor"); ?>
  • {thumbnail} -
  • {meta-key} -
  • {meta-autop-key} -
  • {filetype} -
  • {filetype_icon} -
  • {mirror-1-url} -

  • <a href="{url}" title="Downloaded {hits} times">{title}</a> - {description}
  • <a href="{url}">{title}</a>
  • <a href="{url}"><img src="{image_url}" alt="{title}" /></a>

Set a custom url for your downloads, e.g. download/. You can also choose how to link to the download in it\'s url, e.g. selecting "filename" would make the link appear as http://yoursite.com/download/filename.zip. This option will only work if using wordpress permalinks (other than default).

Leave this option blank to use the default download path (/download-monitor/download.php?id=)

If you fill in this option ensure the custom directory does not exist on the server nor does it match a page or post\'s url as this can cause problems redirecting to download.php.

',"wp-download_monitor"); ?>

Explanation

Explanation
: /

" />

*/ ?>
:
:
: {referrer} will be replaced with current url. Useful if sending user to the login page and then back to the download :) e.g. http://yourdomain.com/wp-login.php?redirect_to={referrer}.',"wp-download_monitor"); ?>
:
: #image download tag and the {image_url} tag on this page. Please use an absolute url (e.g. http://yoursite.com/image.gif).',"wp-download_monitor"); ?>
:
:
:
:
:
:
:
: and above.

" />

Download monitor uses new tables from version 3.3 onwards; this was to clean things up and add multiple category support.

',"wp-download_monitor"); ?> This update should have been done when you activated the plugin, but if it didn\'t, use this function to create the new tables and import from the old ones.

',"wp-download_monitor"); ?>

" />


As stated above, tables were renamed from 3.3 onwards - if the upgrade has been successful (woo) you may use this function to delete the old tables (I left them there as a backup).

',"wp-download_monitor"); ?> WARNING: THIS MAY DELETE DOWNLOAD DATA IN THE DATABASE; BACKUP YOUR DATABASE FIRST!

',"wp-download_monitor"); ?>

" />

'; } ?>