![]() |
Place Avatar in VB and Non-VB Pages
The following is a bit of code I came up with to continue to use the Avatar in Navbar mod by fraghappy. After searching for many hours I decided just to figure it out myself.
On the bright side, none of the plugins and db queries from the old mod are used. I'll try to support this as much as possible, but I don't foresee anyone having any real issues. It's pretty straight forward. Don't forget to click the INSTALL Features in progress
You just need to become familiar with the following bit of code: This will display a users avatar: Code:
<img src="$vboptions[bbdir]/image.php?u=$bbuserinfo[userid]" alt="Your avatar" border="0" /> In navbar template replace: Code:
<table cellpadding="0" cellspacing="0" align="left" style="margin-top:5px;"> Code:
<table cellpadding="0" cellspacing="0" align="left" style="margin-top:5px;"> Code:
<table cellpadding="0" cellspacing="0" align="left" style="margin-top:5px;"> Personally I don't use the no avatar image as the default. I created a custom default avatar for each usergroup. As for the plugin for the original Avatar on Navbar mod, I don't even use it. With this bit of code it's simple and not needed. or if you want to call it directly using an http: use this method: Code:
<table cellpadding="0" cellspacing="0" align="left" style="margin-top:5px;"> Enjoy! 07/28/2008 - Added simple screenshot. |
Thank you very much, But I have one question, for those who have Big Avatars will this Mod resize the Avatar for what ever pixels want it?
Thank you </installed> |
My attempts to contact the author of Show User's Avatar in Navbar v1.1, fraghappy have been unsuccessful. I'll try to make this into a product with <if> functions to call a default avatar if no custom avatar exists.
None of the original authors code is needed using this method so there shouldn't be an issue! |
Quote:
I'd like to have it resize just for the navbar only and then add some ajax function to it so that it expands on mouse over. I'll keep everyone posted on the progress! |
Quote:
|
super cool mod
|
Can we see a demo please..
|
Quote:
Cant wait for the resize image function. |
Quote:
In your admincp go to Avatars> Avatar Manager> Create New Avatar Category 2) Go to Avatars> Avatar Manager> (Usergroup Category) Avatar Permissions and select "No" for all usergroups except "Administrators" and the usergroup you setup the category for. Repeat this step for all the other Usergroup Categories you made. 3) Go to Avatars> Upload Avatar and select the image you use as your "NoAvatar" image. Set the Minimum Posts field to "0" and select the category that will use it. Give it a Title and click UPLOAD. Note: You can use the same image for each usergroup category but you must upload it for each one separately. Repeat this upload step for each user. I only use two usergroup categories so and both have individual images. I hope this helps you out! |
thanks for the explanation!
now I'm trying to set an avatar as default so that when a user registers the avatar is already selected in his or her account instead of 'no avatar specified'. Is this possible? |
Quote:
|
ok! cant wait
thank you for taking time for this |
Thank you! I was looking for the right code to display avatars in the navbar. I need them to be smaller, too, though.
*installed* |
I am sure it is a dirty cheat, but I just used the html to call the avatar directly in my navbar, then added width="25%" height="25%". It seems to work perfectly. For those with no avatar, the space is just blank. I would really like to use the default avatar instead though, I haven't found anything to do that in anything even close to the current version and I have a lot usergroups, so ....
<crossing fingers you'll put it all together for us> :) |
I take it back - it doesn't update when the avatar is changed or deleted.
|
Quote:
read that ...... and cant wait for the resize feature either:p |
Works nicely! Will let you know if any bugs or problems appear :) marked as installed!
|
I can't get this to work. put the code in for a non-vb page, and edited the two directories to match my forums, but all I get is an image that says "vbulletin" on it. And clicking the image logs me out of the forums, even though I have cookies enabled and am permanently logged in.
|
Quote:
Also, with regards to your cookie issue... What is your "Path to save cookies" and "Cookie Domain" set to in your VB Admin options? Based on your issue, I'm assuming you are using the direct method (i.e. http://www.yourdomain.com/..........). If your cookie path and domain settings are not correct, entering a direct link will cause the user to be logged out. Let me explain... If I visit http://yourforums.com and login, I'm able to click on other links beginning with the http://yourforums.com and stay logged in. If you direct entry a link as http://www.yourforums.com and your cookie path is not setup to recognize the two as being the same, I will be logged out. Provide some more info and I'll help you sort it out! |
would this work on a wordpress blog using the wordpress bridge?
|
I can't seem to get this operating.
When i try to find the original navbar code for replacement, I'm not seeing it. |
I don't want to add a default avatar to all users but I would like to display a default avatar in the navbar when the user is missing one.
could that be done with something like? Quote:
Another question: The avatars display just fine but when a person without avatar logs in the text "Your avatar" is missing and all there is is a blank space. |
I'm trying to place the avatar right next to my "Welcome _____, you have X PMs and notifications" part of the navbar.
Here's my code I'm using, with the avatar part highlighted red: Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> Code:
<td><a href="http://www.yourwebsite/pathtoforums/profile.php?$session[sessionurl]do=editavatar"><img src="http://www.yourwebsite/pathtoforums/image.php?u=$bbuserinfo[userid]" alt="Your avatar" border="0" /></a> |
if a user doesn't have an avatar though it doesn't show the noavatar pic... matter of fact in the code i also can't see anything saying it should pick out a noavatar pic.
and if a user isn't logged in it shows this image: https://vborg.vbsupport.ru/image.php?u=0 https://vborg.vbsupport.ru/external/2008/11/1.php?u=0 |
Quote:
edit: After taking a look, it seems that the codes given in this thread are calling whatever the url of the current page is as the image. Since a webpage is obviously not an image, that is why the avatar won't show up. My question is, how did everyone else get theirs to work. I've tried using "$avatarurl" and "$user[avatarurl]" as the image source and still haven't had any luck. |
It works on my test site which have vBadvanced and vbulletin files in the same folder(root), but It won't work on my live site where I have vBa inte the root and the forum in /forum
Any idea why? |
Quote:
|
Quote:
|
I'd like to update by saying that even after moving my compss to inside my forum's directory, I still have no avatar showing up.
|
Quote:
Code:
<a href="http://www.yourdomain/forumsdir/profile.php?$session[sessionurl]do=editavatar"><img src="http://www.yourdomain/forumsdir/image.php?u=$bbuserinfo[userid]" alt="Your avatar" border="0" /></a> |
I have 3.7.4
I tried everything u guys said It just gives blank |
I'm running 3.8.0 on a test site and only wanted to display a small version of the member's avatar so I streamlined the code to this.
Code:
<img width="50" src="$vboptions[bburl]/image.php?u=$bbuserinfo[userid]" alt="Your Avatar" border="0" /> |
Can someone come up with a fix. I cant manage to install this avatar thingy into my navbar.
unless, the instructions are just confusing. Can anyone help me ? Thanks |
there is one thing missing...
what if the user is using a avatar from a different site, for example, from google images or is using gallery avatars from the images/avatars directory |
A simple tweak.
If you dont want the goofy vbulletin image to come up for guests, simply add: <if condition="$show['member']"> to the beginning of the code and a </if> to the end of the code. Then the avatar will only show for logged in users. |
Quote:
|
Quote:
If not, I have no idea why it won't work.. |
isnt the "&dateline=date" missing?
|
if the member not have avatar how i put "noavater.gif" ?
|
Quote:
Yes it happens the same for me, the avatar does not update, but it does change in the postbit! |
All times are GMT. The time now is 03:28 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|