• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Quotes with avatars

I don't know is it really bad to show igonred user avatar. If people do not want to see these avatars I'll update the instruction.
 
Well, the quoted text isn't shown, so the avatar just shows up by itself. Just a minor issue.
Sheryl on ignore
sheryl_on_ignore.webp

Sheryl not ignored:
sheryl_unignored.webp
 
I changed the layout and feel it works much better this way.

nested.webp

Having said that, no-one uses nested quotes on my site, they're happy to use separate quoting.
 
Brogan, did you change the code from before or is that the same result from your previous shared code?
 
Do you mind sharing your code? Even though nested quotes aren't used very often, I'd like to have it look good in the event that it is used :)
 
I spoke with Mike today about this and he had a play around with the code.

Unfortunately it doesn't look like it's possible to show the default avatar for those who haven't uploaded one without some additional php code.
Specifically an avatar.php file that can handle everything with only a user ID.
that seems to be an issue with several small addons too (for example 'likes given'), would be nice if this can be solved by XF generally
 
I don't mind if you want to share a code with community. :)

However the code in the first post should work fine with nested quotes.
Thanks :). I originally used your code and agree it works fine with nested quotes.

To stop the PMs though, this is mine:

This is my bb_code_tag_quote template:
Code:
<xen:require css="bb_code.css" />
 
<xen:if is="{$attributes.member}">
<div class="{xen:if $ignored, 'ignored'}">
</xen:if>
 
<xen:if is="{$attributes.member}">
    <xen:set var="$avaUser.user_id">{$attributes.member}</xen:set>
    <xen:set var="$avaUser.username">{$nameHtml}</xen:set>
    <xen:set var="$avaUser.avatar_date">1</xen:set>
    <xen:avatar user="$avaUser" size="s" class="QuoteAvatar" />
</xen:if>
 
<xen:comment><!-- content is escaped via parser --></xen:comment>
<div class="bbCodeBlock bbCodeQuote{xen:if $ignored, ' ignored'}{xen:if  $attributes.member, ' hasAvatar'}"{xen:if $nameHtml, ' data-author="{$nameHtml}"'}>
    <aside>
        <xen:if is="{$nameHtml}">
            <div class="attribution type">{xen:phrase x_said, 'name={xen:raw $nameHtml}'}:
                <xen:if is="{$source}">
                    <a href="{xen:link 'goto/{$source.type}', '', 'id={$source.id}'}#{$source.type}-{$source.id}" class="AttributionLink">&uarr;</a>
                </xen:if>
            </div>
        </xen:if>
        <blockquote>{xen:raw $content}</blockquote>
    </aside>
    <span class="arrow"></span>
</div>
 
<xen:if is="{$attributes.member}">
</div>
</xen:if>

This is in EXTRA.css:
Code:
/* Avatars for quotes */
body .messageText .QuoteAvatar {
float: left;
margin: 0;
padding: 0;
box-shadow: none;
}
 
.messageText .bbCodeQuote.hasAvatar {
margin-bottom: 10px;
margin-left: 68px;
position: relative;
box-shadow: none;
}
 
.messageText .bbCodeQuote.hasAvatar .arrow {
border-radius: 0;
height: 20px;
width: 10px;
position: absolute;
left: -11px;
top: 2px;
overflow: hidden;
}
 
.messageText .bbCodeQuote.hasAvatar .arrow:after {
content: " ";
background: @bbCodeQuote.border-color;
height: 9px;
width: 9px;
top: 5px;
left: 5px;
position: absolute;
box-shadow: none;
transform: rotate(45deg);
-ms-transform: rotate(45deg);
}
 
Back
Top Bottom