News Manager blog

News Manager Addons plugin 0.4

Updated to support the post images feature in News Manager 2.5 (currently in beta)

New tokens are:

{{ post_image_url }} - full URL of the post thumbnail/image
{{ post_image }} - html code for the thumbnail/image URL (<img src="...)

If you want to override the default settings for displaying post images, you can change it (before using nm_custom_display_recent, etc.) with function nm_set_custom_image($width=null, $height=null, $crop=null, $default=null).


<?php nm_set_custom_image(100, 100); ?>
<?php nm_custom_display_recent('
   <div class="my_recent_post">
      <h4><a href="{{ post_link }}">{{ post_title }}</a></h4>
      <div class="my_image">{{ post_image }}</div>
      <span class="my_excerpt">{{ post_excerpt }}</span>
'); ?>

Cropped 200 (width) x 150 (height) images:

nm_set_custom_image(200, 150, 1);

No cropping + default image in data/uploads (for posts that don't have one):

nm_set_custom_image(200, 150, 0, 'image1.jpg');
(last parameter could also be the full image URL, 'http://....')

« Back to News Manager blog

blog comments powered by Disqus