The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Place Avatar in VB and Non-VB Pages Details »» | |||||||||||||||||||||||||||
Place Avatar in VB and Non-VB Pages
Developer Last Online: Apr 2010
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;"> <tr> <td><a href="profile.php?$session[sessionurl]do=editavatar"><img src="$navbar_ava[0]" alt="Your avatar" border="0" /></a> </td> Code:
<table cellpadding="0" cellspacing="0" align="left" style="margin-top:5px;"> <tr> <td><a href="$vboptions[bbdir]/profile.php?$session[sessionurl]do=editavatar"><img src="$vboptions[bbdir]/image.php?u=$bbuserinfo[userid]" alt="Your avatar" border="0" /></a> </td> Code:
<table cellpadding="0" cellspacing="0" align="left" style="margin-top:5px;"> <tr> <td><a href="$vbpoptions[bbdir]/profile.php?$session[sessionurl]do=editavatar"><img src="$vbpoptions[bbdir]/image.php?u=$bbuserinfo[userid]" alt="Your avatar" border="0" /></a> </td> 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;"> <tr> <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> </td> Enjoy! 07/28/2008 - Added simple screenshot. Show Your Support
|
Comments |
#12
|
||||
|
||||
It is possible.... If you can give me another couple of days I'll have a total solution for you. Then the above steps won't be needed. I'm very close on this but work is taking alot of my time.
|
#13
|
|||
|
|||
ok! cant wait
thank you for taking time for this |
#14
|
||||
|
||||
Thank you! I was looking for the right code to display avatars in the navbar. I need them to be smaller, too, though.
*installed* |
#15
|
||||
|
||||
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> |
#16
|
||||
|
||||
I take it back - it doesn't update when the avatar is changed or deleted.
|
#17
|
|||
|
|||
Quote:
read that ...... and cant wait for the resize feature either |
#18
|
|||
|
|||
Works nicely! Will let you know if any bugs or problems appear marked as installed!
|
#19
|
|||
|
|||
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.
|
#20
|
||||
|
||||
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! |
#21
|
|||
|
|||
would this work on a wordpress blog using the wordpress bridge?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|