SMF For Free Support Forum
Signup For Free Forum
December 04, 2008, 08:39:35 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: [Code] Offline Avatar V2  (Read 1001 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
*****
Offline Offline

Posts: 669


Do not PM me for Code Support or Request


View Profile
« on: September 21, 2007, 08:27:42 pm »

Add this to your headers if you don't have it:
Code:
<script src="/jquery.js"></script>



Code:
<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 » Logged



SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/cen
Spoken
SMF For Free Sr. Member
*
Offline Offline

Posts: 427


Previously known as Colonel Pepsi


View Profile WWW
« Reply #1 on: August 27, 2008, 12:40:44 pm »

Got any sample avatars?
Logged

Agent Moose
Moderator
*****
Offline Offline

Posts: 669


Do not PM me for Code Support or Request


View Profile
« Reply #2 on: August 27, 2008, 04:17:43 pm »

Sorry, but no.  You add your own avatars to it Tongue
Logged



SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/cen
Spoken
SMF For Free Sr. Member
*
Offline Offline

Posts: 427


Previously known as Colonel Pepsi


View Profile WWW
« Reply #3 on: August 27, 2008, 04:18:03 pm »

ok. thanks
Logged

Spoken
SMF For Free Sr. Member
*
Offline Offline

Posts: 427


Previously known as Colonel Pepsi


View Profile WWW
« 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?
Logged

- Lawrence -
SMF For Free Full Member
*
Offline Offline

Posts: 181


aka FreeAdverts


View Profile WWW
« 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 » Logged

Signed,
         - Lawrence -

aka    FreeAdverts



simply sibyl
Female Type
Global Moderator
*
Offline Offline

Posts: 9429


Please do not PM for Support


View Profile WWW
« 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.
Logged

- Lawrence -
SMF For Free Full Member
*
Offline Offline

Posts: 181


aka FreeAdverts


View Profile WWW
« Reply #7 on: October 17, 2008, 12:58:01 pm »

Forum Url: http://freeadverts.smfforfree3.com
It doesn't appear to work anyway.

Code:
<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?
Logged

Signed,
         - Lawrence -

aka    FreeAdverts



LaundryLady
Global Moderator
*
Offline Offline

Posts: 3083


Multi-Tasking Maven


View Profile
« 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.
Logged
- Lawrence -
SMF For Free Full Member
*
Offline Offline

Posts: 181


aka FreeAdverts


View Profile WWW
« Reply #9 on: October 17, 2008, 03:17:15 pm »

I have done that and there was no change.
Logged

Signed,
         - Lawrence -

aka    FreeAdverts



Royal Boo
SMF For Free Sponsors
*
Offline Offline

Posts: 738

Its Boo


View Profile
« Reply #10 on: October 18, 2008, 02:43:08 pm »



For such a code. its woderful!  Tongue
Logged


Pages: [1]
  Print  
 
Jump to:  

cheap low cost web hosting reviews

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.301 seconds with 17 queries.