PDA

View Full Version : Help PLEASE! Swapping Avatars With Profile Pics


LilyVO30
01-09-2012, 01:11 AM
Hi,

I am still in the process of editing my forum and am trying to replace all instances of avatars with profile pics. To me there is no reason to have both.

In theory I think going to admin pc> avatars > user picture storate type> avatar file path> ./customavatars

can just be changed to admin pc> avatars > user picture storate type> avatar file path> ./customprofilepics

But when I make a change it appears that this causes rewritting of file paths which I don't know if that will cause issues.

Do you have any suggestions, I truly don't understand this whole avatar crap. People can put up their own profile photo and that should be what is used to represent them throughout the forum.

I have attached a photo of the window where this is changed.

Also would love other suggestions if there is a better option out there.

THANK YOU VERY MUCH FOR YOUR TIME!!! :D

LILY

LilyVO30
01-09-2012, 09:37 PM
Just incase anyone else wanted to know this is what I found out from vbulletin

"Regarding pointing to the .customprofilepics directory instead of the .customavatars directory. That would just mean the avatars would now be saved in the .customprofilepics directory. So, that isn't going to work for what you want to do."

I wish someone would come up with a solution for this. I just don't understand the need to use both images.

kh99
01-09-2012, 09:52 PM
I don't understand either, but in vb3 the profile picture was larger and in the center of the profile so it made a bit of sense. Anyway, it seems like it would be easier to use avatars everywhere because then you don't have to change most places (like posts). If I understand you, you really just want to have the avatar displayed in the profile where the profile picture is now, and eliminate the profile picture?

LilyVO30
01-09-2012, 10:04 PM
Hi, yes, I don't care which one works I just don't want there to be 2 different options. Do you have a suggestion for replacing the profile pic instead?

Thanks!

kh99
01-09-2012, 10:50 PM
Well I think maybe the easiest thing to do would be to edit the MEMBERINFO template and find {vb:raw blocks.profile_picture} and change it to {vb:raw blocks.stats_mini}. Then find the {vb:raw blocks.stats_mini} below that and delete it. That will move the block of info with the avatar in it up to where the profile picture was. There are other ways but it gets more complicated.

ETA: If you also go to the usergroup manager and edit the "Registered Users" group (or any other groups you may have created) and set "Can Upload Profile Picture" to No, the option to edit the profile picture will not be there.

RobertB420
01-10-2012, 01:43 AM
Sooooo has anyone have an update on this?


Well I think maybe the easiest thing to do would be to edit the MEMBERINFO template and find {vb:raw blocks.profile_picture} and change it to {vb:raw blocks.stats_mini}. Then find the {vb:raw blocks.stats_mini} below that and delete it. That will move the block of info with the avatar in it up to where the profile picture was. There are other ways but it gets more complicated.


Did this work?!?!?

Lynne
01-10-2012, 02:29 AM
Why don't you just turn off profile pictures and then everyone would upload the image as an avatar (or vice versa)? (Which is what Kevin recommended in post 5.)

LilyVO30
01-10-2012, 03:12 AM
Kevin,

Thanks for your response. I did as you said and the only change I see is that the profile photo disappears. Check out my profile http://powerliftingforwomen.com/forum/member.php?1-LilyVO. I also attached a photo.

Do you think I am missing a step?

Thanks,

Lily

PS: Lynne, thanks for the comment. Unfortunately turning off the profile pic is just one step. I want the avatar to show up where the profile pic was.

kh99
01-10-2012, 03:20 AM
The changes also have moved the block of data with the avatar up to the top (but you might have to look at two pages side by side to see it). To get just the avatar up where the profile picture was, I think it will take some coding. I'll look at it tomorrow.

LilyVO30
01-10-2012, 03:49 AM
I really really appreciate it! Thank you. This is all way over my head!

kh99
01-10-2012, 02:44 PM
OK, I think you can do something like you want without any php coding. You already have the block of info with the avatar image at the top, you just need to edit that template to move the image abovethe other info. So edit template memberinfo_block_ministats and search for "avatar" to find this block of code:

<vb:if condition="$prepared['avatarurl']">
<dl class="stats">
<dt>{vb:rawphrase avatar}</dt>
<dd class="avatar"><img src="{vb:raw prepared.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw prepared.username}}" {vb:raw prepared.avatarsize} id="user_avatar" /></dd>
</dl>
</vb:if>


And remove it. Then at the top of that same template, insert the part marked in red below:

<div class="mini_stats blockbody userprof_content userprof_content_border">
<div class="userinfo " >
<h5 class="blocksubhead userprof_blocksubhead smaller">{vb:rawphrase mini_statistics}</h5>
<div class="blockrow member_blockrow">
<img src="{vb:raw prepared.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw prepared.username}}" {vb:raw prepared.avatarsize} id="user_avatar" /><br />


Hopefully that's close to what you want.

LilyVO30
01-10-2012, 03:24 PM
Kevin,

That is soooo close :D Here is the link and I attached a photo as well http://powerliftingforwomen.com/forum/member.php?1-LilyVO.

The last thing I would want to do is enlarge the size of the photo. If somehow I can just use the default upload size than it would be perfect.

Thanks again for all of your help, I have been trying on my own for a few days now and got nowhere.

kh99
01-10-2012, 04:07 PM
Try removing {vb:raw prepared.avatarsize} from the stuff you added to the memberinfo_block_ministats template. Edit:...actually I don't think that's going to do it, still working on it....

OK, you also need a plugin. Go to "Add New Plugin" under "Plugin & Products".

Leave the product dropdown at "vbulletin" and select "member_profileblock_fetch_unwrapped" from the Hook Location dropdown menu.

Next, enter a title, maybe something like "full size avatar in profile". Then paste this code in the large text area:
if (!empty($prepared['avatarurl']))
$prepared['avatarurl'] = str_replace('&amp;type=thumb', '', $prepared['avatarurl']);


Now select the Yes radio button next to "Plugin is Active", and press Save.

Hopefully that will do it.

LilyVO30
01-10-2012, 08:34 PM
Yessss!!! Sooo happy! Thank you so much!! I really appreciate it!

:D:D:D


***If anyone is interested in previous post this you still have to remove the {vb:raw prepared.avatarsize}