SMF For Free Support Forum
Signup For Free Forum
December 05, 2008, 11:36:08 am *
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] 2 3 4 5
  Print  
Author Topic: [Code] Show Member Number Under Avatar  (Read 2799 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 25, 2007, 04:59:25 pm »

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


Footers
Code:
<script>
$("td[width='16%'] b a").each(function(){
if(this.href.match(/\?action=profile;u=(\d+)/i)) {
//Created by Agent Moose (smcodes.smfforfree3.com)
var number = RegExp.$1;
$(this).parent().next().find("img.avatar").after("<br>Member Number: "+number)
};});
</script>

Basicly what the called is Smiley  It will show what number each member was when they joined.

EDIT:
Since that one only worked for showing it under the AVatar, if you had one, I made one that will show the number under there username Smiley
Code:
<script>
$("td[width='16%'] b a").each(function(){
//Created by Agent Moose (smcodes.smfforfree3.com)
if(this.href.match(/\?action=profile;u=(\d+)/i)) {
var number = RegExp.$1;
$(this).parent().after("<br/><span class='smalltext'>Member Number: " + number + "</span>");
};});
</script>
« Last Edit: May 02, 2008, 04:16:25 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
Kimmie
SMF For Free Master
*
Offline Offline

Posts: 2010


View Profile WWW
« Reply #1 on: September 25, 2007, 06:45:40 pm »

This will be useful. I've seen this on other forums. Thanks. Smiley


Edit: Just tried it and it works great with IE 6, but it doesn't work with Opera 9.23 or FireFox 5.0

« Last Edit: September 25, 2007, 06:50:46 pm by Kimmie » Logged

Agent Moose
Moderator
*****
Offline Offline

Posts: 669


Do not PM me for Code Support or Request


View Profile
« Reply #2 on: September 25, 2007, 07:52:24 pm »

Wonder why it doesn't work for FF.  Works fine for me.
Logged



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

Posts: 2010


View Profile WWW
« Reply #3 on: September 25, 2007, 08:10:44 pm »

Wonder why it doesn't work for FF.  Works fine for me.

What version of FF are you using? (thats why I listed the version). Mine is Version 5.0 and is a "plain jane" - no major plugins other than what I need to display things properly. I dont ever use it unless I have to. However, I have the most recent version of Opera because I use it all the time, and the code wont work with it either.
Logged

LaundryLady
Global Moderator
*
Offline Offline

Posts: 3083


Multi-Tasking Maven


View Profile
« Reply #4 on: September 26, 2007, 06:26:26 pm »

Cool, Moose.  Works on my FF.  Almost missed it cause it's tiny.
Logged
Coreeeey
SMF For Free Sr. Member
*
Offline Offline

Posts: 311



View Profile WWW
« Reply #5 on: September 26, 2007, 07:26:40 pm »

Forum Url: http://pspforums.smfforfree3.com
Does not work on my forum... Sad
Logged

Coreeeey
SMF For Free Sr. Member
*
Offline Offline

Posts: 311



View Profile WWW
« Reply #6 on: September 27, 2007, 12:32:50 pm »

Forum Url: http://pspforums.smfforfree3.com
can someone help me?
Logged

Kimmie
SMF For Free Master
*
Offline Offline

Posts: 2010


View Profile WWW
« Reply #7 on: September 27, 2007, 01:19:53 pm »

Forum Url: http://pspforums.smfforfree3.com
can someone help me?

IT may be because SMF added the main header code to everyones forums, and according to Moose, its causing some codes not to work.

http://www.smfsupport.com/support/smf_for_free_codes/uploaded_jquery_to_the_smf_for_free_forums-t6578.0.html

I'd just keep an eye on this thread till you have seen that Moose has posted saying he has fixed whatever the issue is and then try it again.
Logged

LaundryLady
Global Moderator
*
Offline Offline

Posts: 3083


Multi-Tasking Maven


View Profile
« Reply #8 on: September 27, 2007, 02:08:11 pm »

Try putting this in your headers and put your forum information in as is indicated.  You have a lot of stuff in there, but I didn't see this part and Moose says it's required. Let us know if it helps.

Code:
<script src="http://YOUR_FORUM.smfforfreeX.com/jquery.js"></script>
Logged
Coreeeey
SMF For Free Sr. Member
*
Offline Offline

Posts: 311



View Profile WWW
« Reply #9 on: September 27, 2007, 08:55:57 pm »

nope, still does not work
Logged

LaundryLady
Global Moderator
*
Offline Offline

Posts: 3083


Multi-Tasking Maven


View Profile
« Reply #10 on: September 28, 2007, 05:24:11 am »

The only other thing I can suggest is moving that line to the bottom of your headers instead of the top.  After that, it's Moose's call.  Sometimes moving it helps.
Logged
Agent Moose
Moderator
*****
Offline Offline

Posts: 669


Do not PM me for Code Support or Request


View Profile
« Reply #11 on: September 28, 2007, 02:15:53 pm »

That code should always be in your headers up at top.  If it is on the bottom, all the codes that are above it, will not work.
Logged



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

Posts: 311



View Profile WWW
« Reply #12 on: September 28, 2007, 08:16:02 pm »

I have the jquery in my headers and everything else is in the footers but it's still not working.
Logged

Agent Moose
Moderator
*****
Offline Offline

Posts: 669


Do not PM me for Code Support or Request


View Profile
« Reply #13 on: September 28, 2007, 08:21:08 pm »

Ah.  I see.  This is one of the codes taht I need to update for it to work with the new thingy.
Logged



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

Posts: 2010


View Profile WWW
« Reply #14 on: September 28, 2007, 08:24:09 pm »

I have the jquery in my headers and everything else is in the footers but it's still not working.

Yours is "semi-working".

It works on this group:


But not this one:
Logged



Pages: [1] 2 3 4 5
  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.43 seconds with 16 queries.