XF 2.2 Activity summary email styling

Mouth

Well-known member
Now here's an example of a really appealing and KISS email ...

Screen Shot 2020-09-10 at 09.29.27.webpScreen Shot 2020-09-10 at 09.29.49.webp

I haven't tried looking at the activity_summary templates yet, but I hope it's possible to strip out a lot of the distracting and unnecessary displayed meta data (eg. author, date/time, replies, forum, read more button/hyperlink) and achieve something like this.
 
Now here's an example of a really appealing and KISS email ...



I haven't tried looking at the activity_summary templates yet, but I hope it's possible to strip out a lot of the distracting and unnecessary displayed meta data (eg. author, date/time, replies, forum, read more button/hyperlink) and achieve something like this.
It is, I've done it.
 
acivity_summary remove stats table, take out this

Code:
<xf:if is="$displayValues">
    <xf:macro template="activity_summary_macros" name="outer_header"
        arg-title="{{ phrase('summary_of_what_you_missed_recently') }}" />

    <xf:set var="$content">
        <table border="0" width="100%" cellpadding="0" cellspacing="0" class="statsContainer">
            <tr>
                <td class="statsGroup" align="center">
                    <xf:foreach loop="$displayValues" value="$value" if="$value.value != 0">
                        <div class="stat">
                            <table border="0" width="100%" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td class="stat-label" align="center">{$value.label}</td>
                                </tr>
                                <tr>
                                    <td class="stat-value" align="center">{$value.value|number_short}</td>
                                </tr>
                            </table>
                        </div>
                    </xf:foreach>
                </td>
            </tr>
        </table>
    </xf:set>

    <xf:macro template="activity_summary_macros" name="block"
        arg-content="{$content}" />
</xf:if>

activity_summary_latest_posts remove timestamp:

Code:
&middot; {{ date_time($post.post_date) }}

activity_summary_latest_threads remove more guff:

Code:
&middot; {{ date_time($thread.post_date) }} &middot; {{ phrase('replies:') }} {$thread.reply_count|number_short}

I also removed the logo from ACTIVITY_SUMMARY_CONTAINER as it looked wrong on emails that don't show content:

remove a this:

Code:
<xf:if is="property('emailPublicLogoUrl')">
                        <a href="{{ link('canonical:index') }}"><img src="{{ base_url(property('emailPublicLogoUrl'), true) }}" alt="{$xf.options.boardTitle}" /></a>
                    <xf:elseif is="property('publicLogoUrl')" />
                        <a href="{{ link('canonical:index') }}"><img src="{{ base_url(property('publicLogoUrl'), true) }}" alt="{$xf.options.boardTitle}" width="{{ property('publicLogoWidth') ?: '' }}" height="{{ property('publicLogoHeight') ?: '' }}" class="{{ property('publicLogoUrl')|to_lower|substr(-4) == '.svg' ? 'logo-svg' : '' }}" /></a>
                    <xf:else />
                        <a href="{{ link('canonical:index') }}">{$xf.options.boardTitle}</a>
                    </xf:if>

Then put the board titile back in the same place

Code:
<a href="{{ link('canonical:index') }}">{$xf.options.boardTitle}</a>

This seems to work for me I can't guarantee it is ideal. I just did it via trial and error, edit a bit then send test email
 
Thanks, @Mr Lucky! This is already a vast improvement and gives us a good idea on where to look to keep making tweaks. I really love the simplicity of the email @Mouth posted and would love to see if we can work our way towards that.
Yes it really is a case of trial and error. I took a bit out and if the template didn'tb throw an error when saving I'd send a test email. Kept taking bits out that way until I got what I wanted. As I don't want the logo because so many people have content not showing for spam reasons, I will eventually get round to styling some text instead.
 
Back
Top Bottom