[Solved] Thumbnails on news module.

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
luya
Forum Members
Forum Members
Posts: 91
Joined: Wed Jan 23, 2013 1:34 am

[Solved] Thumbnails on news module.

Post by luya »

Greetings,
I am designer working on a web magazine. CMS Made Simple is 1.11.4 using the latest News module. I would like to put a thumbnail inside the news_summary sample (based on Simplex theme) but I cannot find a smarty that does that behaviour. For example,

Code: Select all

 <section class='news-article'>
        <header>
            <h2><a href='{$entry->moreurl}' title='{$entry->title|cms_escape:htmlall}'>{$entry->title|cms_escape}</a></h2>
            <img src="{page_image}" alt="{$entry->title|cms_escape:htmlall}"/>
            <div class='meta cf'>
                <time class='date' datetime='{$entry->postdate|date_format:'%Y-%m-%d'}'>
                    <span class='day'> {$entry->postdate|date_format:'%d'} </span>
                    <span class='month'> {$entry->postdate|date_format:'%b'} </span>
                </time>
                <span class='author'> {$author_label} {$entry->author} </span>
                <span class='category'> {$category_label} {$entry->category}</span>
            </div>
        </header>
Any pointer will be appreciated.

Thank you.
Last edited by luya on Wed Mar 20, 2013 4:36 am, edited 1 time in total.
User avatar
manuel
Power Poster
Power Poster
Posts: 350
Joined: Fri Nov 30, 2007 9:15 am

Re: Thumbnails on news module.

Post by manuel »

Dear luya,

Add a field definition to your news articles:
News > Field Definitions > Add Field Definition
Select "File" as the type
Activate the "Public" checkbox

Now you can upload an image with every news article.

To create thumbnails (or other sized images) from those images you can use CGSmartimage (> module that needs to be installed).

Your CGSmartImage tag will be something like this: (replace "test" with your Field Definition name)

Code: Select all

{CGSmartImage filter_croptofit="75,64,c" quality='65' src="{$entry->file_location}/{$entry->fieldsbyname.test->value}"}
Greetings,
Manuel
Do you like your open source cms? Buy from the CMSMS partners || Donate
kreo
Forum Members
Forum Members
Posts: 27
Joined: Sat Aug 06, 2005 10:08 am

Re: Thumbnails on news module.

Post by kreo »

Thank you manuel
I had the same problem.
luya
Forum Members
Forum Members
Posts: 91
Joined: Wed Jan 23, 2013 1:34 am

Re: Thumbnails on news module.

Post by luya »

Thank you for your suggestion, Manuel.
Few issues,
- After creating a field definition, I had to manually reload Article section to preview the thumbnail. In addition, there are no indication the image is attached. It would be nice if that uploading image as part of headline for article was enabled by default.
- In addition, what would be the way to include a short description (alt in <img /> for the attached thumbnail?

Code: Select all

{CGSmartImage filter_croptofit="75,64,c" quality='65' src="{$entry->file_location}/{$entry->fieldsbyname.test->value}"}
Again thank you.
uniqu3

Re: Thumbnails on news module.

Post by uniqu3 »

In the CGSmartImage tag add alt=$entry->title which will add alt tag with title of your article.
luya
Forum Members
Forum Members
Posts: 91
Joined: Wed Jan 23, 2013 1:34 am

Re: Thumbnails on news module.

Post by luya »

uniqu3 wrote:In the CGSmartImage tag add alt=$entry->title which will add alt tag with title of your article.
Thank you uniqu3. I learned new stuff everyday.
User avatar
manuel
Power Poster
Power Poster
Posts: 350
Joined: Fri Nov 30, 2007 9:15 am

Re: Thumbnails on news module.

Post by manuel »

Further customization: ;D

I'm using CGBlog in this example but it should be easy enough to change it to work with the news module.

Create a new file:
module_custom/CGBlog/templates/editarticle.tpl

Code: Select all

{include file='file:/home/*********/public_html/modules/CGBlog/templates/editarticle.tpl' assign='capturedtemplate'}


{*THE IMAGE STUFF DOESN'T TAKE EFFECT WHEN USERS PRESS APPLY SO I JUST DISABLE THE BUTTON*}
{capture assign="disableapply1"}value="Apply" type="submit"{/capture}
{capture assign="disableapply2"}value="Apply" type="submit" disabled{/capture}


{*MAKE SURE $custom_fields.1 MATCHES THE FIELD DEFINITION THAT HANDLES YOUR IMAGE*}
{if $custom_fields.1->value}

  {*REMOVE BROWSE*}
  {capture assign="disablebrowse1"}<input type="file" class="cms_browse" name="m1_customfield_1" size="40" maxlength="255" \/>{/capture}

  {*ADD THUMB*}
  {capture assign="imgthumb1"}m1_delete_customfield\[1\]" value="delete" \/>{/capture}
  {capture assign="imgthumb2"}m1_delete_customfield[1]" value="delete" /><br>{CGSmartImage filter_croptofit="100,100,c,upscale" quality='75' src="{$custom_fields.1->fileurl_base}/{$custom_fields.1->value}"}{/capture}
{/if}


{$capturedtemplate|regex_replace:"/($disableapply1)/":"$disableapply1"|regex_replace:"/($disablebrowse1)/":""|regex_replace:"/($imgthumb1)/":"$imgthumb2"}
Some remarks:
if you change the order of your field definitions you will need to change $custom_fields.1 accordingly...

The News module doesn't have a field definition for images only so you should probably add a check to verify the user has uploaded an
image before sending it to CGSmartimage

The News module doesn't actually remove the uploaded files when a user "deletes" them (CGBlog does remove them correctly)

Greetings,
Manuel
Do you like your open source cms? Buy from the CMSMS partners || Donate
luya
Forum Members
Forum Members
Posts: 91
Joined: Wed Jan 23, 2013 1:34 am

Re: Thumbnails on news module.

Post by luya »

Thank you manuel for this code.
What is the difference betweek CGBlog and news module?
On a side note, I hit a bug with the news module not properly rendering the css, only plain text.
luya
Forum Members
Forum Members
Posts: 91
Joined: Wed Jan 23, 2013 1:34 am

Re: Thumbnails on news module.

Post by luya »

luya wrote:

Code: Select all

{CGSmartImage filter_croptofit="75,64,c" quality='65' src="{$entry->file_location}/{$entry->fieldsbyname.test->value}"}
I have another issue. The src part does not allow to use the existing uploaded images. What will be the right code to do to so?
User avatar
manuel
Power Poster
Power Poster
Posts: 350
Joined: Fri Nov 30, 2007 9:15 am

Re: Thumbnails on news module.

Post by manuel »

Dear Luya,

First verify if {$entry->file_location}/{$entry->fieldsbyname.test->value} produces a correct URL.

If it does, you could try one of these:

Code: Select all

{CGSmartImage filter_croptofit='75,64,c' quality=65 src="`{$entry->file_location}/{$entry->fieldsbyname.test->value}`"}
or

Code: Select all

{capture assign=something}{$entry->file_location}/{$entry->fieldsbyname.test->value}{/capture}
{CGSmartImage filter_croptofit='75,64,c' quality=65 src="{$something}"}
Greetings,
Manuel
Do you like your open source cms? Buy from the CMSMS partners || Donate
luya
Forum Members
Forum Members
Posts: 91
Joined: Wed Jan 23, 2013 1:34 am

Re: Thumbnails on news module.

Post by luya »

The provided code worked but generated this result

Code: Select all

<img src="data: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DHrF+C4oorUgRfD+nSxMzQkEHHDkVRk8P2WTgSLj0f/GiilZBcytQ0uG1UtG8hx2JH+FZw+9+tFFQy0TngVE4GOlFFIZExx+AooooGj//Z" width="296" height="180" alt="Asians in Fashion | Two Asians Chosen as Finalists for 2013 H&M Design Award"/>
Is there a way to render the tag pretty? What will be a better method to use images from /uploads folders?

Regards,
Luya
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Thumbnails on news module.

Post by calguy1000 »

Why would you want to change it?

data uri's are actually 'better' in most cases than linking to an image.... it's faster for your users. Unless the images are 'huge'.... which they are not (296x180)
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
luya
Forum Members
Forum Members
Posts: 91
Joined: Wed Jan 23, 2013 1:34 am

Re: Thumbnails on news module.

Post by luya »

calguy1000 wrote:Why would you want to change it?

data uri's are actually 'better' in most cases than linking to an image.... it's faster for your users. Unless the images are 'huge'.... which they are not (296x180)
I never used data uri until recently. The long text appeared confusing at first, it seems the benefit outweighs the disadvantages after researches. I wonder if there is a way to shorten this data uri. If not, I will leave as it is.
User avatar
manuel
Power Poster
Power Poster
Posts: 350
Joined: Fri Nov 30, 2007 9:15 am

Re: Thumbnails on news module.

Post by manuel »

Dear luya,

There is no way to shorten that.
If someone looks at your code they will be impressed that you are using that rather than thinking how ugly it looks ;)

Greetings,
Manuel
Do you like your open source cms? Buy from the CMSMS partners || Donate
cb2004
Power Poster
Power Poster
Posts: 315
Joined: Wed Jul 04, 2007 3:39 pm

Re: Thumbnails on news module.

Post by cb2004 »

As said that is better, but if it annoys you just use noembed='1'.
Post Reply

Return to “CMSMS Core”