View Full Version : Having Avatars display in CMS articles ?
mikeinjersey
08-11-2011, 04:53 PM
hello, is there a way to have our Avatars to display in our CMS articles.. even if it's in a minimized version ?
if not, maybe there's already a mod out there for it ?
thx much in advance.
Lynne
08-12-2011, 03:12 PM
If you look at the vbcms_content_article_page template, you'll see the avatar code is commented out. Remove the lines that comment it out and then modify the code to suite your needs (add css to make the avatar smaller, or move the avatar code to where you want it).
mikeinjersey
08-12-2011, 07:32 PM
Thanks Lynn, but commenting out using vBulletin templates is different than pure php files. I've never had to comment out in a vbulletin template before.
so i'm having a little issue..
I believe I found the right area in the file -
<vb:comment>
<vb:if condition="$showuser">
<div>
<a href="{vb:link member, {vb:raw userid}}"><img src="{vb:raw vboptions.bburl}/image.php?{vb:raw session.sessionurl}u={vb:raw userid}&type=profile" alt="" class="post_avatar" /></a>
</div>
</vb:if>
</vb:comment>
I removed <vb:comment> and </vb:comment> ...cleared cache..but no difference.
Did I do it right ? I'm guessing no.
Lynne
08-12-2011, 11:42 PM
Well, what you did is exactly what I did and it works fine for me on my test site. Looking at the url, it looks like that would only work if you store the avatars in the database (iirc). Where do you store your avatars?
mikeinjersey
08-13-2011, 12:17 AM
yup, in the database as well.
still no avatars displaying...maybe I need to ask the vbSEO dudes...since the paths seem different.
--------------- Added 1313248221 at 1313248221 ---------------
disabled vbSEO and still no good.
are we sure this is all that's needed to display avatars next to or CMS articles -
<vb:if condition="$showuser">
<div>
<a href="{vb:link member, {vb:raw userid}}"><img src="{vb:raw vboptions.bburl}/image.php?{vb:raw session.sessionurl}u={vb:raw userid}&type=profile" alt="" class="post_avatar" /></a>
</div>
</vb:if>
the avatars display fine if people post a comment on the article...but just the main article starter's avatar doesn't display.
brandondrury
09-10-2011, 05:57 PM
I store my avatars using the filesystem. What I need to change?
I've tried:
<img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
</div>
and
<img src="{vb:raw avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw username}}" />
</div>
Thanks!
Brandon
mikeinjersey
09-10-2011, 06:51 PM
dude, after going back & forth with tech support on the subject for like a week...they finally told me that only the 'profile pics' (not avatars) display as images next to your name in CMS articles...
So you probably gotta enable profile pics for it to work.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.