unknown_things

Forum Replies Created

Viewing 25 posts - 1 through 25 (of 55 total)
in reply to: Strange conflict with WpDiscuz Comments #61610

Thanks “Allow Comments” was unchecked on all of them. Don’t know why but fixed it with Bulk update.

in reply to: Strange conflict with WpDiscuz Comments #61580
This reply has been marked as private.
in reply to: Strange conflict with WpDiscuz Comments #61406

Thanks so much, this solved the issue!

But what is the difference? Which line was causing the problem? I am really curious about it.

in reply to: Strange conflict with WpDiscuz Comments #61382
This reply has been marked as private.
in reply to: Size is not showing for remote files #61341

Thanks Shahriar! Works like a clock!

Yes Shahriar you are right. I’ve already modified the TinyMCE Quick Add-on. (Look at the attachment) I will make the back-end of the Set-Featured Image too. Just couldn’t find WordPress code to put Set Featured Image.

in reply to: Size is not showing for remote files #61317

Shaon, I can’t do that. In admin i guess you will disable some plugins looking for conflict? I can’t let you do that because even for a short time disabling the plugins affects the visitors.

If that ajax call for nonce is not important at all, i can disable it from WPDM files? What does it do anyway? The pages just working without it.

So there is final option: Putting “Set Featured Image” button on TinyMCE menu. What is code of that? It is native WordPress code right?

in reply to: Size is not showing for remote files #61250
This reply has been marked as private.
in reply to: Size is not showing for remote files #61216

Most certainly yes. It also contains code for getting remote file size without downloading the file. You can mark this as resolved. No i need to open another thread for wpnonce 404 error.

I had opened one in past but you haven’t answered it.

in reply to: Size is not showing for remote files #61188

Ok now package_id is showing as 0.

$package_id = intval($_REQUEST[‘id’]);
echo $package_id;
0

The package page loading fine but in console there is this error:

/downloads/file1/index.php?_nonce=dbb60113f4&id=40425 Failed to load resource: the server responded with a status of 404 ()

Also if the code inside of this is not working. It doesn’t pass the “if”.

