Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Sender Avatar In Private Message List Details »»
Sender Avatar In Private Message List
Version: 1.00, by .Tim .Tim is offline
Developer Last Online: Mar 2013 Show Printable Version Email this Page

Category: Private Messages Enhancements - Version: 3.6.4 Rating:
Released: 09-23-2006 Last Update: 09-24-2006 Installs: 87
Uses Plugins Template Edits
 
No support by the author.

I've seen a few requests for it and wanted it myself, I spent a lot of time on it and then realized I wasted a lot of time and it was actually quite simple. Now this works whether you store your avatars in the filesystem or database.

Upload the plugin. Then:

In your pm_messagelistbit template find:

Code:
<if condition="$show['pmicons']"><td class="alt2"><if condition="$show['pmicon']"><img src="$pm[iconpath]" alt="$pm[icontitle]" /><else />&nbsp;</if></td></if>
And replace it with:

Code:
<if condition="THIS_SCRIPT!='usercp'"> <if condition="$sk_avurl"><td class="alt2" width="80"><img src="$sk_avurl[0]" width="60" /></td><else /><td class="alt2" width="60"><img src="images/misc/noavatar.gif" width="60" border="0" /></if></td></if> </if>

You'll be replacing the post icon that shows up between the status icon and the message itself.

If your board allows users to not have an avatar and you're getting red x's on some, do this:
https://vborg.vbsupport.ru/showpost....1&postcount=26

Credit to:
TruthElixirX, Tralala, nevetS and Lionel
For their help. Thanks.

PS This hack is compatible with 3.7

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 02-06-2007, 06:25 PM
mamashid mamashid is offline
 
Join Date: Jan 2007
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xman_79 View Post
My solution is :
Replace in pm_messagelistbit template :
PHP Code:
    <if condition="$show['pmicons']"><td class="alt2"><if condition="$show['pmicon']"><img src="$pm[iconpath]alt="$pm[icontitle]/><else />&nbsp;</if></td></if> 
with
PHP Code:
<if condition="$sk_avurl"><td class="alt2" width="80"><img src="$sk_avurl[0]width="80" /></td><else /><td class="alt2" width="80"><img src="images/no_avatar.jpg" width="80" border="0" /></if></td></if> 
Create a image :
Width 80 and height 80
name : no_avatar.jpg
location : vb/images

and result :
Still the X, what else can I do?
Reply With Quote
  #53  
Old 02-11-2007, 09:01 PM
Tralala's Avatar
Tralala Tralala is offline
 
Join Date: Jan 2006
Posts: 1,207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TruthElixirX View Post
I seem to be encountering a strange problem. If a user goes to their User CP and sees the private message bit (if the PM is brand new and unread), the avatars don't show up. I'm not sure why.

Here is a screenshot of what I mean (ignore the header at the top, it was already fixed.)
Likewise, when I apply the edit offered up here, in order to use the "noavatar.gif" graphic for members that have no avatar, I get that graphic in the private message bit of the UserCP, even if the sender does, in fact, have an avatar:


This tells me that it should work properly. I just would rather have it show the sender's actual avatar in that spot, not a blank space, or worse, this "noavatar.gif" graphic.

Quote:
Originally Posted by TruthElixirX View Post
I tried duplicating the plug-in that is used in private_messagelist_messagebit and put it in usercp_pmbit.
I did the same, and now see an avatar... but it's not the correct avatar from the sender. It's the avatar of a completely different forum member. Color me confused (and stumped.)
Reply With Quote
  #54  
Old 02-16-2007, 03:56 PM
Tralala's Avatar
Tralala Tralala is offline
 
Join Date: Jan 2006
Posts: 1,207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tralala View Post

This tells me that it should work properly. I just would rather have it show the sender's actual avatar in that spot, not a blank space, or worse, this "noavatar.gif" graphic.
At the very least I'd like to remove the avatar field from the "new PM" in the UserCP view entirely.

It kinda sucks that enabling it for the Private Messages page also makes it appear here, and that it appears incorrectly to boot. Looks great in the PM box, though. So, any clues on separating these two so it doesn't look so wrong/bad in the UserCP?
Reply With Quote
  #55  
Old 02-17-2007, 05:01 AM
Trana Trana is offline
 
Join Date: Apr 2005
Posts: 604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Some of my users still receive the following error message when viewing their PMs:

Quote:
Invalid SQL:

SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(customavatar.userid) AS hascustom, customavatar.dateline,
customavatar.width, customavatar.height
FROM user AS user
LEFT JOIN avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.userid = cc;

MySQL Error : Unknown column 'cc' in 'where clause'
Any ideas?
Reply With Quote
  #56  
Old 02-18-2007, 12:53 PM
anywares anywares is offline
 
Join Date: Dec 2006
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work on vB 3.6.4?
Reply With Quote
  #57  
Old 02-18-2007, 02:05 PM
.Tim's Avatar
.Tim .Tim is offline
 
Join Date: Jan 2005
Location: Oklahoma City
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes.
Reply With Quote
  #58  
Old 02-18-2007, 03:13 PM
Tralala's Avatar
Tralala Tralala is offline
 
Join Date: Jan 2006
Posts: 1,207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by .Tim View Post
Yes.

Tim, any response as to how to fix the issue of a blank, wrong, or broken image showing up as avatar in the private message bit of UserCP, when using this add-on? TruthElixirX and I have been discussing it in the last few posts.
Reply With Quote
  #59  
Old 02-18-2007, 03:33 PM
.Tim's Avatar
.Tim .Tim is offline
 
Join Date: Jan 2005
Location: Oklahoma City
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I honestly have no idea. I haven't experienced those problems on either board I'm using this on. Sorry. I'll post in here if I have a break through and come up with something though.
Reply With Quote
  #60  
Old 02-18-2007, 04:12 PM
Tralala's Avatar
Tralala Tralala is offline
 
Join Date: Jan 2006
Posts: 1,207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, .Tim, that's about all I can ask. :up:

For the record, I'm experiencing this on a pretty clean install of vBulletin 3.6.4, using the built-in vBulletin skin. If you'd like to investigate by checking out my forum, just let me know and I can PM you a login.

In the meantime I'm going to have to explore turning off the private message bit of UserCP entirely, which obviously is a bummer.

Thanks for the consideration though, and for sharing this otherwise-very-cool hack.
Reply With Quote
  #61  
Old 02-19-2007, 02:31 PM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice hack!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:35 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11372 seconds
  • Memory Usage 2,324KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete