Add Last Visit field to AdminCP
What does it do?
This code change will add the Last Visit time field to the user edit screen in the AdminCP. Not sure why this hasn't been added to the standard code set but I've been wanting this for a while. I figured others might too. This does make a simple change to the vbulletin user.php file. What to do: To make the change do the following. Anytime you make a change you may want to make a copy of the file in case for some strange reason the fille get corrupted. Either that or just replace it with the originial file from the distribution zip. 1. Open the user.php file in your AdminCP folder in Notepad++ or your favor text editor. 2. Go to line 473. On or about line 478 will be the array element for lastpost. Insert a new lastvisit array element after the lastpost array element which should look like the following: PHP Code:
$user = array(
3. Find the "TIME FIELDS SECTION" of code which starts on or about line 935. 4. Insert the following line of code below the last activity field which is on or about line 941. PHP Code:
print_time_row($vbphrase['last_visit'], 'user[lastvisit]', $user['lastvisit']);
You're done. Log into your adminCP and check your work. You should now have the Last Visit time field in the user edit screen. Download No files for download. Screenshots |
Similar Mods
Forum Home Enhancements Visit Statistics 1.1 - Visit Counter for vBulletin | vBulletin 3.6 Add-ons |