Advertisement:

Author Topic: Add Avatar To Who Is Online  (Read 26662 times)

Offline bolubeyi61

  • Sr. Member
  • ****
  • Posts: 758
  • Gender: Male
    • Spina Bifida Turkey
Add Avatar To Who Is Online
« on: February 27, 2013, 09:06:39 PM »
Link to Mod
Add Avatar To Who Is Online Mod

Current Theme / ThemeSettings : (Active and select avatar height)


Screenshots




Demo: Click

Mod by: bolubeyi61


Add Avatar To Who IsOnline by smf modifications is licensed under a Creative Commons Attribution 3.0 Unported License.
Linkteki çalışma baz alınarak yapılmıştır http://custom.simplemachines.org/mods/index.php?mod=3655.

« Last Edit: March 07, 2013, 10:06:12 AM by bolubeyi61 »

Offline Costa

  • SMF Hero
  • ******
  • Posts: 3,045
  • Gender: Male
  • Do NOT feed the trolls...
Re: Add Avatar To Who Is Online
« Reply #1 on: February 27, 2013, 09:11:26 PM »
Congratulations for your first mod.
Hugo "Costa" Fernandes
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Offline bolubeyi61

  • Sr. Member
  • ****
  • Posts: 758
  • Gender: Male
    • Spina Bifida Turkey
Re: Add Avatar To Who Is Online
« Reply #2 on: February 28, 2013, 12:06:43 AM »
Yes. My first mod. Thanks.

Offline Colin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,874
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: Add Avatar To Who Is Online
« Reply #3 on: February 28, 2013, 12:07:15 AM »
Congratulations! Nice work. I look to see more great mods from you.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,157
  • Gender: Male
    • i30 Owners Club
Re: Add Avatar To Who Is Online
« Reply #4 on: February 28, 2013, 03:40:49 AM »
Worked pretty well, nice one.

However, it made my online list far too "tall" (as I expected it might) and for me it's unusable, but a grand idea nonetheless :)

Offline Mr. Pedram

  • Full Member
  • ***
  • Posts: 591
  • Gender: Male
  • SMF MOD Developer
    • LinkinParkPersianFans on Facebook
    • @LPFans_Ir on Twitter
    • Linkin Park Persian Website
Re: Add Avatar To Who Is Online
« Reply #5 on: February 28, 2013, 08:48:22 AM »
nice MOD , congratulations

try this, it will be better for avatars

Code: (find) [Select]
<span class="who_is_avatar"><a href="who_is_avatar" title="' . $txt['profile_of'] . ' ">', $member['avatar']['image'], '</a></span>                         

Code: (replace) [Select]
<div class="who_is_avatar"><a href=href="who_is_avatar" title="' . $txt['profile_of'] . ' ">', $member['avatar']['image'], '</a></div>
Code: [Select]
.who_is_avatar {
    width: 75px;
    height: 75px;
    border: 1px solid #000000;
    overflow: hidden;
    position: relative;
}

.who_is_avatar img {
    width: 75px;
    height: auto;
    position: relative;
}

but must change no avatar to another 75px img
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

Offline FrizzleFried

  • Drama-Monger
  • Sr. Member
  • ****
  • Posts: 757
Re: Add Avatar To Who Is Online
« Reply #6 on: February 28, 2013, 12:57:10 PM »
This error is popping up when people access the WHOIS area with this mod installed:

Code: [Select]
http://www.xxx.com/index.php?action=who
8: Undefined index: avatar
File: /home/ahaforum/public_html/Themes/default/Who.template.php
Line: 61

Offline Mr. Pedram

  • Full Member
  • ***
  • Posts: 591
  • Gender: Male
  • SMF MOD Developer
    • LinkinParkPersianFans on Facebook
    • @LPFans_Ir on Twitter
    • Linkin Park Persian Website
Re: Add Avatar To Who Is Online
« Reply #7 on: February 28, 2013, 02:32:01 PM »
and another thing,
when you click on user avatar, it goes to your profile, not that user

Code: (find) [Select]
href="' . $member['href'] . '"
Code: (replace) [Select]
href="', $scripturl, '?action=profile;u=', $member['id'], '"
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,471
  • Master of BBC Abuse
Re: Add Avatar To Who Is Online
« Reply #8 on: February 28, 2013, 03:43:43 PM »
Since the avatar is inside a table cell there is no need for extra markup around the anchor. You could do it like this.
     
Code: [Select]
<a href="', $scripturl, '?action=profile;u=', $member['id'], '" class="who_is_avatar" title="', $txt['profile_of'], ' ', $member['name'], ' ">', $member['avatar']['image'], '</a>
Code: [Select]
.who_is_avatar {
    width: 75px;
    height: 75px;
    display: block;
}

.who_is_avatar img {
    max-width: 75px;
    max-height: 75px;
    width: auto;
    height: auto;
}

