Create A Forum - Support Forums

Support => Create a Forum Codes and Support => Topic started by: aIURbliS on December 08, 2012, 09:03:55 pm

Title: [Code] User action in profile
Post by: aIURbliS 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/ (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>