Welcome, Guest. Please Login or Register.
November 24, 2017, 10:42:39 PM
Home Help Search Login Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

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


I'm a llama!


i want see avatar in boardindex helppp
« on: March 20, 2004, 12: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



WWW
Re:i want see avatar in boardindex helppp
« Reply #1 on: March 20, 2004, 03: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


WWW
Re:i want see avatar in boardindex helppp
« Reply #2 on: March 20, 2004, 08:49:25 PM »
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, 01: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


WWW
Re:i want see avatar in boardindex helppp
« Reply #4 on: March 21, 2004, 10:30:38 AM »
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, 12: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


WWW
Re:i want see avatar in boardindex helppp
« Reply #6 on: March 22, 2004, 09:24:24 AM »
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:

Code: [Select]
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:
Code: [Select]
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, 06: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


WWW
Re:i want see avatar in boardindex helppp
« Reply #8 on: March 22, 2004, 06:10:29 PM »
Reply with quote

Sorry, I messed up part of it.

Replace this section:

Code: [Select]
 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:

Code: [Select]
 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, 03: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  |  Topic: 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.0.12 | SMF © 2016, Simple Machines
Valid XHTML 1.0! Valid CSS!
Page created in 0.38 seconds with 19 queries.