Previous Thread
Next Thread
Print Thread
Rate Thread
#317776 01/31/2009 8: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
Joined: Aug 2000
Posts: 1,609
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!

Joined: Jan 2000
Posts: 5,806
Likes: 10
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,806
Likes: 10
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, I Find Rocks, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
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!
Joined: Aug 2000
Posts: 1,609
Addict
Offline
Addict
Joined: Aug 2000
Posts: 1,609
Mee voyd warinteez! crazy

You're welcome Pilgrim. smile

Sponsored Links
Joined: Aug 2000
Posts: 1,609
Addict
Offline
Addict
Joined: Aug 2000
Posts: 1,609
I put it all in a nifty text file and posted it here.

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
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,545
Posts293,796
Members13,838
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 344
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 16
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,806
Greg Hard 4,625
Top Posters(30 Days)
isaac 20
Top Likes Received
isaac 44
Gizmo 10
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 4
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

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

PHP: 5.4.45 Page Time: 0.059s Queries: 29 (0.027s) Memory: 3.3098 MB (Peak: 3.6279 MB) Data Comp: Zlib Server Time: 2020-09-18 13:11:03 UTC
Valid HTML 5 and Valid CSS