thenemal
Forum Replies Created
-
Forum: Plugins
In reply to: [WordPress Access Control] Show ExcerptSame question here. Any update?
Forum: Plugins
In reply to: [Odyno GoogleGroups] Doesn't work if u r logged out from gmailSame here with Chrome. Works ok with IE (link to login).
Forum: Reviews
In reply to: [Current Username on Navigation Label] Exactly what I was looking for!Bonus: mod shortcode to display “Sign in” when the user is not connected:
add_shortcode( ‘current-username’ , ‘username_on_menu’ );
function username_on_menu(){
$user = wp_get_current_user();
$HTMLEntityHexadecimal = ‘👤’; // bust in silhouette https://graphemica.com/%F0%9F%91%A4if (empty($user->display_name)) {
$username_on_menu_label = “Sign In”;
} else {
$username_on_menu_label = html_entity_decode($HTMLEntityHexadecimal).” “.$user->display_name;
}return $username_on_menu_label;
}Forum: Plugins
In reply to: [Media Library Assistant] PDF Thumbnail generation not workingWell that’s very nice from you. I am looking forward to your updates.
Forum: Plugins
In reply to: [Media Library Assistant] PDF Thumbnail generation not workingHello David,
I have escalated as much as possible, they won’t allow me to recompile PHP with Imagick on my shared hosting plan, in order to keep the shared resources under control.
Now regarding your second paragraph: my WordPress is generating the 3 sizes of thumbnails as expected + I have a plugin to cap the size of the main picture (Imsanity) that works just fine. Also resizing or cropping the image with the native image editor works just as expected. I am also successfully using a plugin to control and resize my thumbnails (Post Thumbnail Editor)… all of this without Imagick. Not sure if these features are what you are referring to. All of this works for pictures only. Not video or pdf.
TheNemal
Forum: Plugins
In reply to: [Media Library Assistant] PDF Thumbnail generation not workingThank you for the information. So Imagick is not installed in PHP. I keep pushing my hosting company to compile it but for now they advise to call ImageMagick functions differently and is suggesting the following example:
<?php function resizeImage($image_path, $new_width, $new_height) { if( !class_exists("Imagick") ) { $rel_upload_dir = "uploads/"; //Your $root = $_SERVER["DOCUMENT_ROOT"]; $root_upload_dir = $root . "/portal/uploads"; //Get the root path for the images.. $old_img = str_replace($rel_upload_dir, $root_upload_dir, $image_path); $new_img = str_replace(".jpg", "_thumb.jpg", $old_img); //Generate the command.. $cmd = "/usr/bin/convert {$old_img} -resize {$new_width}x{$new_height} {$new_img}"; $return = null; //Execute the command exec($cmd, $return, $return); $new_img_dir = str_replace($root_upload_dir, $rel_upload_dir, $new_img); return new_img_dir; } else { //Use Imagick } }
What do you think?
Forum: Plugins
In reply to: [Media Library Assistant] PDF Thumbnail generation not workingI have added the following lines at the end of my php.ini:
[Imagick] extension=imagick.so
The site is working as usual. I get the same error message in MLA when trying to generate the thumbnail of a PDF (Imagick not installed).
I have a very limited knowledge of PHP, what is the best way to check if the extension is properly installed in PHP? Also do I need to restart something after installing the lines in php.ini?
TheNemal
Forum: Plugins
In reply to: [Media Library Assistant] PDF Thumbnail generation not workingHello David,
I tested dev version 20150626 based on your instructions. I went to the assistant, selected a PDF and asked for Thumbnail generation.
I received the following error message. As you saw on my provider’s page, I think the ImageMagick setup is very restricted for shared hosting setup and it seems there is a specific way to call it in PHP.
ERROR: Item 508, thumbnail generation failed – Imagick not installed
Is your command with the following syntax? (not sure where to look in your code)
exec('/usr/bin/convert /home/USERNAME/public_html/larger-image.png -resize 64x64 /home/USERNAME/public_html/smaller_image.jpg');
Thank you for investigating this.
Sebastien
Forum: Plugins
In reply to: [Media Library Assistant] PDF Thumbnail generation not workingHi David,
Sure, I’ll take a look. Just to be sure I understand: this version allows generating thumbnails for non-image items, I guess like video or pdf. Unfortunately my hosting company (InMotion) won’t allow ImageMagick as I am on a shared server (but I do have GS enabled). Won’t that be an issue for the generation of the thumbnails? Just want to make sure I am a relevant test case here ??
TheNemal
Forum: Plugins
In reply to: [WP Flow Plus] Media Library Assistant compatibility?FYI – WP Flow Plus works with Media Library Assistant, using the code:
[mla_gallery attachment_category=birds mla_alt_shortcode=wp-flowplus mla_alt_ids_name=include]
with attachment_category = ID MLA Category
(tip from MLA Dev, David Lingren)
Forum: Plugins
In reply to: [Media Library Assistant] Coverflow gallery?It’s working! Fantastic! Thank you David for taking the time to look into this.
Forum: Plugins
In reply to: [WP Flow Plus] Media Library Assistant compatibility?OK thx. Great job anyway!
Forum: Plugins
In reply to: [Media Library Assistant] PDF Thumbnail generation not workingOK I will try to “hard” delete the old directory. Thank you for the tip.
We can indeed close this topic. For Imagick support, I understand that hosting companies have to put specific rules to limit the potential impact on the server (for shared hosting solutions). Here is more information from my host:
https://www.inmotionhosting.com/support/website/software/using-imagemagick
If DG can do it, maybe you can find a way around it ??
Thank you anyway for looking into this.
Forum: Plugins
In reply to: [Media Library Assistant] PDF Thumbnail generation not workingYou are correct. GS is OK but not Imagick! Let me go back to my provider.
The good news is somehow we can manage PDF thumbnail without Imagick.
Also I just tried to update MLA with your new version, it failed. It doesn’t show in the Extensions Plugin list anymore but I can’t reinstall it as the folder is still here. Maybe I should bring this to a new thread.
Thank you for your help.
Forum: Plugins
In reply to: [Media Library Assistant] PDF Thumbnail generation not workingThank you for investigating this and for your quick follow up.
1/ Disable explicit Ghostscript check: I have now broken images instead of the pdf icon.
2/ mla_viewer=single: same result (with or without explicit Ghostscript check).
Current shortcode on the test page (if you want to see – Explicit gs check disabled):
[mla_gallery post_mime_type=application/pdf post_parent=all link=file mla_viewer=single mla_viewer_page=2 columns=1 orderby=date order=desc mla_debug=true]I also uploaded a new pdf to the test article to see if it would trigger a new generation… same.
Let me know if you need anything else.