vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=135891

Avatar on forumdisplay
by Allan
08 Jan 2007 17:22

4 Attachment(s)
Avatar on forumdisplay
(Compatible All vB3.6)




Description: Add avatar to user who have create the thread

Installation: Import the plugin
Upload image (aucun_avatar.gif) to your style in misc file
  • Add this class in your style, At the end, in "Additional CSS Definitions", second bloc (custom css))

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

  • Details:
In AdminCP => Styles & Templates => Style Manager => in your style (Main CSS) :

https://www.vbulletin.org/forum/



  • In threadbit template, find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

  • Before, add this code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Version 1.1: Add avatar by default (Big thank to Fred for plugin ;))

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PS: If you use thie mod, click on Install please :)

geveze 09 Jan 2007 04:17

oo thanks :D

installed

PennylessZ28 09 Jan 2007 04:53

Interesting idea.

I'm going to use this with an if statement for an New Members Introduction Forum ;)

That actually doesn't work, why would the source of the image be image.php?

PennylessZ28 09 Jan 2007 05:02

WOn't work if avatars in saved in the file system I should say. Paths are different. :)

delaen1 09 Jan 2007 14:34

Any way to get it to display a default avatar if the user doesn't have one?

SkyCatcher 10 Jan 2007 01:00

I think this hack just got a lot more complicated for Allan *lol*

I really like the idea, but you'll have to use the fetchavatarurl function and pass that into a variable that the template can use then then conditional it incase the user doesn't have an avatar or it'll come up with a red x.

Allan 10 Jan 2007 10:03

Version 1.1: Add avatar by default (Big thank to Fred for plugin )

delaen1 12 Jan 2007 16:10

Sweet. Thanks Allan.

GruntHalo 12 Jan 2007 18:48

Not bad dude, Installed.

hoopsta 13 Jan 2007 04:50

sorry, I'm sort of new at this. What does this mean and where do I do it?

"Add this class in your style"

Code:
.avatar_forumdisplay {
padding:0px 5px 0px 0px;
}

marcsmith73 14 Jan 2007 04:15

Would like to know the same...very vague

Allan 14 Jan 2007 10:17

In AdminCP => Styles & Templates => Style Manager => in your style (Main CSS) :

http://img143.imageshack.us/img143/3243/cssxa3.gif

At the end, in "Additional CSS Definitions", second bloc (custom css), add that:

.avatar_forumdisplay {
padding:0px 5px 0px 0px;
}

kenneth4200 17 Jan 2007 00:11

How i install the mods in "search.php?do=getnew" ???

G3MM4 17 Jan 2007 09:20

Nice. It's not something I would use at the moment but it's a cool idea.

donaldgkimball 17 Jan 2007 10:18

This is a neat addition. Thanks.

Installed.

trancetopia 17 Jan 2007 18:01

I can use this. One thing you need to take a look at is that if a member uses one of the "forum supplied" avatars it will not display anything at all.

wilburshere 20 Jan 2007 12:49

Quote:

Originally Posted by trancetopia (Post 1161520)
I can use this. One thing you need to take a look at is that if a member uses one of the "forum supplied" avatars it will not display anything at all.

yes other than that this is a good plugin

i look forward to the fix then i will run it live on my forums

(only installed on test site atm)

donaldgkimball 21 Jan 2007 15:35

This is such a great addition, I would like to know how can I also make that the last poster's avatar is displayed in the threadbit template.
Please look at this screenshot for explanation, The box No.1 is well taken care of the thread starter's avatar being displayed. Just see next to box no.2
http://img201.imageshack.us/img201/8828/avatar9xe.jpg

Basically just follow the blue arrow here.. I hope I was clear on my description.

Cheers.

RaceJunkie 22 Jan 2007 19:02

Does this work if the avatars are stored in the file system?

I'll be watching for the update to use forum stored avatars as well..

salata 02 Feb 2007 20:50

is there another one that works for 3.5.X?

salata 05 Feb 2007 16:25

is there a way to make this work in 3.5.4?

PennylessZ28 06 Feb 2007 20:36

still no worky for file system

eNforce 06 Feb 2007 21:38

Please add the ability to pull avatars from the file system :)

aceofspades 08 Feb 2007 15:00

This is working great, but can you tell me how i could have the avatar resized to a set size on the threadbit?

Edit: * Spadez Installs :)

Soliloquy 08 Feb 2007 18:24

Quote:

Originally Posted by aceofspades (Post 1177527)
This is working great, but can you tell me how i could have the avatar resized to a set size on the threadbit?

Edit: * Spadez Installs :)

Go to your Plugin Manager, find Avatar Threadbit in the list, and then edit the Plugin PHP Code to your liking.:)

aceofspades 08 Feb 2007 22:19

Awesome, i thought it would be harder than that but i guess not, i can also change:

