Author Topic: [Code] User action in profile  (Read 480 times)

0 Members and 0 Guests are viewing this topic.

Offline aIURbliS

  • Hero Member
  • *****
  • Posts: 1215
  • Karma: 45
  • Gender: Male
  • Location: U.S.
    • View Profile
[Code] User action in profile
« on: December 08, 2012, 09:03:55 pm »
Description: Shows what the user is doing when viewing his/her profile.


This code utilizes jQuery, please use the latest version found in this thread: http://support.createaforum.com/5/jquery-v1-8-update/

Footers:
Code: [Select]
<script>if(/action=profile;u=*/i.test(location.href)||/action=profile/i.test(location.href)){$("#userstatus > span.smalltext").replaceWith("<div id='user_action'>Unable to get user action.</div>");$.ajax({url:smf_scripturl+"?action=who",success:function(data){var xboi209_useraction=$("li.greeting > span").html();$("#user_action").html($(data).find("span.member:contains('"+xboi209_useraction+"')").parents("tr.windowbg").find("td:eq(2)").html())}})}</script>
« Last Edit: December 12, 2012, 04:51:59 am by xboi209 »
All codes I make are tested on the latest version of Google Chrome and upon request of other browsers.

Share on Facebook Share on Twitter


 

Related Topics

  Subject / Started by Replies Last post
2 Replies
2035 Views
Last post November 08, 2011, 02:26:18 am
by The_Original_Modifier
3 Replies
928 Views
Last post February 15, 2012, 10:58:39 pm
by aIURbliS
0 Replies
370 Views
Last post December 04, 2012, 07:05:24 am
by Sir Rob (from Oz)
0 Replies
1064 Views
Last post January 16, 2014, 02:56:39 pm
by abugbeary
4 Replies
1313 Views
Last post June 28, 2014, 08:21:10 pm
by CreateAForum