Mizuho Ogino
Forum Replies Created
-
Forum: Plugins
In reply to: [PDF Image Generator] Will Pay for IntegrationHi.
Converting .doc won’t be as easy. I think the best way is to convert .doc to a .pdf before uploading.
Forum: Plugins
In reply to: [PDF Image Generator] Will Pay for IntegrationApplication post type may be not allowed to set in Front End Submissions.
I think the following setting may help.
Check the “Allow to set THUMBNAIL file itself as featured image” box in the optional settings of PDF Image Generator, and then reselect an image file (not .pdf itself) as a featured image .If it doesn’t work well, please send a screenshot from my contact form.
https://web.contempo.jp/contact?lang=enI can’t reproduce your problem because not have Front End Submissions.
I think I need to see the source of It. It will help me if you can send me zipped .php files related with the user interface of Front End Submissions.
After I watch them, I will consider whether it is possible.Forum: Plugins
In reply to: [PDF Image Generator] Will Pay for IntegrationHello robb11.
I checked to use PDF Image Generator with EDD. In my server environment, they work well. Try to set your uploaded PDF into the featured image. If you feel insecure to set pdf file directly, you can choose “Allow to set THUMBNAIL file itself as featured image” in the optional settings of PDFIG.
thanks.
Forum: Plugins
In reply to: [PDF Image Generator] Choose to display image thumbnail or simple link.I updated 1.3 and add “Attachment Display Settings” when trying to insert PDF.
User can choose image sizes, url and title.I hope you try it.
Thanks.Forum: Plugins
In reply to: [PDF Image Generator] dynamically get attachment id ?Hi, mattegg.
I think there are mainly three ways.1. Set pdf file as featured image. The plugin allow you to use pdf as image. You just need to call the featured image like below…
echo get_the_post_thumbnail( $post->ID, 'medium' );
2. Use custom field plugin like “Advanced Custom Field”. If ACF, Make your filed name and set “File type” to “file” / “Return Value” to “File ID”. Then, you call the ID like below…
$pdf_id = get_post_meta( $post->ID, 'My_Field_Name', true ); // set your field name. if ( $thumbnail_id = get_post_meta( $pdf_id, '_thumbnail_id', true ) ) { echo wp_get_attachment_image ( $thumbnail_id, 'medium' ); }
3. If you call all PDFs that are attached to the post. You can get them by get_posts function.
$pdfs = get_posts( 'posts_per_page=-1&post_type=attachment&post_mime_type=application/pdf&post_parent='.$post->ID ); if( $pdfs ): foreach( $pdfs as $pdf ): $thumbnail_id = get_post_meta( $pdf->ID, '_thumbnail_id', true ); if( $thumbnail_id ){ echo wp_get_attachment_image ( $thumbnail_id, 'medium' ); } endforeach; endif;
Hope you try them.
Thanks.Forum: Plugins
In reply to: [PDF Image Generator] Do not replace icon in adminI uploaded the plugin to 1.2.1. and add the plugin page in ‘setting.’
You can disable some functions in there.Thank you.
Forum: Plugins
In reply to: [PDF Image Generator] Generate image for existing pdf'sI uploaded the plugin to 1.2.1. and add the plugin page in ‘setting.’
You can generate thumbnails in there.I uploaded the plugin to 1.2.1.
From this version, plugin set default link-type to media-file.
It is good for prevent careless miss.Thank you.
I’m grad you get it.
I may have to change the default setting of the plugin. Because, generally, we don’t need an attachment page link when insert a pdf thumbnail.
Thank you.
Hi Socke.
Is the thumbnail generated and does it replace the default icon?
Did you try different files or diffrent filenames?If you mean the link is to the attachment page ( ex:https://example.com/?attachment_id=1024) not to the pdf file itself, the problems may be a conflict with another plugin or your custom functions.
Could you tell me [a] and [img] tags that are put out by the editor.
Forum: Plugins
In reply to: [PDF Image Generator] Choose to display image thumbnail or simple link.Hi.
I think it’s a possible and useful update.
I’ll incorporate your idea into the future update.Thank you.
Forum: Plugins
In reply to: [PDF Image Generator] Do not replace icon in adminHi whoaloic.
pigen_change_icon() replaces a mime icon to a thumbnail in media uploader like below.
https://s.w.org/plugins/pdf-image-generator/screenshot-1.jpgI guess you mean that pdf icons doesn’t show in the static media library page.
So, I disabled pigen_change_icon only in the library page.Thanks for good feedback.
Please update the plugin.Forum: Plugins
In reply to: [PDF Image Generator] WordPress 4.2 Fatal ErrorHi stephenpasquini.
Can you give me the fatal error details?
Thanks.Forum: Plugins
In reply to: [PDF Image Generator] Display other pdf informations beside the imageHi HerveSLT.
I update the plugin to 1.1.5. And it allows you to insert [caption] shortcode into the post content area.
If you want display attachment data with a thumbnail, use img_caption_shortcode filter in your functions.php.
Here’s an example code. Customize it to your needsfunction add_attachment_data_in_caption( $empty, $attr, $content ) { $attr = shortcode_atts( array( 'id'=>'', 'align'=>'alignnone', 'width'=>'', 'caption'=>'' ), $attr ); if ( 1 > (int) $attr['width'] || empty( $attr['caption'] ) ) return ''; if ( $attr['id'] ) { $attr['id'] = 'id="' . esc_attr( $attr['id'] ) . '" '; $attachment_id = explode('_', $attr['id']); $attachment_id = $attachment_id[1];// get attachment id if( get_post_mime_type ( $attachment_id ) === 'application/pdf' ){ $attachment = get_post( $attachment_id ); $bytes = filesize( get_attached_file( $attachment->ID ) ); if ($bytes >= 1073741824) $bytes = number_format($bytes / 1073741824, 2). ' GB'; elseif ($bytes >= 1048576) $bytes = number_format($bytes / 1048576, 2). ' MB'; elseif ($bytes >= 1024) $bytes = number_format($bytes / 1024, 2). ' KB'; elseif ($bytes > 1) $bytes = $bytes. ' bytes'; elseif ($bytes == 1) $bytes = $bytes. ' byte'; else $bytes = '0 bytes'; $attr['caption'] = 'title : ' .$attachment->post_title. '<br/>' . // title 'caption : ' .$attr['caption']. '<br/>' .// caption 'size : ' .$bytes. '<br/>' . // file size 'filetype : ' .get_post_mime_type ( $attachment_id ). '<br/>' . // file type 'description : ' .$attachment->post_content. '<br/>'; // description } } return '<div ' .$attr['id']. 'class="wp-caption ' .esc_attr( $attr['align'] ). '" style="max-width: ' .( 10 + (int) $attr['width'] ). 'px;">' . do_shortcode( $content ). '<p class="wp-caption-text">' .$attr['caption']. '</p>' . '</div>'; } add_filter('img_caption_shortcode', 'add_attachment_data_in_caption', 10, 3);
Forum: Plugins
In reply to: [PDF Image Generator] Conflict with Jetpack PhotonThanks for offering donation. But not now maybe some another time.
Just because I don’t prepare for it.Anyway, I’m motivated enough by your words.
Thanks you!