if(isset($_REQUEST[‘_nonce’])&&wp_verify_nonce($_REQUEST[‘_nonce’],”__wpdm_view_count”)){

Tracked the error it seems coming from:
wp-includes/js/jquery/jquery.js
Line 4208: g.send(b.hasContent && b.data || null), (Failed to load resource, server responded with 404)

But this is not the issue is it? There is again a conflict?

———————————————————————————————————————————
Second way to do it with complete code. Put this on single.php in your theme.

if (get_post_type() == 'wpdmpro') {
        $package_id = get_the_ID();
        $old_package_size = get_post_meta($package_id, '__wpdm_package_size', true);
        $file_path_arr = get_post_meta($package_id, '__wpdm_files', true);
        $file = wp_remote_head( $file_path_arr[0] );
        if ( ! is_wp_error( $file ) && ! empty( $file['headers']['content-length'] ) ) {
                $filesize = $file['headers']['content-length'];
                update_post_meta($package_id, '__wpdm_package_size_b', $filesize, $old_package_size);
                $filesize = $filesize / 1024;
                if ($filesize > 1024) $filesize = number_format($filesize / 1024, 2) . ' MB';
                else $filesize = number_format($filesize, 2) . ' KB';
                update_post_meta($package_id, '__wpdm_package_size', $filesize, $old_package_size);
        }
}
in reply to: Size is not showing for remote files #61173

Ah I need one extra thing. I also need to get the URL of the files from database.

$file_info = get_post_meta($package_id, __wpdm_files, true);

Then unserialize it, right? The url will be on the first index? Right?

Also can we run this code from functions.php. Where do you suggest putting your code?

in reply to: Size is not showing for remote files #61172

Thats really great Shahriar, thanks. I will try that now.

in reply to: Size is not showing for remote files #61169

Then, i will write a script using curl and integrate it with you Size function.

But I don’t want to input manually every other file on the system. What is the best way to update all wpdm posts from a code point. Do you have an action for it so I can use it quickly to update every post and get the size.

in reply to: Display Download "Expiry Date" on Table List #61157

Why didn’t you answer my questions? This post is newer than mine and you answered it.

This is the plan:

In TinyMCE addon PHP file if we can get the current post id (this is regular post not WPDM post yet), we can retrieve the Post’s ID and in wpdm_quick_pack function after using static function call Create, we can easily set this post’s thumbnail to the WPDM’s post’s thumbnail.

But trying to get current POST ID in TinyMCE PHP file fails. It retrieves nothing. Is there a way to get the current Post id in there. After that it is easy to set WPDM Package thumbnail using WordPress functions.

in reply to: Getting Featured Image Thumb of Post instead of Package #60890

Again a question with no answers.

in reply to: Newsletter Extension Not Working #60889

I’ve debugged the issue. The emails were never sending because you left the code uncomplete. The function chain that starts looking for not-send (status = 0) mails from database were never starting because it was waiting for a certain request. Removing it solves first step. Second issue was PHP-Mailer was not working, so changing that to wp_mail function solves the second one. Thanks for nothing.

Wow just wow. Over 1 week and not even 1 reply. You can be sure I will explain the whole world about your behaviour and suggest people not to buy your plugin ever. You don’t care about your customers.

in reply to: Newsletter Extension Not Working #60796

Still waiting for help…

Fixed my own problem:

Open
libs/class.Package.php

Change
$thumb = wp_get_attachment_image_src(get_post_thumbnail_id($vars['ID']), 'full');

To:
$thumb = wp_get_attachment_image_src(get_post_thumbnail_id($vars['ID']), 'thumbnail');

Change:
$imsrc = wpdm_dynamic_thumb($vars['preview'], array($matches[1][$nd], $matches[2][$nd]));

To:
$imsrc = $thumb[0];

Really this plugin gave me so much headaches. Don’t get me wrong I like the plugin but there are sooooo many wrong things with it. Just will give you my humble opinion. Instead of making unnecessary features (like generating your own thumbnails) and tons of extensions, I think you need to first make core to work without problems.

-The theme and wordpress already generating tons of thumbnails and you are adding on top of this. Also in my situation the plugin generator just don’t work and not giving any errors. We can’t even debug it properly.

-There is no way to change the upload directory. Also there is no permission check for upload directory. Because there are no errors, I didn’t even think it was a permission error and looked at other places.

-Check the attachment. This is from Justified Image Grid which uses TimThumb to generate thumbnails. But this plugin checks the folder permissions and let you know if it is working.

-Please get rid of some of features like thumb generation, image gallery, login-register shortcodes, themes(!) etc. This is a download manager who needs gallery support? Why there is even themes for WPDM! For this, there are tons of other plugins and themes. Focus on your primary function.

-So many good programs destoryed over the years trying to give a lot of features and becoming bulky and lost their primary purpose. A program should only be doing one thing and doing that thing great. KISS principle. (https://en.wikipedia.org/wiki/KISS_principle) Keep It Simple, Stupid.

in reply to: Newsletter Extension Not Working #60768

By the way I’ve bought WPDM solely for this plugin. Please help me to solve this.

If you tell me in which file you set the thumbs tag, I will change it to get the thumbnails from the system. In this way it is clearly not working.

in reply to: Loggedin User details #60766

Thanks Shahriar, I inspected that widget and it uses categories from download manager. That will really make my work. Because it is not important in which custom post is the download file, it will use the Category from inside the WPDM.

Only image I see in that dir is img-404.png and nothing more. Permission is 777. No permission issue.

Why WPDM doesn’t use already made thumbnails. The system has tons of them ready.

This is gonna drive me crazy really need some help here.

This reply has been marked as private.
Viewing 25 posts - 1 through 25 (of 55 total)