Previous Thread
Next Thread
Print Thread
Rate Thread
#317776 01/31/2009 8:29 PM
Joined: Jun 2000
Posts: 190
Enthusiast
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
Addict
Offline
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,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
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, My UBB Scripts
Joined: Jun 2000
Posts: 190
Enthusiast
Enthusiast
Joined: Jun 2000
Posts: 190
[Linked Image]


Artificial Intelligence is no match for natural stupidity!
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Mee voyd warinteez! crazy

You're welcome Pilgrim. smile

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

Joined: Jun 2000
Posts: 190
Enthusiast
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
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)