Quote:

Profil de $username
to english :D

Allan 08 Feb 2007 22:22

Quote:

Originally Posted by aceofspades (Post 1177870)
Awesome, i thought it would be harder than that but i guess not, i can also change:


to english :D

Oupss, yes :p

salata 09 Feb 2007 15:08

Quote:

Originally Posted by salata (Post 1175243)
is there a way to make this work in 3.5.4?

bump

Allan 09 Feb 2007 16:11

Test it ^^

salata 10 Feb 2007 06:26

Quote:

Originally Posted by Allan (Post 1178398)
Test it ^^

i did. i get this error.

Quote:

Originally Posted by Error Message
### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
(`active`, `executionorder`, `product`, `title`, `hookname`, `phpcode`)
VALUES
('1', '5', 'vbulletin', 'Avatar Threadbit', 'threadbit_display', 'require_once(\'./includes/functions_user.php\');\r\n $userid = $thread[\'postuserid\'];\r\n $username = $thread[\'postusername\'];\r\n $avatarurl = fetch_avatar_url($userid);\r\n if ($avatarurl == \'\') {\r\n $avatar = \"<div class=\'avatar_forumdisplay\' style=\'float:$stylevar[left]\'><a href=\'member.php?u=$userid\'><img src=\'$stylevar[imgdir_misc]/aucun_avatar.gif\' border=\'0\' width=\'50\' height=\'50\' alt=\'Profil de $username\'></a></div>\";\r\n }\r\n else {\r\n $avatar = \"<div class=\'avatar_forumdisplay\' style=\'float:$stylevar[left]\'><a href=\'member.php?u=$userid\'><img src=\'image.php?u=$userid\' border=\'0\' width=\'50\' height=\'50\' alt=\'Profil de $username\'></a></div>\";\r\n }');

MySQL Error : Unknown column 'executionorder' in 'field list'
Error Number : 1054


Tralala 16 Feb 2007 14:07

Great idea! Thanks for sharing, Allan!

Quote:

Originally Posted by PennylessZ28 (Post 1154234)
I'm going to use this with an if statement for an New Members Introduction Forum ;)

What's the easiest way to restrict this only to certain forums?

Soliloquy 16 Feb 2007 18:21

I also would like to see this work with avatars stored in the file system.

This mod is definitely encouraging new thread creation; most of my members have pictures of their faces as their avatars, so I think they like seeing their faces on the threads page! I also made the default image a flower, so I think it's prompting new male members to customize their avatars. The only problem is the lack of avatars from the file system; I have some great custom art made as avatars on my forum, which I'm really proud of. But it looks so weird to have gaps on the threads page that some have switched back to having no avatar instead of getting their picture up. And from the user perspective, it just looks broken.

I don't know how difficult it is to call the avatars from the file system, but can we at least have a default image for those people in the meantime? (Personally I'd like it to be a different image from the default image currently in use, so at least they'd stand out from the newbies.)

Tom_S 01 Mar 2007 00:41

Where is this aucun_avatar.gif I am supposed to upload?

Soliloquy 01 Mar 2007 00:47

It wasn't included; I believe you're supposed to use your own file and name it aucun_avatar.gif.

Tom_S 01 Mar 2007 00:56

No..actually I found the critter. It is that little green bird with the screenshots LOL

Soliloquy 19 Mar 2007 18:15

I've noticed that when members change their avatar the old one is still displayed on forumdisplay. Any way to correct this?

Also, have you seen the Sender Avatar In Private Message List mod? It does almost the same thing except for the private messages list, and works with the filesystem. I thought maybe it would give you some ideas:)

CrashPush 13 Jul 2007 19:18

I will try to get this one in my forum.

xcingix 13 Jul 2007 23:06

Is there ANY way I can use this on my forumhome?
I want to display the last poster's avatar and name instead of status icon on the forumhome.

I've asked on other forums and it seems noone is able to help me with this issue.
It HAS to be possible.

If anyone has any ideas please let me know... PLEASE.

SkyCatcher 17 Jul 2007 06:45

Quote:

Originally Posted by xcingix (Post 1290269)
Is there ANY way I can use this on my forumhome?
I want to display the last poster's avatar and name instead of status icon on the forumhome.

I've asked on other forums and it seems noone is able to help me with this issue.
It HAS to be possible.

If anyone has any ideas please let me know... PLEASE.

I hope you meant to say forumdisplay and not forumhome because I whipped you up a little plugin you can use which will display the last posters username and avatar wherever you want in the forumdisplay (threadbit) so you can replace the statusicons with this.

Basically will do the same as the original hack but instead displays the last poster and avatar. It's 7:40 am and I'm tired as crap so I didn't make it pretty and didn't even make it a product file.

