Edukid

Forum Replies Created

Viewing 25 posts - 1 through 25 (of 27 total)

Edukid
Participant

Anything happening on this? Thx

in reply to: Zero file size shown in 6.0.3 #158692

Edukid
Participant

So it works with one way of adding files, but not the other. That’s still 50% not working. I created a patch that seems to work for me with http attachments. Could you check it out and consider adding to the plugin?

Index: src/Package/FileList.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/Package/FileList.php b/src/Package/FileList.php
--- a/src/Package/FileList.php	
+++ b/src/Package/FileList.php	(date 1627659974653)
@@ -222,7 +222,8 @@
                 $classes = array('1' ► 'col-md-12', '2' ► 'col-md-6', '3' ► 'col-md-4', '4' ► 'col-md-3', '6' ► 'col-md-2');
                 $class = isset($classes[$cols]) ? $classes[$cols] : 'col-md-4';
 
-                foreach ($allfiles as $fileID ► $sfile) {
+                foreach ($allfiles as $fileID ► $sfile1) {
+                    $sfile = wpdm_is_url($sfile1) ? get_attached_file($fileID) : $sfile1; // for files added as https get file from the FID
                     $fhtml .= "<div class='{$class} col-sm-6 col-xs-6'><div class='panel panel-default card mb-4'>";
                     $ind = $fileID; //\WPDM_Crypt::Encrypt($sfile);
 
in reply to: Zero file size shown in 6.0.3 #158499

Edukid
Participant
This reply has been marked as private.
in reply to: Zero file size shown in 6.0.3 #158498

Edukid
Participant
This reply has been marked as private.
in reply to: Problems after upgrade to 6.0.3 #158399

Edukid
Participant

The download button worked now, thanks.

in reply to: Zero file size shown in 6.0.3 #158391

Edukid
Participant
This reply has been marked as private.
in reply to: Zero file size shown in 6.0.3 #158287

Edukid
Participant

Thanks but tags only help if the underlying php code works.
e.g. file size won’t work if file_size() function fails – which it does for the reason stated above.
Did you change the package definition structure from paths to URLs, or is there something strange about our site?

in reply to: Zero file size shown in 6.0.3 #158145

Edukid
Participant

It seems be caused by files being passed as URLs to php functions that expect paths e.g. file_size(), file_exists().

in reply to: Problems after upgrade to 6.0.3 #158079

Edukid
Participant

Bump! (As I said it’s not working on the staging site.)

in reply to: Problems after upgrade to 6.0.3 #157795

Edukid
Participant
This reply has been marked as private.
in reply to: Zero file size shown in 6.0.3 #157585

Edukid
Participant

Thanks. So why is it still saying 0.00?


Edukid
Participant
This reply has been marked as private.
in reply to: Problems after upgrade to 6.0.3 #157583

Edukid
Participant
This reply has been marked as private.
in reply to: Zero file size shown in 6.0.3 #157580

Edukid
Participant

Oh… Is package size not automatically calculated?


Edukid
Participant
This reply has been marked as private.
in reply to: Problems after upgrade to 6.0.3 #157561

Edukid
Participant

Thanks, but my problem hasn’t been resolved, I’ve just made a workaround. Please would you help with a proper fix?

in reply to: Problems after upgrade to 6.0.3 #157555

Edukid
Participant

I’ve patched it

`Index: src/__/FileSystem.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff –git a/src/__/FileSystem.php b/src/__/FileSystem.php
— a/src/__/FileSystem.php (date 1626349466779)
+++ b/src/__/FileSystem.php (date 1626349466779)
@@ -260,8 +260,8 @@
if ($zip->open($zipped, \ZIPARCHIVE::CREATE) !== TRUE) {
return false;
}
– foreach ($files as $file) {
– $file = trim($file);
+ foreach ($files as $fid ► $file) {
+ $file = get_attached_file($fid);
$filename = wp_basename($file);
$file = WPDM()->fileSystem->absPath($file);
/*if (file_exists(UPLOAD_DIR . $file)) {

in reply to: Problems after upgrade to 6.0.3 #157553

Edukid
Participant

I can see code in FileSystem::zipFiles() that’s passing URLs of files to ZipArchive::addFile(), but I think it expects a file path? The result is each addFile fails and the created zip is empty.

in reply to: Problems after upgrade to 6.0.3 #157551

Edukid
Participant

To clarify:
If I click “Download” on individual files it works.
If I click “Download” button for the package I download a 0-length zip.

in reply to: Version 5.3.4 #146805

Edukid
Participant

I’m also having trouble with this update. Is it possible to update the plugin in place, or do I need to download the zip from your site and upload manually?

in reply to: Automatic updates #142932

Edukid
Participant

U was a bit slow to understand there. but it fixed it.

This is what I did:
1 Go to “Downloads” + “Settings” in admin menu
2 Click “License” tab on left.
3 Click “Save settings”

Thanks!

in reply to: Exclude admin users from download stats #141909

Edukid
Participant

More or less… My requirements are: exclude/prevent the count of downloading the packages BY my staff from the download-stats

in reply to: Exclude admin users from download stats #141905

Edukid
Participant
This reply has been marked as private.
in reply to: Exclude admin users from download stats #141893

Edukid
Participant

Let me explain the problem again.

The good bit: I can see the download stats, e.g. who is downloading, which downloads are most popular etc.
No problem there.

However the stats are misleading; I am only interested in downloads done by customers, but the stats also include downloads done by our staff. If a member of staff (with role editor) downloads a document from the website I do not want that increment the download count for that document.

Does that make sense?

in reply to: Exclude admin users from download stats #141872

Edukid
Participant

Your questions dinner make sense. I honestly don’t know if you have understand my question!

Viewing 25 posts - 1 through 25 (of 27 total)