PDA

View Full Version : Avatar on forumdisplay


Allan
01-07-2007, 10:00 PM
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))
.avatar_forumdisplay {
padding:0px 5px 0px 0px;
}



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

https://vborg.vbsupport.ru/





In threadbit template, find:
<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/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>

Before, add this code:
$avatar~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[I]Version 1.1: Add avatar by default (Big thank to Fred for plugin ;))

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

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

geveze
01-09-2007, 02:17 AM
oo thanks :D

installed

PennylessZ28
01-09-2007, 02:53 AM
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
01-09-2007, 03:02 AM
WOn't work if avatars in saved in the file system I should say. Paths are different. :)

delaen1
01-09-2007, 12:34 PM
Any way to get it to display a default avatar if the user doesn't have one?

SkyCatcher
01-09-2007, 11:00 PM
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
01-10-2007, 08:03 AM
Version 1.1: Add avatar by default (Big thank to Fred for plugin )

delaen1
01-12-2007, 02:10 PM
Sweet. Thanks Allan.

GruntHalo
01-12-2007, 04:48 PM
Not bad dude, Installed.

hoopsta
01-13-2007, 02:50 AM
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
01-14-2007, 02:15 AM
Would like to know the same...very vague

Allan
01-14-2007, 08:17 AM
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
01-16-2007, 10:11 PM
How i install the mods in "search.php?do=getnew" ???

G3MM4
01-17-2007, 07:20 AM
Nice. It's not something I would use at the moment but it's a cool idea.

donaldgkimball
01-17-2007, 08:18 AM
This is a neat addition. Thanks.

Installed.

trancetopia
01-17-2007, 04:01 PM
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
01-20-2007, 10:49 AM
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
01-21-2007, 01:35 PM
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
01-22-2007, 05:02 PM
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-02-2007, 06:50 PM
is there another one that works for 3.5.X?

salata
02-05-2007, 02:25 PM
is there a way to make this work in 3.5.4?

PennylessZ28
02-06-2007, 06:36 PM
still no worky for file system

eNforce
02-06-2007, 07:38 PM
Please add the ability to pull avatars from the file system :)

aceofspades
02-08-2007, 01:00 PM
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
02-08-2007, 04:24 PM
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
02-08-2007, 08:19 PM
Awesome, i thought it would be harder than that but i guess not, i can also change:

Profil de $username
to english :D

Allan
02-08-2007, 08:22 PM
Awesome, i thought it would be harder than that but i guess not, i can also change:


to english :D
Oupss, yes :p

salata
02-09-2007, 01:08 PM
is there a way to make this work in 3.5.4?

bump

Allan
02-09-2007, 02:11 PM
Test it ^^

salata
02-10-2007, 04:26 AM
Test it ^^

i did. i get this error.

### 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
02-16-2007, 12:07 PM
Great idea! Thanks for sharing, Allan!

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
02-16-2007, 04:21 PM
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
02-28-2007, 10:41 PM
Where is this aucun_avatar.gif I am supposed to upload?

Soliloquy
02-28-2007, 10:47 PM
It wasn't included; I believe you're supposed to use your own file and name it aucun_avatar.gif.

Tom_S
02-28-2007, 10:56 PM
No..actually I found the critter. It is that little green bird with the screenshots LOL

