Resource icon

Add Avatar to Quote 1.0.0

No permission to download
  • Thread starter Thread starter ragtek
  • Start date Start date
R

ragtek

Guest
ragtek submitted a new resource:

Add Avatar to Quote (version 1.0.0) - Adds the quoted users avatar to the quote

This is a co-production from Qwk86gn and me:)

It will add the quoted users avatar into the quote block.


Attention!
This addon will add an db query for each quoted user!
e.g. if you have 20 quotes on the page with 6 people being quoted, it will add 6 queries to fetch their avatars.

Read more about this resource...
 
Is the database query for each user because of the problem with users who have no avatar?

I worked on this with Qwk86gn originally, and I didn't have time anyway, but wasn't keen on it because users with no avatar showed up as a broken image. I thought about a database query but then I thought about my own board where I have 40 posts per page. Even if half of them were unique quotes, that's 20 extra database queries.

I was hoping there'd be another solution, but apparently not :(

Good work on finishing it though (y)
 
I was hoping there'd be another solution, but apparently not :(
There are several ways, but i hadn't time to implement one of them^^

My plan is to create an own template helper fot the avatar problem (i needed this also in several other addons, so it will become probably a seperate product)

ATM the xenforo avatar helper isn't returning the right output, if the user data, which he recives are no "full user array, containing ALL the necessary" data (e.g avatar date, avatar size, gravatar mail, gender)

My idea is to let the avatar helper fetch the data, if he needs it (it needs also to include some way of caching)
 
I take it this is new quotes only, not quotes present before this addon?
I have my site set to 10 threads per page so it isn't as big a deal to have the extra queries for a small number of quotes per page - at least ATM.

Thanks for the add on.

edit: not working on new quotes. I didn't see any template edits involved.
edit2: working in default style but not other styles (Whisper2 is my site default)
edit3: working in all styles but Whisper2 (at my site)
 
edit: not working on new quotes. I didn't see any template edits involved.
edit2: working in default style but not other styles (Whisper2 is my site default)
edit3: working in all styles but Whisper2 (at my site)
lol


edit4?:D

so it's working with all, only with whisper2 not?
 
could you check if it's activated for the style?
acp => Appearance => Style Properties => BB Code Elements => Settings
 
woOT! That did it.

So this one style didn't turn it on?

Thank you!!!!
seems so:(
Can't say, why it happened and don't want to start bugtracking, most important thing is, that it's working:D
 
Its not a border, it is a background of the container holding the avatar.

Code:
.bbCodeQuote img
{
    background: none !important;
}

That eliminates it, or you can specify a color. Add that to your EXTRA.css template.
 
Its not a border, it is a background of the container holding the avatar.

Code:
.bbCodeQuote img
{
    background: none !important;
}

That eliminates it, or you can specify a color. Add that to your EXTRA.css template.

Is that for the white border that appears in the Camo style above the gradient?
 
If you have a look at the last pic Melbo posted it's the Camo style. Above the avatar there's a white line across the top of the quote box, this doesn't appear when the addon's disabled.
 
That is most likely because the gradient being used is a certain height. Only thing you can try is to reduce the padding for the header.

Code:
.bbCodeBlock .type
{
    padding-top: 8px !important;
}

Add that to the EXTRA.css, you may have to lower it a bit more.
 
What original are you talking about? The only other avatar for a quote that I know of is the one where the avatar is displayed beside the quote with an arrow pointing to it. I could never get that one to look exactly like I wanted, thus this add-on.
 
What original are you talking about? The only other avatar for a quote that I know of is the one where the avatar is displayed beside the quote with an arrow pointing to it. I could never get that one to look exactly like I wanted, thus this add-on.
yea thx once again for the addon code:)

it's really a nice addon idea, which we're going to use for "our" boards...
so i'm sure it will get soon the final optimization to reduce the queries ( http://xenforo.com/community/threads/add-avatar-to-quote.34843/#post-395676 )


i'm somebody who prefers to have at least 20 - 50 posts per page when viewing the threads, so it would be a no go for me, to add so many queries to the "most important" forum page (thread view)
 
Top Bottom