Welcome, Guest. Please Login or Register.
March 28, 2024, 03:08:45 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  English User Help  |  English Help  |  i want see avatar in boardindex helppp « previous next »
Pages: [1] Reply Ignore Print
Author Topic: i want see avatar in boardindex helppp  (Read 5692 times)
edi67
Jr. Member
**
Posts: 97


I'm a llama!

i want see avatar in boardindex helppp
« on: March 20, 2004, 05:27:15 PM »
Reply with quote

YaBB SE Version: 1.5.2 to 1.5.4

Problem Description:
how i can load avatars of members in boardindex for see it near title of my forum
Logged

[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:i want see avatar in boardindex helppp
« Reply #1 on: March 20, 2004, 08:47:51 PM »
Reply with quote

This really isn't very easily done in YaBB SE.  I recommend you look at SMF.

-[Unknown]
Logged
Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:i want see avatar in boardindex helppp
« Reply #2 on: March 21, 2004, 01:49:25 AM »
Reply with quote

How do you mean?  Do you want the user who is browsing the forum to see their own avatar?  Or what?
Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
edi67
Jr. Member
**
Posts: 97


I'm a llama!

Re:i want see avatar in boardindex helppp
« Reply #3 on: March 21, 2004, 06:59:34 AM »
Reply with quote

yes Shadow's this i want as in SMF
Logged

Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:i want see avatar in boardindex helppp
« Reply #4 on: March 21, 2004, 03:30:38 PM »
Reply with quote

I did something like this on one of the sites I run.  There is a mod that adds a new tag <yabb avatar> that will show the user's avatar.  Then you just need to set up something in your template to do this.

I don't know if that mod is on this board.  I'll see if I have the mod file still.
Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
edi67
Jr. Member
**
Posts: 97


I'm a llama!

Re:i want see avatar in boardindex helppp
« Reply #5 on: March 22, 2004, 05:24:22 AM »
Reply with quote

i realy wait so much if u can help me thank friend ..u are very gently
Logged

Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:i want see avatar in boardindex helppp
« Reply #6 on: March 22, 2004, 02:24:24 PM »
Reply with quote

I can't find the mod in the Completed Mods board, so here it is.

Open up Subs.php and add this in:


function yyavatar()
{
 global $userpic_width, $userpic_height, $facesurl, $username, $db_prefix;
 $grab_avatar = mysql_query("SELECT avatar FROM {$db_prefix}members WHERE memberName='$username'");
 while ($avatar = mysql_fetch_array($grab_avatar))
 {
         if (stristr($avatar[0],"http://") )
         {
             $pic = "<img src=\"$avatar[0]\" width=\"100\" height=\"100\" border=\"0\" alt=\"\" />";
         }
         else
         {
             $pic = "<img src=\"$facesurl/$avatar[0]\" width=\"100\" height=\"100\" border=\"0\" alt=\"\" />";
         }
 }
 $yyavatar = ($username == 'Guest' ? "<img src=\"$facesurl/blank.gif\" border=\"0\" alt=\"\" />" : "$pic");
 echo $yyavatar;
}


paste that above code in on the line above this:

function checkSession($type = 'post')



Now, in your template, you can call a tag <yabb avatar> which will show the user browsing their board their own avatar.

You can see an application of this at http://www.magickalkingdom.com except guests do not see an avatar.

I also used the Online Time mod, and then a tag that I made to show their time with <yabb utime>
Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
edi67
Jr. Member
**
Posts: 97


I'm a llama!

Re:i want see avatar in boardindex helppp
« Reply #7 on: March 22, 2004, 11:04:52 PM »
Reply with quote

hey man u are the best great......now all my members see own avatar but one little thing more.


dimension of avatar are differente for some members it seems more little in height
Logged

Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:i want see avatar in boardindex helppp
« Reply #8 on: March 22, 2004, 11:10:29 PM »
Reply with quote

Sorry, I messed up part of it.

Replace this section:


 while ($avatar = mysql_fetch_array($grab_avatar))
 {
         if (stristr($avatar[0],"http://") )
         {
             $pic = "<img src=\"$avatar[0]\" width=\"100\" height=\"100\" border=\"0\" alt=\"\" />";
         }
         else
         {
             $pic = "<img src=\"$facesurl/$avatar[0]\" width=\"100\" height=\"100\" border=\"0\" alt=\"\" />";
         }
 }



With this one:


 while ($avatar = mysql_fetch_array($grab_avatar))
 {
         if (stristr($avatar[0],"http://") )
         {
             $pic = "<img src=\"$avatar[0]\" $userpic_width $userpic_height border=\"0\" alt=\"\" />";
         }
         else
         {
             $pic = "<img src=\"$facesurl/$avatar[0]\" border=\"0\" alt=\"\" />";
         }
 }
Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
edi67
Jr. Member
**
Posts: 97


I'm a llama!

Re:i want see avatar in boardindex helppp
« Reply #9 on: March 23, 2004, 08:26:23 AM »
Reply with quote

thankkkkkkss man u are the best ;D
Logged

Pages: [1] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  i want see avatar in boardindex helppp « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.022 seconds with 20 queries.