Jump to content

Andy_M

Clients
  • Posts

    23
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Andy_M got a reaction from Cyboman in Newsletters   
    In case it's useful, here's a modified article template that I use that displays article pictures side by side on a wider screen, and then stacks them under each other on mobile. Seems to work well across all email clients I've tried.
     
    <!--[if (gte mso 9)|(IE)]> <table width="600" align="center" cellpadding="0" cellspacing="0" border="0"> <tr> <td> <![endif]--> <table class="container" width="100%" cellpadding="0" cellspacing="0"> <tr> <td style="text-align: center; vertical-align: top; font-size: 0;"> {{foreach $items as $pos => $item}} <!--[if (gte mso 9)|(IE)]> <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"> <tr> <td> <![endif]--> <div style="width: 300px; display: inline-block; vertical-align: top;"> <table width="100%" cellpadding="20"> <tr> <td style="font-size: 15px;"> {{if isset( $params['image_data'] ) && $params['image_data']['field']}} {{$imageField = $params['image_data']['field'];}} {{$image = $item->$imageField ? \IPS\File::get( $params['image_data']['extension'], $item->$imageField )->url : null;}} {{elseif $item instanceof \IPS\downloads\File}} {{$image = $item->primary_screenshot_thumb->url;}} {{elseif $item instanceof \IPS\gallery\Album\Item}} {{$image = $item->shareImage();}} {{endif}} {{if $image !== null}} <a href="{$item->url()}"> <img src="{$image}" width="300" height="175" style="width:100%;height:175px;max-width:300px;" alt="{$item->mapped( 'title' )}" title="{$item->mapped( 'title' )}"> </a> <br> {{endif}} <div style='display:inline-block;'> {{if !( $item instanceof \IPS\gallery\Image )}} <a href="{$item->url()}"><strong>{$item->mapped( 'title' )}</strong></a> <br> {{endif}} {{if $params['show_author']}} {$item->author()->name} | {datetime="$item->mapped( 'date' )" dateonly="true"} <br> {{endif}} {{if $params['show_content']}} <div style='display:inline-block;'> {{if $params['max_chars'] > 0}} {{$content = \strip_tags( $item->content() );}} {truncate="$content" length="$params['max_chars']"} {{else}} {$item->content()|raw} {{endif}} </div> {{endif}} {{if isset( $params['show_views'] ) && $params['show_views']}} {$item->mapped( 'views' )} views {{endif}} {{if isset( $params['show_comments'] ) && $params['show_comments']}} {$item->mapped( 'num_comments' )} comments {{endif}} </div> </td> </tr> </table> </div> <!--[if (gte mso 9)|(IE)]> </td><td> <![endif]--> {{endforeach}} </td> </tr> </table> <!--[if (gte mso 9)|(IE)]> </td> </tr> </table> <![endif]-->  
     
  2. Like
    Andy_M got a reaction from CheersnGears in Newsletters   
    In case it's useful, here's a modified article template that I use that displays article pictures side by side on a wider screen, and then stacks them under each other on mobile. Seems to work well across all email clients I've tried.
     
    <!--[if (gte mso 9)|(IE)]> <table width="600" align="center" cellpadding="0" cellspacing="0" border="0"> <tr> <td> <![endif]--> <table class="container" width="100%" cellpadding="0" cellspacing="0"> <tr> <td style="text-align: center; vertical-align: top; font-size: 0;"> {{foreach $items as $pos => $item}} <!--[if (gte mso 9)|(IE)]> <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"> <tr> <td> <![endif]--> <div style="width: 300px; display: inline-block; vertical-align: top;"> <table width="100%" cellpadding="20"> <tr> <td style="font-size: 15px;"> {{if isset( $params['image_data'] ) && $params['image_data']['field']}} {{$imageField = $params['image_data']['field'];}} {{$image = $item->$imageField ? \IPS\File::get( $params['image_data']['extension'], $item->$imageField )->url : null;}} {{elseif $item instanceof \IPS\downloads\File}} {{$image = $item->primary_screenshot_thumb->url;}} {{elseif $item instanceof \IPS\gallery\Album\Item}} {{$image = $item->shareImage();}} {{endif}} {{if $image !== null}} <a href="{$item->url()}"> <img src="{$image}" width="300" height="175" style="width:100%;height:175px;max-width:300px;" alt="{$item->mapped( 'title' )}" title="{$item->mapped( 'title' )}"> </a> <br> {{endif}} <div style='display:inline-block;'> {{if !( $item instanceof \IPS\gallery\Image )}} <a href="{$item->url()}"><strong>{$item->mapped( 'title' )}</strong></a> <br> {{endif}} {{if $params['show_author']}} {$item->author()->name} | {datetime="$item->mapped( 'date' )" dateonly="true"} <br> {{endif}} {{if $params['show_content']}} <div style='display:inline-block;'> {{if $params['max_chars'] > 0}} {{$content = \strip_tags( $item->content() );}} {truncate="$content" length="$params['max_chars']"} {{else}} {$item->content()|raw} {{endif}} </div> {{endif}} {{if isset( $params['show_views'] ) && $params['show_views']}} {$item->mapped( 'views' )} views {{endif}} {{if isset( $params['show_comments'] ) && $params['show_comments']}} {$item->mapped( 'num_comments' )} comments {{endif}} </div> </td> </tr> </table> </div> <!--[if (gte mso 9)|(IE)]> </td><td> <![endif]--> {{endforeach}} </td> </tr> </table> <!--[if (gte mso 9)|(IE)]> </td> </tr> </table> <![endif]-->  
     
  3. Like
    Andy_M got a reaction from Adriano Faria in Invite System   
    Perfect, thanks for the speedy responses.
  4. Like
    Andy_M reacted to Fosters in Notices - Supporttopic   
    Thanks, I have posted this in our internal tracker, we'll see if we can improve this.
  5. Like
    Andy_M reacted to Fosters in Notices - Supporttopic   
    Yes ? 
×
×
  • Create New...