It works with custom avatars, filesystem avatars, and forum stock avatars. If your users do not have an avatar it will display the noavatar.gif that you will need to upload to your misc image directory.

I'm not hi-jacking this thread and I am offering 0 support. You just seemed desperate for a modification like this so I thought I'd be nice. I might release it as it's own hack if there's a demand.

On a side note, I sent the original author a new copy of his hack which worked with filesystem and db avatars back in May but I guess he opted not to release it *shrug*

Anyway xcingix, you can download your own personal mod here

Only thing I can think of that may suck for you is if you're using table prefixes, think I forgot to add that to a couple lines in the first query because, well, I'm tired :D

chiwexa 17 Jul 2007 14:38

I want to give the users the possility to choose, maybe they want it or maybe not...

So I added the following code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And the Profile-Field (field9) With the options Ja (Yes) and Nein (No).
But it doesn't work... evan if I choose yes. :confused:

AzaDiyaR 20 Jul 2007 21:30

installed
this working fine
thanks

stonner 13 Sep 2007 00:14

Quote:

Originally Posted by Soliloquy (Post 1207413)
I've noticed that when members change their avatar the old one is still displayed on forumdisplay. Any way to correct this?

seems to work. thank you! I have noticed the same.

is there a way to correct it?

thank you

stonner 13 Sep 2007 00:19

1 Attachment(s)
I have noticed something strange:

For the same user it shows an avatar and sometimes it doesnt (see attach).
Is there a way to correct this?

thank you

stonner 17 Sep 2007 22:43

no help with this?

thank you!

DoB Rhapsody 29 Sep 2007 20:37

I would really love for someone to take over this mod because it is actually very good.

ShawneyJ 01 Oct 2007 10:12

lol love it.

JtChurch925 04 Oct 2007 18:19

Am I right in concluding that I am getting no avatars to show up because I am using server hosted avatars in the default images/avatars directory?

Would it make a difference if I changed my avatars directory to the /misc folder where he has us put the default avatar?

I would like to use this mod, just not sure why it wouldn't be written for forums using the normal setup. :(

Michael2 05 Oct 2007 16:17

Anyone know how to make this show up when you hit view new posts?

AntiThesis 23 Oct 2007 10:19

I find that replacing image.php?u=$userid with $avatarurl[0] helps a great deal as it seems to handle better.

So it would look like: <img src='$avatarurl[0]'

That and changing "Profile de AntiThesis" to "Profile for AntiThesis" :)

Quote:

Originally Posted by Michael2
Anyone know how to make this show up when you hit view new posts?

Simply adding the following code to search_results_threadbit works:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Evolution06 23 Oct 2007 19:10

Awesome! *installed* adds a good look to the forums.

gator777 02 Nov 2007 03:02

Quote:

Originally Posted by AntiThesis (Post 1366590)
I find that replacing image.php?u=$userid with $avatarurl[0] helps a great deal as it seems to handle better.

So it would look like: <img src='$avatarurl[0]'

That and changing "Profile de AntiThesis" to "Profile for AntiThesis" :)



Simply adding the following code to search_results_threadbit works:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


I cannot find the search_results_threadbit template. Where is it located? Where should I place the code?

Thanks for your help.

I really like this plugin. :D

TheBlackPoet 03 Nov 2007 16:46

i had to go to the actual plug-in to make the changes.. i made the changes there... and i got it to work fine...

DoB Rhapsody 03 Nov 2007 20:57

Has anyone really got this to work 100% without errors of any kind including the ones stated in earlier posts? Such as the problem with users changing their avvys' and pulling avvys from the DB.

vertigo jones 03 Dec 2007 16:56

Does this add an additional query for each thread displayed or how does that fetch_avatar_url function work?

xcingix 03 Dec 2007 17:55

Quote:

Originally Posted by SkyCatcher (Post 1293386)
I hope you meant to say forumdisplay and not forumhome because I whipped you up a little plugin you can use which will display the last posters username and avatar wherever you want in the forumdisplay (threadbit) so you can replace the statusicons with this.

Basically will do the same as the original hack but instead displays the last poster and avatar. It's 7:40 am and I'm tired as crap so I didn't make it pretty and didn't even make it a product file.

It works with custom avatars, filesystem avatars, and forum stock avatars. If your users do not have an avatar it will display the noavatar.gif that you will need to upload to your misc image directory.

I'm not hi-jacking this thread and I am offering 0 support. You just seemed desperate for a modification like this so I thought I'd be nice. I might release it as it's own hack if there's a demand.

On a side note, I sent the original author a new copy of his hack which worked with filesystem and db avatars back in May but I guess he opted not to release it *shrug*

Anyway xcingix, you can download your own personal mod here

Only thing I can think of that may suck for you is if you're using table prefixes, think I forgot to add that to a couple lines in the first query because, well, I'm tired :D

