Advertise Here

Author Topic: [Code] Offline Avatar V2  (Read 5019 times)

0 Members and 1 Guest are viewing this topic.

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
[Code] Offline Avatar V2
« on: September 21, 2007, 08:27:42 pm »
Add this to your headers if you don't have it:
Code: [Select]
<script src="/jquery.js"></script>


Code: [Select]
<script>
function offline_avatar_v2(tehNaME,tehImAGE) {
//Created by Agent Moose (smcodes.smfforfree3.com)
$(function() {
$("td b a:contains("+tehNaME+")").parent().next().children().next().next().next().next("span.smalltext:contains(Offline)").next().next().next().next().next().children("img.avatar").attr("src",tehImAGE)
});}
offline_avatar_v2("USERNAME","IMAGE URL")
</script>

This is just like v1, but, this time you only change a certain members avatar if they are offline.

USERNAME = Put the Username of the person who you want there avatar to change if offline
IMAGE URL = The image the users avatar will be if offline

If you want to add more users, just add more of these lines:
offline_avatar_v2("USERNAME","IMAGE URL")
« Last Edit: May 02, 2008, 04:09:37 pm by simply sibyl »
Check out Revolution X's Brand new Code Index!

Offline Josh[y]

  • SMF For Free Sr. Member
  • *
  • Posts: 478
  • <Insert whitty tagline here.>
    • View Profile

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Offline Avatar V2
« Reply #1 on: August 27, 2008, 12:40:44 pm »
Got any sample avatars?

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
Re: [Code] Offline Avatar V2
« Reply #2 on: August 27, 2008, 04:17:43 pm »
Sorry, but no.  You add your own avatars to it :P
Check out Revolution X's Brand new Code Index!

Offline Josh[y]

  • SMF For Free Sr. Member
  • *
  • Posts: 478
  • <Insert whitty tagline here.>
    • View Profile

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Offline Avatar V2
« Reply #3 on: August 27, 2008, 04:18:03 pm »
ok. thanks

Offline Josh[y]

  • SMF For Free Sr. Member
  • *
  • Posts: 478
  • <Insert whitty tagline here.>
    • View Profile

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Offline Avatar V2
« Reply #4 on: October 16, 2008, 08:02:19 pm »
Do you think it would be possible to make it so when the member is offline it changes their avatar to grayscale?

Offline - Lawrence -

  • SMF For Free Hero
  • *
  • Posts: 549
    • View Profile

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Offline Avatar V2
« Reply #5 on: October 17, 2008, 12:47:39 pm »
Could you not just create a greyscale version of the image and use that? Although saying that a code that could automatically do it would be cool.
« Last Edit: October 17, 2008, 12:51:37 pm by FreeAdverts »

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: [Code] Offline Avatar V2
« Reply #6 on: October 17, 2008, 12:50:40 pm »
Could you not just create a greyscale version of the image and use that.

Pretty much what would have to be done.  I cannot see a way that the code could greyscale anyones avatars.

Offline - Lawrence -

  • SMF For Free Hero
  • *
  • Posts: 549
    • View Profile

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Offline Avatar V2
« Reply #7 on: October 17, 2008, 12:58:01 pm »
Forum Url: http://freeadverts.smfforfree3.com
It doesn't appear to work anyway.

Code: [Select]
<script>
function offline_avatar_v2(tehNaME,tehImAGE) {
//Created by Agent Moose (smcodes.smfforfree3.com)
$(function() {
$("td b a:contains("+tehNaME+")").parent().next().children().next().next().next().next("span.smalltext:contains(Offline)").next().next().next().next().next().children("img.avatar").attr("src",tehImAGE)
});}
offline_avatar_v2("lawrence","http://i173.photobucket.com/albums/w57/Biggy13123456/Grey.gif")
</script>
My username is "Lawrence" and the offline avatar is at http://i173.photobucket.com/albums/w57/Biggy13123456/Grey.gif, yet it won't work.

Anyone know why?

Offline LaundryLady

  • Helpers
  • *
  • Posts: 3253
  • Internet Challenged
    • View Profile

  • Total Badges: 26
    Badges: (View All)
    Seventh year Anniversary Sixth year Anniversary Search Poll Voter Level 5
Re: [Code] Offline Avatar V2
« Reply #8 on: October 17, 2008, 02:33:50 pm »
Make sure that you are putting your name in correctly.  If it uses an upper case L make sure you have it that way in the code.


And I Play:  Mafia-Mandemz

Offline - Lawrence -

  • SMF For Free Hero
  • *
  • Posts: 549
    • View Profile

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Offline Avatar V2
« Reply #9 on: October 17, 2008, 03:17:15 pm »
I have done that and there was no change.

Offline Suki The Saluki

  • SMF For Free Sponsors
  • *
  • Posts: 827
    • View Profile

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Offline Avatar V2
« Reply #10 on: October 18, 2008, 02:43:08 pm »


For such a code. its woderful!  :P

Offline - Lawrence -

  • SMF For Free Hero
  • *
  • Posts: 549
    • View Profile

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Offline Avatar V2
« Reply #11 on: December 23, 2008, 07:12:40 am »
I know that I have already asked for help with this, but it still doesn't work, can someone please tell me why, and how to fix it?

 

Related Topics

  Subject / Started by Replies Last post
19 Replies
6398 Views
Last post February 07, 2008, 03:57:09 pm
by Molly
5 Replies
1866 Views
Last post May 07, 2008, 03:48:27 am
by gム尺y
4 Replies
1272 Views
Last post October 07, 2008, 09:31:54 am
by Josh[y]
21 Replies
7380 Views
Last post July 10, 2009, 08:52:55 am
by mordex