You don't need to specify relative positioning or hidden overflow. :)

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,471
  • Master of BBC Abuse
Re: Add Avatar To Who Is Online
« Reply #9 on: February 28, 2013, 03:53:11 PM »
Oh and the parsing instructions for index.css aren't right. CSS files don't have a ?> at the end of them. ;)

Offline FrizzleFried

  • Drama-Monger
  • Sr. Member
  • ****
  • Posts: 757
Re: Add Avatar To Who Is Online
« Reply #10 on: March 02, 2013, 12:01:52 AM »
Just tried the new version.  Regardless of the size I put in for max avatar size,  I get full size avatars.

I am also still getting the invalid index error I mentioned in my reply above.

I'm running a pretty modified version of the curve theme...

Thanks...


EDIT: Correction... it's showing full size with the Firefox 19.0 browser... Chrome the size is correct.  The error remains of course.

Offline bolubeyi61

  • Sr. Member
  • ****
  • Posts: 758
  • Gender: Male
    • Spina Bifida Turkey
Re: Add Avatar To Who Is Online
« Reply #11 on: March 02, 2013, 12:03:50 AM »
mod updated
New version: AddAvatarToWhoIsOnlineV11.zip

Offline impreza

  • Sophist Member
  • *****
  • Posts: 1,054
    • infomiasto.eu
Re: Add Avatar To Who Is Online
« Reply #12 on: March 07, 2013, 06:10:42 AM »
An interesting add-on, recognizes only logged and not the ip guests?
Portal infomiasto.eu - treści w postaci artykułów i filmów tematycznych

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,157
  • Gender: Male
    • i30 Owners Club
Re: Add Avatar To Who Is Online
« Reply #13 on: March 07, 2013, 06:20:02 AM »
I think the BEFORE and AFTER screenshots are mixed up :D








Offline bolubeyi61

  • Sr. Member
  • ****
  • Posts: 758
  • Gender: Male
    • Spina Bifida Turkey
Re: Add Avatar To Who Is Online
« Reply #14 on: March 07, 2013, 10:08:04 AM »
thanks. images edited.

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,108
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Re: Add Avatar To Who Is Online
« Reply #15 on: March 10, 2013, 09:52:53 AM »
Using V1.1 of the mod on a 2.0.4 forum and still getting the error message as mentioned earlier by FrizzleFried.

Code: [Select]
http://www.fiftyplusforum.co.uk/forum/index.php?action=who

8: Undefined index: avatar

File: /removed/removed/removed/forum/Themes/default/Who.template.php
Line: 73

Any ideas?
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Offline bolubeyi61

  • Sr. Member
  • ****
  • Posts: 758
  • Gender: Male
    • Spina Bifida Turkey
Re: Add Avatar To Who Is Online
« Reply #16 on: March 10, 2013, 10:24:06 AM »
I have tested. Not modified default theme no problem. Other themes are likely to be the problem.

Offline FrizzleFried

  • Drama-Monger
  • Sr. Member
  • ****
  • Posts: 757
Re: Add Avatar To Who Is Online
« Reply #17 on: March 10, 2013, 07:22:44 PM »
Using V1.1 of the mod on a 2.0.4 forum and still getting the error message as mentioned earlier by FrizzleFried.

Code: [Select]
http://www.fiftyplusforum.co.uk/forum/index.php?action=who

8: Undefined index: avatar

File: /removed/removed/removed/forum/Themes/default/Who.template.php
Line: 73

Any ideas?

Glad I'm not the only one..... ;)

Also,  resizing of avatar only works for Chrome with me.  FF does not resize avatars.

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,108
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Re: Add Avatar To Who Is Online
« Reply #18 on: March 11, 2013, 03:33:30 AM »
Using V1.1 of the mod on a 2.0.4 forum and still getting the error message as mentioned earlier by FrizzleFried.

Code: [Select]
http://www.fiftyplusforum.co.uk/forum/index.php?action=who

8: Undefined index: avatar

File: /removed/removed/removed/forum/Themes/default/Who.template.php
Line: 73

Any ideas?

Glad I'm not the only one..... ;)

Also,  resizing of avatar only works for Chrome with me.  FF does not resize avatars.

Works for me on FF see attached 30 & 40px sizes.

In Avatar settings I have for External Avatars:
If the avatar is too large... > Let HTML resize it
and for Uploaded Avatars:
Resize oversized large avatars > Checked

I seem to recall other options for this didn't work so well for FireFox. Maybe that might be the cause of your issue?
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Offline 4Kstore

  • SMF Hero
  • ******
  • Posts: 4,317
  • Gender: Male
    • agustintari on Facebook
    • @agustintarifa on Twitter
    • SSIMPLE TEAM PAGE
Re: Add Avatar To Who Is Online
« Reply #19 on: March 11, 2013, 09:47:55 AM »
Nice work, thanks for share!
¡¡NEW MOD: Sparkles User Names!!!