Thanks.
Hope you're around when 3.7.0 comes out.
I'm holding off on mods till then.

TCE Killa 22 Jan 2008 18:02

This is great but it doesn't show the default avatars nor does it show avatars that are already on the forums. Just shows avatars that have been uploaded by people manually or from a website.

rigodiaz 29 Jan 2008 00:50

Beautiful!

Thanks!

AngelMR 29 Feb 2008 04:38

nice work

Magnum164 01 Mar 2008 16:18

Got it loaded and works good. However it needs to show the default Avatar as opposed to the users custom avatar.

Anyway to change this?

Magnum164 04 Mar 2008 02:56

I have this installed, but not working yet. I have not been able to get it to work on regular avatars, only custom avatars and a couple of forums have no avatars at all.

Any idea how to get default avatars to show for a user?

Amenadiel 02 Apr 2008 04:49

I succeded in using this mod with filesystem based avatars, but I had to add a second get_avatar_url (which I named get_avatar_url2 very original) in functions_user.php just forcing it to get the file based one.

By the way, is it right to guess this mod adds as many querys to forumdisplay.php as threads we have listed?

Boofo 02 Apr 2008 04:52

fetch_avatar_url will add a query for every unique avatar it pulls.

stonner 11 May 2008 20:35

does this work with vb 3.7? couldnt find the code in the template...

brainegg 21 May 2008 17:19

Got it working for 3.7. Great plugin! Make sure to add $avatar in the threadbit template or else it won't work. Like this:

$avatar<if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&t=$thread[threadid]" id="thread_gotonew_$thread[realthreadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>

Also, some people have some oddly shaped avatars uploaded so you should only specify the width of the avatar in the plugin and leave the height at 100%. It looks better to me.

studentsforum 20 Aug 2008 09:24

Quote:

Originally Posted by brainegg (Post 1526963)
Got it working for 3.7. Great plugin! Make sure to add $avatar in the threadbit template or else it won't work. Like this:

$avatar<if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&t=$thread[threadid]" id="thread_gotonew_$thread[realthreadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>

Also, some people have some oddly shaped avatars uploaded so you should only specify the width of the avatar in the plugin and leave the height at 100%. It looks better to me.

wow well done! Must have not seen that in the instructions above! *sigh*

Quote:

Originally Posted by Magnum164 (Post 1456383)
I have this installed, but not working yet. I have not been able to get it to work on regular avatars, only custom avatars and a couple of forums have no avatars at all.

Any idea how to get default avatars to show for a user?

I also have this annoying problem.

Until something can be done about this, I am going to uninstall.

sub_ubi 31 Jan 2009 06:38

how is this going on 3.8?

6piston 10 Feb 2009 15:12

hi all

this is a great mod.

but,
i really need anyone's help in this

I am trying to only get this mod to display avatars of a certain group only. Paid Subscribers mainly. It should not display avatars from any other usergroup

Can anyone help me?

Thanks!
Tom

6piston 11 Feb 2009 08:00

anyone?

Mostjolly 26 Sep 2010 18:28

Quote:

Originally Posted by sub_ubi (Post 1729707)
how is this going on 3.8?

Confirmed, works on 3.8.2.

Anyhow, I'm looking forward someone could provide codes it'll display not only forumdisplay but also on search results and today's/new post templates.

Erica1977 16 Apr 2011 06:33

1 Attachment(s)
Allan can you help me please i get a array see red arrow pointing to array cause of this when you only hit new post or when you hit on top right unread post see picture that array.

Attachment 128210

now the avatars show find without the array if you hit a thread in main forum it just dont show when i hit new post or unread post to the top corner right is there anyway i can fix this thanks im useing 3.8.7 vbulletin too.

Erica1977 16 Apr 2011 23:20

Quote:

Originally Posted by AntiThesis (Post 1366590)
I find that replacing image.php?u=$userid with $avatarurl[0] helps a great deal as it seems to handle better.

So it would look like: <img src='$avatarurl[0]'

That and changing "Profile de AntiThesis" to "Profile for AntiThesis" :)



Simply adding the following code to search_results_threadbit works:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Never mind got the array fixed with the code that was post it on this quote Thanks.:)

nacaruncr 22 Apr 2011 02:21

how i can do it for this appear that this form:
https://www.vbulletin.org/forum/external/2012/07/34.png

i try but i don't get it.. some one can help me?

ricardoNJ 18 Jul 2012 05:08

Quote:

Originally Posted by nacaruncr (Post 2187220)
how i can do it for this appear that this form:
https://www.vbulletin.org/forum/external/2012/07/34.png

i try but i don't get it.. some one can help me?

Same question here:

How can we make the image modification in this pluging?
vB 3.8.4. work perfect (at this moment)

lasalle6969 19 Aug 2013 01:58

So good!!!


All times are GMT. The time now is 03:01.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.