vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Avatar on forumdisplay (https://vborg.vbsupport.ru/showthread.php?t=135891)

Allan 01-07-2007 10:00 PM

Avatar on forumdisplay
 
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))
Code:

.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:
Code:

<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>
  • Before, add this code:
Code:

$avatar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

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 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

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 02-08-2007 08:19 PM

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 02-08-2007 08:22 PM

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 02-09-2007 01:08 PM

Quote:

Originally Posted by salata (Post 1175243)
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

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 02-16-2007 12:07 PM

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 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 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

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 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:

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:


All times are GMT. The time now is 04:59 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01419 seconds
  • Memory Usage 1,819KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete