MENU

CGBlog Admin article list usability improvements

  Previous article Next article  

As a frequent user of the CGBlog module for CMS Made Simple™, I sometimes miss the overview of planned blog articles. When planning several articles ahead you can't see which articles are actually published and which are not. Note all are marked published and so have the green check, but for some the start time is not reached. When having lots of articles that can be difficult...

I made some changes to the article list template so the date text is bold when an article is visible at the front end of the website. Ohw, and I added the time stamp to the list!

  How to use

Changing module template isn't that difficult. Just find the template file in the module folder and change the Smarty code like you want! And tadah, you fixed the problem! BUT after upgrading the module, the changes are overwritten... ugh...

CMS Made Simple module_custom to the rescue! :)

This is a core feature for changing templates (and language strings) without being afraid of losing the changes after upgrading. It is a valid way of changing the code and is not considered hacking.

Read more about customizing Admin templates at the CMSMS documentation website

1. Copy the file /modules/CGBlog/templates/articlelist.tpl to a new folder (assets)/module_custom/CGBlog/templates/articlelist.tpl

2. Around line 149 of the file you will find:

<td>{$entry->u_postdate|date_format:'%Y/%m/%d'}</td>
<td>{if !empty($entry->u_enddate)}{$entry->u_startdate|date_format:'%Y/%m/%d'}{/if}</td>
<td>
  {if $entry->expired == 1}
    <div class="important">{$entry->u_enddate|date_format:'%Y/%m/%d'}</div>
  {else}
    {$entry->u_enddate|date_format:'%Y/%m/%d'}
  {/if}
</td>

3. Change it to:

<td>
  {if ($entry->u_postdate|date_format:'%Y/%m/%d %H:%M' > $smarty.now|date_format:'%Y/%m/%d %H:%M') OR ($entry->o_status != 'published')}
    {$entry->u_postdate|date_format:'%Y/%m/%d %H:%M'}
  {else}
    <b>{$entry->u_postdate|date_format:'%Y/%m/%d %H:%M'}</b>
  {/if}
</td>
<td>{if !empty($entry->u_enddate)}{$entry->u_startdate|date_format:'%Y/%m/%d %H:%M'}{/if}</td>
<td>
  {if $entry->expired == 1}
    <div class="important">{$entry->u_enddate|date_format:'%Y/%m/%d %H:%M'}</div>
  {else}
    {$entry->u_enddate|date_format:'%Y/%m/%d %H:%M'}
  {/if}
</td>

Save the file and open the CGBlog Admin page and you are ready to go!




Buy Me A Coffee


  Comment Form

ReviewManager

Click here to open the form

ReviewManager

  0 Comments

No comments yet...

Buy Me A Coffee

CMS Made Simple - Tutorials, Tips and Tricks - CMSMS

CGBlog Admin article list usability improvements

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 2.2.19
  Last updated: 23-06-2018
  Comments: 0
  http://cms.ms/9hET


Buy Me A Coffee




Advertisement


Ads help me to help you! Thanks!

Ads help me to help you! Buy products from these advertisers!