Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Profile Picture in Postbit Details »»
Profile Picture in Postbit
Version: 1.1.0, by ndahiya ndahiya is offline
Developer Last Online: Mar 2023 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.0.x Rating:
Released: 12-31-2009 Last Update: 01-12-2010 Installs: 16
Uses Plugins
Re-useable Code Translations  
No support by the author.

This mod shows the user profile picture in the postbit template for all posters.

Ver 1.1 : Fix for profile pics stored in database. Just reimport the product.
Ver 1.0 : Original Release.

--
Installation: Just add the attached product xml file.
Uninstallation: Just remove the product.

Please Note:
If the pictures are stored in the filesystem, this mod checks that an profile picture exists by checking the user table's profilepicrevision field (>0 implies a pic exists (or at least existed)). Sometimes it will result in file not found error (no problem on the rendered page, but still an invalid image pull) if the user deletes their pic, but that can be updated by running this sql query periodically.
Code:
update user set profilepicrevision = 0 where user.userid not in (select userid from customprofilepic);


..
ndahiya

Download Now

File Type: xml product-profile_pic_in_postbit.xml (1.5 KB, 122 views)

Show Your Support

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

Comments
  #22  
Old 01-24-2010, 01:00 PM
nomoreturn's Avatar
nomoreturn nomoreturn is offline
 
Join Date: Apr 2009
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for nice mod i have a question can we change pic size because in my site pic's are geting out of posbit i attache a pic plz have a look thanks
Attached Images
File Type: png posbit pic.PNG (67.5 KB, 0 views)
Reply With Quote
  #23  
Old 01-24-2010, 01:17 PM
ndahiya ndahiya is offline
 
Join Date: Aug 2004
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by moonclamp View Post
So if you have a large profile photo, you also get a large avatar?

What's the point of it then? You could just get rid of the profile photo option and rename 'avatar' in your language pack.
that is a good point... hmmm, i never did think of it. now to figure out how to do it (convery profile pic to avatars)...
Reply With Quote
  #24  
Old 01-24-2010, 01:22 PM
ndahiya ndahiya is offline
 
Join Date: Aug 2004
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nomoreturn@hotm View Post
Thanks for nice mod i have a question can we change pic size because in my site pic's are geting out of posbit i attache a pic plz have a look thanks
you can edit the xml file to specify the max dimensions in the img tag.... look for this code:

Code:
    $template_hook['postbit_userinfo_right_after_posts'] .= '<dd> <img src=' . $post[profileurl] . ' ></dd>';
Reply With Quote
  #25  
Old 01-30-2010, 03:46 PM
nomoreturn's Avatar
nomoreturn nomoreturn is offline
 
Join Date: Apr 2009
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ndahiya View Post
you can edit the xml file to specify the max dimensions in the img tag.... look for this code:

Code:
    $template_hook['postbit_userinfo_right_after_posts'] .= '<dd> <img src=' . $post[profileurl] . ' ></dd>';
Thanks solved my problem with this thanks for help
Code:
$template_hook['postbit_userinfo_right_after_posts'] .= '<dd> <img height="200" width="170" 
 src=' . $post[profileurl] . ' ></dd>';
Reply With Quote
  #26  
Old 10-19-2010, 08:44 PM
Fusion2 Fusion2 is offline
 
Join Date: Oct 2006
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Was easy to install, and looks great!

It would be cool if you could also choose where in Postbit to display the image. The avatar is displayed above user info, but your picture mod displays the image below the user info. Would be awesome if you could have an option to post above or below.
Reply With Quote
  #27  
Old 10-22-2010, 06:21 PM
Fusion2 Fusion2 is offline
 
Join Date: Oct 2006
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I upgraded to 4.08 and now this add-on doesnt work. Any ideas?
Reply With Quote
  #28  
Old 08-07-2011, 01:53 AM
ndahiya ndahiya is offline
 
Join Date: Aug 2004
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is still working for me as of 4.1.5
Reply With Quote
  #29  
Old 05-08-2013, 02:57 PM
Tyran1 Tyran1 is offline
 
Join Date: Jan 2007
Location: Deutsches Reich
Posts: 297
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works fine on 3.8.7 !! Thanks!
Reply With Quote
  #30  
Old 05-24-2013, 01:43 PM
M.C. M.C. is offline
 
Join Date: Jan 2002
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ndahiya View Post
if you use avatars, then this is not for you. my site uses profile pics and not avatars.
hmmm sorry to hear that... may be we can do condiotion?

IF user has avatar -> show avatar
ELSE -> IF user has profilepicture -> show profilepicture

So here it is my fix.

1. change in plugin Profile Pic in Postbit (AdminCP => Plugin Manager => Profile Pic in Postbit => Edit):
Code:
$template_hook['postbit_userinfo_right_after_posts'] .= '<dd> <img src=' . $post[profileurl] . ' ></dd>';
to
Code:
$template_hook['postbit_userinfo_avatar'] .= '<dd> <center><img src=' . $post[profileurl] . ' style="max-width:150px;"></center></dd>';
2. in template Postbit_Legacy (or Postbit if you do not use legacy layout) change:
Code:
<vb:if condition="$show['avatar']">
			<a class="postuseravatar" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
				<img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" title="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
			</a>
			</vb:if>
to:
Code:
<vb:if condition="$show['avatar']">
			<a class="postuseravatar" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
				<img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" title="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
			</a>
			<vb:else />
			{vb:raw template_hook.postbit_userinfo_avatar}
			</vb:if>
Done
Reply With Quote
Reply

Thread Tools

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 09:23 AM.


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.05068 seconds
  • Memory Usage 2,326KB
  • Queries Executed 27 (?)
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
  • (8)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete