main_activities mods

Post

Posted
Rating:
#6157 (In Topic #1497)
Avatar
Standard member
Terry is in the usergroup ‘Fan in action’
This may or may not be relevant at some point, but when I use main_activities to display the general member activities, the font is different than the rest of the site, and it doesn't show the picture of the member (it shows an icon of the type of activity). Here's a modified version of templates/ACTIVITY.tpl that fixes the font issue and also shows the picture of the member for that particular activity. This should not overwrite the default templates/ACTIVITY.tpl, it should only be used as a custom template for your theme.
<style>
.activities_content {
    font-family: 'Open Sans','Segoe UI',Tahoma,Verdana,Arial,Helvetica,sans-serif;
}
</style>
{+START,IF,{ALLOW_REMOVE}}
    <form id="feed_remove_{LIID*}" class="activities_remove" action="{$PAGE_LINK*,:start}" method="post" onsubmit="return s_update_remove(event,{LIID*});" autocomplete="off">
        {$INSERT_SPAMMER_BLACKHOLE}

        <input class="remove_cross" type="submit" value="{!REMOVE}" />
    </form>
{+END}

<div class="activities_avatar_box">
    {+START,IF_NON_EMPTY,{ADDON_ICON}}

{$SET,image,{$THUMBNAIL,{$?,{$IS_EMPTY,{$PHOTO,{MEMBER_ID}}},
Image

(Click to enlarge)

,{$PHOTO,{MEMBER_ID}}},{$CONFIG_OPTION,thumb_width}x{$CONFIG_OPTION,thumb_width},,,https://compo.sr/themes/default/images/no_image.png,pad,both,FFFFFF00}}
<a href="{$MEMBER_PROFILE_URL*,{MEMBER_ID}}"><img alt="" width="50" src="{$ENSURE_PROTOCOL_SUITABILITY*,{$GET,image}}" /></a>
            
    {+END}
    {+START,IF_EMPTY,{ADDON_ICON}}
        <img src="{$THUMBNAIL*,https://compo.sr/themes/default/images/icons/48x48/menu/_generic_admin/edit_one.png,36x36,,,,pad,both,#FFFFFF00}" />

    {+END}

    {+START,SET,commented_out}
        {+START,IF_EMPTY,{AVATAR}}{+START,IF_NON_EMPTY,
Image

(Click to enlarge)

}
            <img src="{$THUMBNAIL*,https://compo.sr/themes/default/images/cns_default_avatars/default.png,36x36,,,,pad,both,#FFFFFF00}" />
        {+END}{+END}
        {+START,IF_NON_EMPTY,{AVATAR}}
            <img src="{$THUMBNAIL*,{AVATAR},36x36,,,,pad,both,#FFFFFF00}" />
        {+END}
    {+END}
</div>

<div class="activities_line">
    <div class="activity_time right">
        {$MAKE_RELATIVE_DATE*,{DATETIME},1} {!AGO}
    </div>

    {+START,SET,commented_out}
        {+START,IF_PASSED,USERNAME}
            <div class="activity_name left">
                <a href="{MEMBER_URL*}">{$DISPLAYED_USERNAME*,{USERNAME}}</a>
            </div>
        {+END}
    {+END}

    <div class="activities_content">
        
        {+START,IF,{$EQ,{LANG_STRING},RAW_DUMP}}
            {+START,IF,{$EQ,{MODE},all}}
                {!ACTIVITY_SAYS,<a href="{MEMBER_URL*}">{$DISPLAYED_USERNAME*,{USERNAME}}</a>,{MESSAGE}}
            {+END}
            {+START,IF,{$NEQ,{MODE},all}}
                {MESSAGE}
            {+END}
        {+END}
        {+START,IF,{$NEQ,{LANG_STRING},RAW_DUMP}}
            
            {+START,SET,named}{+START,IF_PASSED,MEMBER_ID}{$OR,{$NEQ,{MEMBER_IDS},{MEMBER_ID}},{$EQ,{MODE},all}}{+END}{+END}

            {+START,IF,{$GET,named}}
                {!ACTIVITY_HAS,<a href="{MEMBER_URL*}">{$DISPLAYED_USERNAME*,{USERNAME}}</a>,{$LCASE,{$SUBSTR,{MESSAGE},0,1}}{$SUBSTR,{MESSAGE},1}}
            {+END}
            {+START,IF,{$NOT,{$GET,named}}}
                {MESSAGE}
            {+END}
        {+END}
    </div>
</div>

 
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

Paul D, gabriel58, MVLipwig, deepu_ms

Usergroups: 

Forum statistics:
  • 1,132 topics, 5,401 posts, 6,518 members
  • Our newest member is dangtoy
Birthdays:
Back to Top