Previous Thread
Next Thread
Print Thread
Rate Thread
Show Users Last on Time
#317776 01/31/2009 7:29 PM
Joined: Jun 2000
Posts: 190
Pilgrim Offline OP
Enthusiast
OP Offline
Enthusiast
Joined: Jun 2000
Posts: 190
This mod was first introduced by Zachary and issued by Josh Pet %20Show%20Uses's%20las.html#Post276144]here.

Has this hack been done for 7.4.x? If not, it would be one which I would appreciate seeing again. It allows Admins and Mods to see the last time a member was online when viewing their profile.


Artificial Intelligence is no match for natural stupidity!
Sponsored Links
Re: Show Users Last on Time
Pilgrim #317778 01/31/2009 9:59 PM
Joined: Aug 2000
Posts: 1,609
AKD96 Offline
Addict
Offline
Addict
Joined: Aug 2000
Posts: 1,609
This one's easy enough.

In showprofile.inc.php

Find:
PHP Code
t2.USER_AIM,t2.USER_SIGNATURE,t2.USER_MOOD 
Replace with:
PHP Code
t2.USER_AIM,t2.USER_SIGNATURE,t2.USER_MOOD,t3.USER_LAST_VISIT_TIME 

Find:
PHP Code

{$config['TABLE_PREFIX']}USER_PROFILE as t2
WHERE t1
.USER_ID = ?
AND
t1.USER_ID = t2.USER_ID
Replace with:
PHP Code

{$config['TABLE_PREFIX']}USER_PROFILE as t2,
{
$config['TABLE_PREFIX']}USER_DATA as t3
WHERE t1
.USER_ID = ?
AND
t1.USER_ID = t2.USER_ID
AND t1.USER_ID = t3.USER_ID

Find:
PHP Code
$Signature,$mood) = $dbh -> fetch_array($sth); 
Replace with:
PHP Code
$Signature,$mood,$lastvisit) = $dbh -> fetch_array($sth); 

Find:
PHP Code

$date
= $html -> convert_time($Registered,$toffset,$user['USER_TIME_FORMAT']);
Add after:
PHP Code

$datelastvisit
= $html -> convert_time($lastvisit,$toffset,$user['USER_TIME_FORMAT']);

Find:
PHP Code

"date" => $date,
Add after:
PHP Code

"datelastvisit" => $datelastvisit,


In showprofile.php in your languages folder

Find:
PHP Code
$ubbt_lang['REGGED_ON'] = "Registered on"; 
Add after:
PHP Code
$ubbt_lang['LAST_VISIT'] = "Last Visited"; 


In showprofile.tpl

Find:
PHP Code

<tr>
<
td>
<
b>{$lang.REGGED_ON}:</b>
</
td>
<
td>
&
nbsp; {$date} &nbsp;
</
td>
</
tr>
Add after:
PHP Code

<tr>
<
td>
<
b>{$lang.LAST_VISIT}:</b>
</
td>
<
td>
&
nbsp; {$datelastvisit} &nbsp;
</
td>
</
tr>

Voila! This will show everyone that can view profiles when the person was on last. Tested and working on 7.4.2. Enjoy!

Re: Show Users Last on Time
#317779 02/01/2009 1:30 AM
Joined: Jan 2000
Posts: 5,795
Likes: 8
Gizmo Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,795
Likes: 8
Heres where I make the comment that modifying the stock code of your UBB install makes it unsupportable through official channels :x...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: Show Users Last on Time
Gizmo #317782 02/01/2009 8:35 AM
Joined: Jun 2000
Posts: 190
Pilgrim Offline OP
Enthusiast
OP Offline
Enthusiast
Joined: Jun 2000
Posts: 190
[Linked Image]


Artificial Intelligence is no match for natural stupidity!
Re: Show Users Last on Time
Pilgrim #317783 02/01/2009 8:56 AM
Joined: Aug 2000
Posts: 1,609
AKD96 Offline
Addict
Offline
Addict
Joined: Aug 2000
Posts: 1,609
Mee voyd warinteez! crazy

You're welcome Pilgrim. smile

Sponsored Links
Re: Show Users Last on Time
#317786 02/01/2009 8:57 PM
Joined: Aug 2000
Posts: 1,609
AKD96 Offline
Addict
Offline
Addict
Joined: Aug 2000
Posts: 1,609
I put it all in a nifty text file and posted it here.

Re: Show Users Last on Time
AKD96 #317796 02/10/2009 1:53 PM
Joined: Jun 2000
Posts: 190
Pilgrim Offline OP
Enthusiast
OP Offline
Enthusiast
Joined: Jun 2000
Posts: 190
Just thought I'd say "Thanks!" here too for providing this once again. It works great. [Linked Image]


Artificial Intelligence is no match for natural stupidity!

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
jgeoff
jgeoff
NJ
Posts: 96
Joined: April 2001
Forum Statistics
Forums63
Topics37,529
Posts293,720
Members13,834
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 118
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 17
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,795
Greg Hard 4,625
Top Posters(30 Days)
isaac 2
Top Likes Received
isaac 33
Gizmo 8
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 3
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20200216.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.048s Queries: 29 (0.016s) Memory: 3.2926 MB (Peak: 3.4590 MB) Data Comp: Zlib Server Time: 2020-02-17 12:21:17 UTC
Valid HTML 5 and Valid CSS