-
Search Results
-
Topic: Download Count problems…
Hi. I’m having two problems with the download manager
1] It’s displaying a file loaded into download manager even if it has “0” downloads. That doesn’t make sense to me.
2] It’s displaying in descending order of most recently added download files. That’s not very useful to my readers. Unless I can show ALL downloads in the widget (which I can’t), it’s not going to show older files that have higher download counts. I hope there’s a way to resolve this.I’d hate to move on because this is potentially such a great plugin, but I’m worried that the plugin is stuck with this functionality…
Thanks,
BobTopic: No File Downloads
no download shows only the code.
2 days ago it all worked. I have no changes to the server.
Please help.Test @ Firfox , Safari and IE Not working.
Domain http://zorrox.com
My latest File Upload. http://zorrox.com/download/enterpage-12-metro-wsl/Thank you
Download links work fine — but package pages/links do not. All of our downloads were imported from Download Monitor in case that matters.
See the page here: http://manausa.com/popular-downloads
If I go in and “edit” each package individually and press the “update” button — then the package link starts working. I’d rather not do this for over 35 pages of downloads though!
Please help. I’ve tried updating permalinks, uninstalling/reinstalling, etc.
Great news, I got it working, and it’s working great!
Just need to clean up some things, and finish it to be fully dynamic (there is one new wp_option I may need to store, and maybe add a few inputs to file-manager/add-new-package for it). I also need to add some if conditions, to properly handle my script to only be triggered if “FTP-DUMP” or something is enabled. I’d like to clean up my handling of absolute/relative paths too. It’s very dirty still.
So far, I only had to add change one block of code, and add a new block.
Then, I referenced my own script in it’s own PHP file, and I just include it once if admin.php?page=file-manager&task=RefreshPackage, it pulls the needed references to define it’s variables from $_GET[‘id] (WPDM’s file package DB records). I built it off your current Add/Edit system.Here is the change log to your source:
[the code tags on this forum seem to trim some of my code, so I will also attach a .txt]
**NOTE:**
I always apply source formatting via Dreamweaver when I edit files, so my line numbers won't match unless you do that first.
Therefore, relying on line numbers isn't best, so I will also reference local objects/*///////////////////////////////////////////////////////////////
//in: list-files.php
+:
[replaces][div class="button-group"](near line 119 w/ applied source formatting)
creates a new button for "Refresh Package" on the Download Package Management back-end page, and inserts a line break () in button-group div
so that all the buttons fit in the table cell
//////////////////////////////////////////////////////////////*/<a class="button" href="admin.php?page=file-manager&task=RefreshPackage&id=" style="color: #90F">Refresh Package
<a class="button" href="admin.php?page=file-manager&task=EditPackage&id=">Edit<a class="button" href="admin.php?page=file-manager/add-new-package&clone=" style="color: #336699">Clone
<a class="button" target="_blank" href='' style="color: #005500">View
<a href="admin.php?page=file-manager&task=DeleteFile&id=" class="button submitdelete" style="color: #cc0000" rel=" " title="Permanently">Delete/*///////////////////////////////////////////////////////////////
//in: wpdm.php
+:
[appended][fuction RefreshPackage()](added near line 409 w/ applied source formatting)
adds function for "Refresh Package" button to refresh the package's item
//////////////////////////////////////////////////////////////*/
function RefreshPackage(){global $wpdb, $current_user;
get_currentuserinfo();
$cond_uid = wpdm_multi_user()&&!wpdm_is_custom_admin()?"and uid='{$current_user->ID}'":"";$id = $_GET['id'];
$table_name = "{$wpdb->prefix}ahm_files";
$file = $wpdb->get_row("SELECT * FROM {$table_name} WHERE `id` = {$id} $cond_uid", ARRAY_A);
if(!$file[id]) {
$error = "Sorry, You don't have permission to edit that file!";
include("error-page.php");
return;
}include('refreshpackage.php');
}
and this is the code for my refreshpackage.php, needs to be cleaned up now as I said:
$dir) {
// find first non-matching dir
if($dir === $to[$depth]) {
// ignore this directory
array_shift($relPath);
} else {
// get number of remaining dirs to $from
$remaining = count($from) - $depth;
if($remaining > 1) {
// add traversals up to first matching dir
$padLength = (count($relPath) + $remaining - 1) * -1;
$relPath = array_pad($relPath, $padLength, '..');
break;
} else {
$relPath[0] = './' . $relPath[0];
}
}
}
return implode('/', $relPath);
}
/* END RELATIVE PATH COMPARER *//* DEFINE VARS */
$packageID = $_GET['id'];
$siteurl = site_url();
$wpmdpath = WPDM_BASE_DIR;
$zippath = $file[sourceurl]; //full path needs to be trimmed below...
$zipfilename = basename($file[sourceurl]); //file name
$zippath = str_replace($zipfilename,"",$zippath); //trim trailing file name
$sourceDIRname = "http://www.example.com/downloads/General-Packages/imagesonly/"; //need to dynamically define this later. MUST BE ON SAME SERVER!!
/* END DEFINE VARS *//* CLEAN/TRIM SOURCE PATHS */
//the idea here is to trim all the prefixes to the file-sourceurl and the site_url(), so we can compare them, even if
//the site_url is http://example.com and the file-sourceurl is http://www.example.com/file.zip, or hopefully even if it was a local WP site.
//
//trim possible url prefixes..
$zippath = str_replace("http://","",$zippath);
$zippath = str_replace("www.","",$zippath);
$zippath = str_replace("//","",$zippath);
$zippath = str_replace("\\","",$zippath);
$siteurl = str_replace("http://","",$siteurl);
$siteurl = str_replace("www.","",$siteurl);
$siteurl = str_replace("//","",$siteurl);
$siteurl = str_replace("\\","",$siteurl);
$sourceDIRname = str_replace("http://","",$sourceDIRname);
$sourceDIRname = str_replace("www.","",$sourceDIRname);
$sourceDIRname = str_replace("//","",$sourceDIRname);
$sourceDIRname = str_replace("\\","",$sourceDIRname);
//trim off remaining site url...
$zippath = str_replace($siteurl,"",$zippath);
$sourceDIRname = str_replace($siteurl,"",$sourceDIRname);
/* END CLEAN/TRIM SOURCE PATHS *//**************************************/
/* COMPARE PATHS TO FIND REAL REL PATH */
/* FOR ZIP-SOURCE-DIR & ZIP-OUTPUT-DIR */
$sourcefolder = wpmd_getRelativePath("./", $sourceDIRname); // must be rel to $wpmdpath
$outputfolder = wpmd_getRelativePath("./", $zippath); // must be rel to $wpmdpath
/**************************************/$timeout = 100000 ; // Default: 50000
// This creates the zip file
$dirlist = new RecursiveDirectoryIterator($sourcefolder);
$filelist = new RecursiveIteratorIterator($dirlist);// Set the php timeout
ini_set('max_execution_time', $timeout);
// Defines the action
$zip = new ZipArchive();
?>
open("$zipfilename", ZipArchive::OVERWRITE) !== TRUE) {
die ("Could not open archive");
}// adds files to the file list
foreach ($filelist as $key►$value) {
//fix archive paths
$path = str_replace($sourcefolder, "", $key);$zip->addFile(realpath($key), $path) or die ("ERROR: Could not add file: $key");
}// closes the archive
$zip->close();
//move to output if necessary
if ($outputfolder != "./") {
if (copy("./" . $zipfilename,"" .$outputfolder . "/" . $zipfilename . "")) {
unlink("./" . $zipfilename);
}
}
echo "Archive ". $zipfilename . " created successfully!";
?>
Of course, I will also add a location href at the end of my script to reload page?=file-manager, and will echo a “Successful!” message there when it’s done. Now I get to smooth out all the details! 🙂
Do you think any of this may be of benefit to you?
Hey there Shaon,
I was working on integrating my script fully into my copy of WPDM and ran into an issue. I’ve been trying to debug but haven’t traced the issue yet.
After testing my script on their own separate pages, and liking how it worked, I decided to see if I could integrate it into my copy of WPDM.
first I did this, this worked just fine:
/*///////////////////////////////////////////////////////////////
//in: list-files.php
+:
[replaces][div class="button-group"](near line 119 w/ applied source formatting)
creates a new button for "Refresh Package" on the Download Package Management back-end page, and inserts a line break () in button-group div
so that all the buttons fit in the table cell
//////////////////////////////////////////////////////////////*/<a class="button" href="admin.php?page=file-manager&task=RefreshPackage&id=" style="color: #90F">Refresh Package
<a class="button" href="admin.php?page=file-manager&task=EditPackage&id=">Edit<a class="button" href="admin.php?page=file-manager/add-new-package&clone=" style="color: #336699">Clone
<a class="button" target="_blank" href='' style="color: #005500">View
<a href="admin.php?page=file-manager&task=DeleteFile&id=" class="button submitdelete" style="color: #cc0000" rel=" " title="Permanently">Delete/*///////////////////////////////////////////////////////////////
But then, I changed wpdm.php to include a new action of “refreshpackage()”.
I just copied EditPackage(), and renamed the function. I intended on testing my newly created Refresh Package button by having it include a new .php file with my script in it. I hadn’t set it up to pass variables yet, that was next.
/*///////////////////////////////////////////////////////////////
//in: wpdm.php
+:
[appended][fuction RefreshPackage()](added near line 409 w/ applied source formatting)
adds function for "Refresh Package" button to refresh the package's item
//////////////////////////////////////////////////////////////*/
function RefreshPackage(){global $wpdb, $current_user;
get_currentuserinfo();
$cond_uid = wpdm_multi_user()&&!wpdm_is_custom_admin()?"and uid='{$current_user->ID}'":"";$id = $_GET['id'];
$table_name = "{$wpdb->prefix}ahm_files";
$file = $wpdb->get_row("SELECT * FROM {$table_name} WHERE `id` = {$id} $cond_uid", ARRAY_A);
if(!$file[id]) {
$error = "Sorry, You don't have permission to edit that file!";
include("error-page.php");
return;
}include('refreshremotepackage.php');
}
The first commit worked just fine. But after the second commit, and placing the refreshremotepackage.php file, suddenly my Downloads menu for WPDM is gone. I have attempted reinstalling with a fresh download from your site, and repairing my DB. I inspected my DB tables too, but couldn’t find anything amiss. Any ideas? Something with licensing perhaps?
I run a site that sells subscriptions to premium content in the form of PDFs that can be downloaded through DOCMAN. I am migrating this joomla site to wordpress, and am trying to bulid a similar document management systems to docman.
I am using s2Member to sel premium memberships, and once purchased their role will be “Premium”.
Premium members should be able to download all PDFs (free + premium) in the downloads area, while registered users will only be able to download a subset of those files.
1) Can download manager work with the custom user levels of s2member (visitor, registered, premium)? I’m only seeing two options right now for the pdf i uploaded in the free DM version – all visitors & members only.
Thanks
I had the FREE version, deleted it, downloaded, installed and activated the pro version but the ‘downloads’ directory does not show up as indicated in your demo. Luckily I had not closed another browser where my old installation of download mgr free was, I clicked on the file mgr tab and it allowed me to put in the license code for the pro version. That’s the last I have seen of the program. Deactivated the plugin, activated again,
still nothing. Tried all 4 browsers.Hello!
I do have 10 seperate WP-Installations which are all located in a central directory named “websites”. The single WP’s are then in subdirs like “domain1.com”, “domain2.com”, … etc. All WP-tables are in the same database, but each installation has it’s own tables, I didn’t use the standard “wp_”, but “d1_” for domain1, “d2_” for domain2, ….
I was looking for a simple download manager tool and found this plugin. I installed it on one domain and uploaded some files. Everything worked really fine and smoothly.
Now I installed it on a second domain and there I was very suprised, when it showed me a list of already existing downloadable files. Well, all the files from first installation. Even when I delete a file in installation nr 2, it disappears in the first installation.
It seems that both installations exactly the same data-tables or other settings. How can I change that? The websites are maintained by different users and I don’t want them to be able to handle with downloads from other users.
Hope anyone can help me.
Best regards
YannTopic: User Reviews help?
With user reviews, are we able to add a section on the download itself to actually let the person add a review? Or is this not possible? I don’t see anything about it be able to be added to the downloads themselves? I just see the sidebar area in the admin panel?
Hi, i did buy the Pro Version + alot of Plugin’s.
here is a list of my Problems.
1. I did a translation with the .po File.
After a day of Translation i found out that still alot of stuff will be displayed in english.
Is this a known problem ?2. When i Display the Archive-Page it doesn’t show the ICON’s of the choosen content inside the Categorie
seems like somethink wrong with the ICON Adress.
Right now it is :
https://download.medidok.net/index.php/alle-downloads/%3Cimg%20width=48%20class=’wpdm_icon’%20align=’left’%20src=’https://download.medidok.net/wp4mddown/wp-content/plugins/download-manager/file-type-icons/download2.png’%20/%3EIf i open a Categorie by the Widget
3.
I Ordered first the Pro Version with Plugin and then i Ordered again the speed Control Plugin
what Key should i use? I have 2 key’s now.
When i look inside my account here it doesn’t have a domain ?! normal ?4. I had Problems with the permalink structure
The Site is https://download.medidok.net
The content is https://download.medidok.net/wp4mddown/
I had to change the Startsite inside WP to https://download.medidok.net/index.php
After that i could use /%postname%/ inside permalink settings.
Beside that i did change inside download-manager/modules/ the file canonical-url.php
under function wpdm_flat_url
i did change every .site_url to .home_url
I’m note sure if that was really needed but i’ve done it to get it working
I’m Using IIS7.5 and WP3.51 on php 5.3.21 (Fast-CGI)hopefully i can get some help here
Topic: Download conut
hi
is there any shortcode to show all downloads count? i want to show how many files have been downloaded from my site.Topic: WPDM New Packages Widget
my client would like to add checkboxes to the listing template and a button that allows selected files to be downloaded (either as one zip file or individually, if possible).
any ideas if that’s feasible?
thanks
Topic: Zero Length Downloads
I have some install applications that I need to have hosted on the site. I FTP the files onto the server, and set up the package for the download. When anyone tries to download on of the files it gives them a zero length file and nothing really downloads. I need to get this fixed ASAP. We just released a new version and now I have no way to get it to my customers for upgrades.