Nisr
Forum Replies Created
-
Forum: Plugins
In reply to: [Recently] Can't filter by Taxonomy when using widget within page builderHi Hector,
please, we need to know if you find any solution for this issue.
Kind regardsForum: Plugins
In reply to: [Recently] Can't filter by Taxonomy when using widget within page builderHi Hector,
thanks a lot for your response.
We are using “Page Builder by SiteOrigin” plugin.
Best regardsForum: Plugins
In reply to: [Download Attachments] required: most downloaded files widget or shortcodethanks for your response,
is it possible to list the posts to which attached the most downloaded files? and if you can give me please the full code of WP_Query with meta query ordered by “_da_downloads” meta key.
I’ll be so grateful.
kind regardsForum: Plugins
In reply to: [Caldera Forms - More Than Contact Forms] mailer doesn't workHi,
Problem resolved using a special SMTP plugin. It was not an issue related to your plugin. It was a problem with the server.
thanksForum: Plugins
In reply to: [Custom Content Shortcode] how to display posts from one custom taxonomygreat it worked
thanks
problem resolved & 5 stars review for youthanks for replying,
i hope you add this feature in your coming updates because it’s important for academic websites specially those who try to use your plugin to manage their peer review publishing system. without the need to use other plugins to manage the uploaded files.
thanksForum: Plugins
In reply to: [Download Attachments] blank page after changing upload directorythanks for replying ??
ok let me be more clear,
the code that i use will put attachments in different upload directories according to each post type. this means, for the publications post type, the attachments will be uploaded to :
/wp-content/uploads/publications/file2.pdf
while for the communications post type they will be uploaded to :
/wp-content/uploads/communications/file3.pdf
So, i need the plugin to make visitors able to download these attachments from any upload directory where they were uploaded to.
i hope you can try the code in any theme function.php and tell me what i have to do. because i looked inside the plugin function.php and i found the line you mentioned but i really didn’t know what to do.function da_download_attachment($attachment_id = 0) { if(get_post_type($attachment_id) === 'attachment') { $uploads = wp_upload_dir(); $attachment = get_post_meta($attachment_id, '_wp_attached_file', true); $filepath = $uploads['basedir'].'/'.$attachment; if(!file_exists($filepath) || !is_readable($filepath)) return false; // if filename contains folders if(($position = strrpos($attachment, '/', 0)) !== false) $filename = substr($attachment, $position + 1); else $filename = $attachment; if(ini_get('zlib.output_compression')) ini_set('zlib.output_compression', 0); header('Content-Type: application/download'); header('Content-Disposition: attachment; filename='.rawurldecode($filename)); header('Content-Transfer-Encoding: binary'); header('Accept-Ranges: bytes'); header('Cache-control: private'); header('Pragma: private'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Content-Length: '.filesize($filepath)); if($filepath = fopen($filepath, 'rb')) { while(!feof($filepath) && (!connection_aborted())) { echo fread($filepath, 1048576); flush(); } fclose($filepath); } else return false; update_post_meta($attachment_id, '_da_downloads', (int)get_post_meta($attachment_id, '_da_downloads', true) + 1); exit; } else return false; }
waiting for your reply
best regardsForum: Plugins
In reply to: [Download Attachments] how to get the file url?thanks for the reply
but please how can i put it in a full code to get the url. I mean what’s the complete php code that display the url within the loop?
thanksForum: Plugins
In reply to: [Download Attachments] pretty urls page error5 stars review was added to your plugin for this fast great support. Problem is resolved and i hope that you’ll take this problem in consideration in the next upgrades of the plugin. wish u the best.
Kind regards.Thanks a lot it worked
problem resolvedForum: Plugins
In reply to: [Custom Field Suite] problem with custom post typehi again
after trying i found that<?php echo CFS()->get('first_name'); ?>
works fine with all the fields except the hyperlinks!!
any suggestion please?