vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Profile Picture in Postbit (https://vborg.vbsupport.ru/showthread.php?t=231840)

ndahiya 12-31-2009 10:00 PM

Profile Picture in Postbit
 
1 Attachment(s)
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

elwachiman 01-01-2010 06:47 PM

Demo Please...tnks

ndahiya 01-01-2010 06:54 PM

On my site, only logged in members can view the picture/details, so can't really demo it from that. You can install it and see. It does not change anything in your system, so can uninstall it just as easily.

garretbyrne 01-05-2010 02:34 PM

I don't get it?? I've installed it but nothing has changed.. Where is this meant to show up?

Snug 01-05-2010 05:06 PM

screenshot?

ndahiya 01-05-2010 11:35 PM

Quote:

Originally Posted by garretbyrne (Post 1947909)
I don't get it?? I've installed it but nothing has changed.. Where is this meant to show up?

hmm, can you try and change avatar storage type to filesystem and them check (you can revert back thereafter, it will work for sure)? i think i know where the problem might be, but just want to be sure before updating the code.

garretbyrne 01-06-2010 05:37 AM

Quote:

Originally Posted by ndahiya (Post 1948324)
hmm, can you try and change avatar storage type to filesystem and them check (you can revert back thereafter, it will work for sure)? i think i know where the problem might be, but just want to be sure before updating the code.

Sorry man but how do i do that...? lol

kersti 01-06-2010 09:16 AM

Why would I bother when there is custom avatars?

garretbyrne 01-06-2010 10:49 AM

I think I'll leave this... Thanks anyway but I don't see a need at the moment for my site..

Thanks

ndahiya 01-06-2010 09:45 PM

Quote:

Originally Posted by garretbyrne (Post 1948499)
Quote:

hmm, can you try and change avatar storage type to filesystem and them check (you can revert back thereafter, it will work for sure)? i think i know where the problem might be, but just want to be sure before updating the code.
Sorry man but how do i do that...? lol

AdminCP --> Avatars --> User Picture Storage Type to toggle the storage from db to filesystem


Quote:

Why would I bother when there is custom avatars?
Because some people (like my site) do not use avatars but actual member pictures.

ndahiya 01-17-2010 06:24 PM

v1.1 should take care of issue for profile pics stored in database....

Tyran1 01-18-2010 04:35 PM

Who ist that for Version 3.8.4 ??

TNCclubman 01-18-2010 04:39 PM

screenshot?

ndahiya 01-23-2010 03:18 PM

1 Attachment(s)
screenshot per popular request...

ndahiya 01-23-2010 03:19 PM

Quote:

Originally Posted by Tyran1 (Post 1959334)
Who ist that for Version 3.8.4 ??

this is primarily for vb4, but should be relatively easy to mod for 3.8.4

oddmud 01-23-2010 04:00 PM

ok, but isnt there an avatar already in the postbit?

moonclamp 01-23-2010 09:05 PM

Does this resize the picture or does it just constrain the pixel dimensions?

ndahiya 01-24-2010 12:26 AM

Quote:

Originally Posted by moonclamp (Post 1964760)
Does this resize the picture or does it just constrain the pixel dimensions?

it does not constraint pixel dimension any more than the default profile pic limit.

ndahiya 01-24-2010 12:33 AM

Quote:

Originally Posted by oddmud (Post 1964506)
ok, but isnt there an avatar already in the postbit?

if you use avatars, then this is not for you. my site uses profile pics and not avatars.

moonclamp 01-24-2010 02:43 AM

Quote:

Originally Posted by ndahiya (Post 1964871)
it does not constraint pixel dimension any more than the default profile pic limit.

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.

nomoreturn 01-24-2010 01:00 PM

1 Attachment(s)
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

ndahiya 01-24-2010 01:17 PM

Quote:

Originally Posted by moonclamp (Post 1964913)
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)...

ndahiya 01-24-2010 01:22 PM

Quote:

Originally Posted by nomoreturn@hotm (Post 1965201)
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>';

nomoreturn 01-30-2010 03:46 PM

Quote:

Originally Posted by ndahiya (Post 1965217)
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>';


Fusion2 10-19-2010 08:44 PM

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.

Fusion2 10-22-2010 06:21 PM

I upgraded to 4.08 and now this add-on doesnt work. Any ideas?

ndahiya 08-07-2011 01:53 AM

this is still working for me as of 4.1.5

Tyran1 05-08-2013 02:57 PM

Works fine on 3.8.7 !! Thanks!

M.C. 05-24-2013 01:43 PM

Quote:

Originally Posted by ndahiya (Post 1964876)
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 ;)


All times are GMT. The time now is 03:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01181 seconds
  • Memory Usage 1,787KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (29)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete