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
  #92  
Old 01-10-2008, 09:26 PM
AWJunkies AWJunkies is offline
 
Join Date: Jan 2005
Location: San Diego
Posts: 947
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what php version you running? People need to start letting people know this is for php5+ or whatever cause I just upgraded to 5+ from 4.4.4 and now I have all sorts of errors from mods. Also fixed tons of errors from mods. Not to say this is the case with your mod will find out in bit while I test.
Reply With Quote
  #93  
Old 01-11-2008, 12:07 AM
Arrogant-One's Avatar
Arrogant-One Arrogant-One is offline
 
Join Date: Jul 2007
Location: Brisbane
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When the avatar shows up in the inbox of your PM's, is it shruck to fit or the same usual size?
Reply With Quote
  #94  
Old 01-11-2008, 04:22 AM
.Tim's Avatar
.Tim .Tim is offline
 
Join Date: Jan 2005
Location: Oklahoma City
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the PM list it is resized to a smaller size but in the actual PM itself it is the normal size.
Reply With Quote
  #95  
Old 01-17-2008, 08:25 PM
aranthorn's Avatar
aranthorn aranthorn is offline
 
Join Date: Jun 2004
Location: Chicago
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like the hack, but didn't want to replace the post icon with the avatar, so I put the post icon and the status icon on top of each other. Here's my pm_messagelistbit template:
HTML Code:
<tr>
	<td class="alt1"><img src="$stylevar[imgdir_statusicon]/pm_$pm[statusicon].gif" alt="" border="0" />&nbsp;<img src="$pm[iconpath]" alt="$pm[icontitle]" /></td>
<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> 
	<td class="alt1Active" id="m$pm[pmid]" width="100%">
		<div>
			<span style="float:$stylevar[right]" class="smallfont">$pm[senddate]</span>
			<a href="private.php?$session[sessionurl]do=showpm&amp;pmid=$pm[pmid]"><if condition="$show['unread']"><strong>$pm[title]</strong><else />$pm[title]</if></a>
		</div>
		<div class="smallfont">
			<span style="float:$stylevar[right]" class="time">$pm[sendtime]</span>
			<if condition="$show['unread']"><strong>$userbit</strong><else />$userbit</if>
		</div>
</td>
	<if condition="$show['pmcheckbox']"><td class="alt2" align="center" style="padding:0px"><input type="checkbox" name="pm[$pmid]" value="$groupid" /></td></if>
</tr>
Thanks for the hack, I like it a lot!
Reply With Quote
  #96  
Old 03-07-2008, 07:12 AM
Arrogant-One's Avatar
Arrogant-One Arrogant-One is offline
 
Join Date: Jul 2007
Location: Brisbane
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheMilkCarton View Post
Just tweak the html to add:
Code:
style="max-width:75; max-height:75;"
in the <img> code.

Don't think this works in IE6, though.. but you could create a class for this in the CSS instead, and use a few of the IE6 tricks.

Edit:
It is already coded in the html for a width of 60, anyway. Although I didn't use that since my PM page is heavily customized.
For those of us who aren't programmers, how do I do this?

ie.

Admin CP > User Options > etc.

Thanks,

AO
Reply With Quote
  #97  
Old 03-19-2008, 02:47 AM
Trana Trana is offline
 
Join Date: Apr 2005
Posts: 604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AWJunkies View Post
I have this same issue and about to uninstall. I love this idea and have used it for a while but couldn't figure out the culprit on what was happening. Now I have. Will remove for now.
For everyone that is having this problem (where members get a db error when viewing their PM boxes), can you tell me what hacks you have installed? Are you running VBSEO?

I narrowed it down a little bit. I found that the affected members have records in pmtest with no related records in pm. Something is inserting PMs incorrectly and it causes this mod to blow up. Perhaps the author could code in a function to check and see if the userid is blank, and if so, to use the noavatar.gif instead. I know this is a workaround, but it will fix this for everyone that is having problems until the offending culprit is found.

Thanks!
Reply With Quote
  #98  
Old 03-19-2008, 05:20 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tim, this adds a query for every unique avatar on the page, so if you have 22 users sending you PMs and they are all listed on this page, it will add 22 queries for the page on top of the vb default and whatever else they having running in there.
Reply With Quote
  #99  
Old 03-30-2008, 09:37 PM
SativaGlow SativaGlow is offline
 
Join Date: Jan 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed! Nice one!
Reply With Quote
  #100  
Old 07-12-2008, 09:19 PM
alfaowner alfaowner is offline
 
Join Date: Jul 2003
Location: London
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Trana View Post
For everyone that is having this problem (where members get a db error when viewing their PM boxes), can you tell me what hacks you have installed? Are you running VBSEO?

I narrowed it down a little bit. I found that the affected members have records in pmtest with no related records in pm. Something is inserting PMs incorrectly and it causes this mod to blow up. Perhaps the author could code in a function to check and see if the userid is blank, and if so, to use the noavatar.gif instead. I know this is a workaround, but it will fix this for everyone that is having problems until the offending culprit is found.

Thanks!
Trana,

I stumbled on this today, if you still need the fix it is:

Got to the plugin manager, find the plug in 'PM Avatars' and edit
PHP Code:
$sk_avurl fetch_avatar_url($userid); 
to:
PHP Code:
if($userid != 'cc'){ $sk_avurl fetch_avatar_url($userid); } 
That would stop the errors for you, it basically checks if the $userid = 'cc' and then only runs the hook if it isn't. It's expecting the $userid to equal something like '67453' but something makes it 'cc'... my code just ignores it if it is!

Let me know how you get on, it will fix it!

AO
Reply With Quote
  #101  
Old 07-22-2008, 03:59 AM
AWJunkies AWJunkies is offline
 
Join Date: Jan 2005
Location: San Diego
Posts: 947
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Finished adding this with 0 queries added yes 0. Will give to mod owner or will just release it. I also integrated it with opacity avatar MOD.
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 02:09 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.05086 seconds
  • Memory Usage 2,325KB
  • 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
  • (3)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_php
  • (3)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
  • (3)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