How to Add a Backend Preview Thumbnail for Image Fields in Your CMS Made Simple News Modules

If you want to have a nice backend preview of the uploaded images in your CMS Made Simple news entries, you need to do the following:

1. Create a new Field Definition named “Image” and type File in News Module:

2. Create a new folder structure in your CMSMS root directory called “module_custom/News/templates” like this:

3. Copy “editarticle.tpl” from modules/News/templates over to our new templates folder.

4. Find this code:

{if isset($custom_fields)}
  {foreach from=$custom_fields item='field'}
    <div class="pageoverflow">{$field->prompt} {$field->field}</div>
  {/foreach}
{/if}

And replace it with this one:

{if isset($custom_fields)}
  {foreach from=$custom_fields item='field'}
    {$field->prompt}{$field->field}
    {if $field->prompt == "Image"}
        {if $smarty.get.m1_articleid}<br/><img width="100" src="../uploads/news/id{$smarty.get.m1_articleid}/{$field->field|replace:"&nbsp;<input":"\"/><!--"} -->
        {/if}
    {/if}
  {/foreach}
{/if}

Now, the uploaded image will be displayed in a small size below the upload field!

This concludes how to add a backend preview thumbnail for your image fields in your CMS Made Simple news modules.

Looking for quality CMS Made Simple Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , , , , , , , , | Posted under CMS Made Simple | RSS 2.0

Author Spotlight

Nic Bug

Nic Bug

I am a freelance web designer from Germany and CMS Made Simple is my every day tool. I have been using it since 2007 and I love it because it’s so easy to use. Even my clients understand and use it daily. I also have my own CMS Made Simple project called www.TemplateMadeSimple.com. There, you will find premium templates for made for CMS Made Simple.

Leave a Reply

Your email address will not be published. Required fields are marked *


5 × = 40

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>