Soliloquy
03-19-2007, 04:15 PM
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 (https://vborg.vbsupport.ru/showthread.php?t=127414) 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
07-13-2007, 05:18 PM
I will try to get this one in my forum.

xcingix
07-13-2007, 09:06 PM
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
07-17-2007, 04:45 AM
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 (http://www.probetreff.com/threadbit_lp_avatars.zip)

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
07-17-2007, 12:38 PM
I want to give the users the possility to choose, maybe they want it or maybe not...

So I added the following code:

<if condition="$post[field9] == Ja">$avatar</if>

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
07-20-2007, 07:30 PM
installed
this working fine
thanks

stonner
09-12-2007, 10:14 PM
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
09-12-2007, 10:19 PM
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
09-17-2007, 08:43 PM
no help with this?

thank you!

DoB Rhapsody
09-29-2007, 06:37 PM
I would really love for someone to take over this mod because it is actually very good.

ShawneyJ
10-01-2007, 08:12 AM
lol love it.

JtChurch925
10-04-2007, 04:19 PM
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
10-05-2007, 02:17 PM
Anyone know how to make this show up when you hit view new posts?

AntiThesis
10-23-2007, 08:19 AM
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" :)


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

Simply adding the following code to search_results_threadbit works:

require_once('./includes/functions_user.php');
$userid = $thread['postuserid'];
$username = $thread['postusername'];
$avatarurl = fetch_avatar_url($userid);
if ($avatarurl == '') {
$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='Profile for $username'></a></div>";
}
else {
$avatar = "<div class='avatar_forumdisplay' style='float:$stylevar[left]'><a href='member.php?u=$userid'><img src='$avatarurl[0]' border='0' width='50' height='50' alt='Profile for $username'></a></div>";
}

Evolution06
10-23-2007, 05:10 PM
Awesome! *installed* adds a good look to the forums.

gator777
11-02-2007, 01:02 AM
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:

require_once('./includes/functions_user.php');
$userid = $thread['postuserid'];
$username = $thread['postusername'];
$avatarurl = fetch_avatar_url($userid);
if ($avatarurl == '') {
$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='Profile for $username'></a></div>";
}
else {
$avatar = "<div class='avatar_forumdisplay' style='float:$stylevar[left]'><a href='member.php?u=$userid'><img src='$avatarurl[0]' border='0' width='50' height='50' alt='Profile for $username'></a></div>";
}


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
11-03-2007, 02:46 PM
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
11-03-2007, 06:57 PM
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
12-03-2007, 02:56 PM
Does this add an additional query for each thread displayed or how does that fetch_avatar_url function work?

xcingix
12-03-2007, 03:55 PM
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 (http://www.probetreff.com/threadbit_lp_avatars.zip)

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
01-22-2008, 04:02 PM
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
01-28-2008, 10:50 PM
Beautiful!

Thanks!

AngelMR
02-29-2008, 02:38 AM
nice work

Magnum164
03-01-2008, 02:18 PM
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
03-04-2008, 12:56 AM
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
04-02-2008, 02:49 AM
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
04-02-2008, 02:52 AM
fetch_avatar_url will add a query for every unique avatar it pulls.

stonner
05-11-2008, 06:35 PM
does this work with vb 3.7? couldnt find the code in the template...

brainegg
05-21-2008, 03:19 PM
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
08-20-2008, 07:24 AM
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*

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
01-31-2009, 04:38 AM
how is this going on 3.8?

6piston
02-10-2009, 01:12 PM
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
02-11-2009, 06:00 AM
anyone?

Mostjolly
09-26-2010, 04:28 PM
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
04-16-2011, 04:33 AM
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.

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
04-16-2011, 09:20 PM
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:

require_once('./includes/functions_user.php');
$userid = $thread['postuserid'];
$username = $thread['postusername'];
$avatarurl = fetch_avatar_url($userid);
if ($avatarurl == '') {
$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='Profile for $username'></a></div>";
}
else {
$avatar = "<div class='avatar_forumdisplay' style='float:$stylevar[left]'><a href='member.php?u=$userid'><img src='$avatarurl[0]' border='0' width='50' height='50' alt='Profile for $username'></a></div>";
}

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

nacaruncr
04-22-2011, 12:21 AM
how i can do it for this appear that this form:
https://vborg.vbsupport.ru/external/2012/07/34.png

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

ricardoNJ
07-18-2012, 03:08 AM
how i can do it for this appear that this form:
https://vborg.vbsupport.ru/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
08-18-2013, 11:58 PM
So good!!!