• 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

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);
}

Maybe the mod maker will add this the the mod. Looks great!
 
Hey Brogan thanks alot!

Just need more help with another tweak!

screen-capture-9.webp

Check out the screenshot above, the "arrow" pointing to the avatar of the person being quoted is colored slightly darker (darker in grey).

Is it possible to make the arrow the same color as the rest of the header of the quote (which is lighter grey in this case)?

Take for example the user info box, the arrow is the same color (white) as the rest of the box background. Thus the arrow does not seem so "out of place". Rather it looks more sleek and cohesive.
screen-capture-10.webp
 
Very nice modification!
Why isn't gravatar working though?
Also I noticed the avatars have kinda bad quality....
Any way to fix this?
sdf.webp
Thanks in advance.
 
Hi Brogan, I can't get nested quotes to work with the code you recently posted in this thread. What am I doing wrong? The single quote does work.
 
I got it to work. Another question which I believe has been answered before. How come the generic avatar does not show up in the quotes?
 
I've recently had the problem appear that the quoted avatar is an older version of an author's avatar. Is that a caching issue? It isn't consistent with members, some member's quotes have older avatars, some have the "current" avatar.

See attached, "Trouble" has a current avatar of his face, but when quoted by somebody, his old avatar is displayed.

EDIT to add: It appears to be a caching issue. Forcing a refresh resolves the problem.
 

Attachments

  • quote_with_avatar_bug.webp
    quote_with_avatar_bug.webp
    71 KB · Views: 24
Top Bottom