carryoncoding
Forum Replies Created
-
Thanks for that steer. I’ll ensure the cache plugin is deactivated.
I see this is marked as “resolved”, rather than merely “closed”. I can’t see any reference to a fix. Has it it just been left unresolved?
I have a similar situation but I’ll start a new thread.
Thanks,
Phil.Forum: Plugins
In reply to: [Memphis Documents Library] Remove old library docsNo worries.
Thanks for getting back to me.
All the best,
Phil.Forum: Plugins
In reply to: [Memphis Documents Library] Remove old library docsMany thanks for getting back in touch.
I spotted the Batch delete feature but I can only see how to delete documents that I have previously “ticked” manually.
Can you explain how to use the mDocs Batch Delete feature to remove all mDocs Posts dated before 1 Jan 2017?
Thanks again.
Phil.Forum: Plugins
In reply to: [Memphis Documents Library] Locate doc in mDocs library – how?That’s great, thanks. I’ll watch out for future releases!
Kind regards,
Phil.Could I add a “me too” to this?
The ability to expire posts for a particular category would be really useful.
Many thanks,
Phil.Forum: Plugins
In reply to: [Default Featured Image] Need DFI on one CPT only but appearing on postsThanks Jan, you are absolutely right, that is exactly what I was doing!
Thank you for correcting my setup.
Kind regards,
Phil.Forum: Plugins
In reply to: [Simple Download Monitor] Use thumbnail as linkVery many thanks for all your help. I was able to take the work you shared and create the required appearance and function.
Here is the final version based upon your example and using knowledge gained from sdm-fancy-2.php
// SDM filter to make thumbnail clickable add_filter('sdm_download_fancy_2_thumbnail', 'custom_fancy2_thumb_output', 10, 2); function custom_fancy2_thumb_output($thumb_output, $args){ $download_id = $args['id']; $download_thumb_url = get_post_meta($download_id, 'sdm_upload_thumbnail', true); $thumb_output = '<a href="' . $homepage . '/?smd_process_download=1&download_id=' . $download_id . '" target="_blank">' . '<img src="' . $download_thumb_url . '" class="sdm_fancy2_thumb_image" />' . '</a>'; return $thumb_output; }
Please note that I had to correct “get_post_meta($id as that needed to be $download_id. I also needed to change class=”sdm_download_thumbnail_image” into class=”sdm_fancy2_thumb_image”.
I noticed that $window_target wasn’t visible from within the filter code so had to hardwire the target=”_blank”. I’m sure this could be improved but it seems to work fine!
Thanks again.
Phil.Forum: Plugins
In reply to: [Simple Download Monitor] Use thumbnail as linkThanks for taking this forward – I’m sure it will make SDM even more useful than it already is!
Have you documented the new filters at all or can you point me to where I can see how to use them?
Thanks,
Phil.Forum: Plugins
In reply to: [Simple Download Monitor] Use thumbnail as linkJust following up your direction to “Write the full code for how you want the output to look “. I have achieved the required display by modifying the output as follows:
In file includes/templates/fancy2/sdm-fancy-2.php. from line 144 onwards:
$output = ''; $output .= '<div class="sdm_fancy2_item ' . $css_class . '">'; $output .= '<div class="sdm_fancy2_wrapper">'; $output .= '<div class="sdm_fancy2_download_item_top">'; // Next line modified to put url around image. //$output .= '<div class="sdm_fancy2_download_thumbnail">' . $isset_download_thumbnail . '</div>'; $output .= '<div class="sdm_fancy2_download_thumbnail">' . '<a href="' . $download_url . ' target="' . $window_target . '">' . $isset_download_thumbnail . '</a></div>'; $output .= '</div>'; //End of .sdm_download_item_top $output .= '<div class="sdm_fancy2_download_title">' . $item_title . '</div>';
So should this code now be moved into the filter in functions.php or does more code have to be copied across?
Forum: Plugins
In reply to: [Simple Download Monitor] Use thumbnail as linkThat’s awesome. Thanks so much for filling this gap. I think we’ll find a lot of use for the new filter. I look forward to the next release.
Kind regards,
Phil.Forum: Plugins
In reply to: [Simple Download Monitor] Use thumbnail as linkNo worries. Thanks very much – looking forward to resolving.
All the best,
Phil.Forum: Plugins
In reply to: [Simple Download Monitor] Use thumbnail as linkHaha! Now we’re going full-circle. Thank you for pointing me to your comments about php tweaks but you’ll note I already referred to them above.
I note your comments but I can’t see how to apply these requirements as a filter in this case.
Kind regards,
Phil.Forum: Plugins
In reply to: [Simple Download Monitor] Use thumbnail as linkHappy to give it a try.
I’m comfortable adding theme files to a child-theme but how would this work with a plugin file?Forum: Plugins
In reply to: [Simple Download Monitor] Display sdm posts in search results templateCan I ask for some further assistance with this?
Ideally, I would like the grid of search results to look similar to the grid of past-issues. Past issues shows the post title under each image, but the search results show the filename of the download.
So instead of “April May 2008” you get “April May 2008 magazine”. Is this to do with the test for parent again?
The code currently looks like this:
<div class="sdm_fancy2_item sdm_fancy2_grid"> <!-- Added the test for parent - Thanks Ben@Kadence --> <?php global $post; if( $post->post_parent ) { $parent_ID = wp_get_post_parent_id($post->ID); $item_download_thumbnail = get_post_meta($parent_ID, 'sdm_upload_thumbnail', true); } else { $item_download_thumbnail = get_post_meta($post->ID, 'sdm_upload_thumbnail', true); } if ( $item_download_thumbnail ) { ?> <div class="sdm_fancy2_wrapper"> <div class="sdm_fancy2_download_item_top"> <div class="sdm_fancy2_download_thumbnail"> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <img src="<?php echo $item_download_thumbnail; ?>" alt="<?php the_title_attribute(); ?>"> </a> </div> </div> <?php } ?> <div class="sdm_fancy2_download_title"> <a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a> </div> </div> </div> <!-- end of .sdm_fancy2_item -->
Any thoughts welcome,
Phil.- This reply was modified 6 years, 4 months ago by carryoncoding.