View Full Version : Quick question
mt_100
11-21-2002, 07:00 PM
I currently have a hack that gives me security on my whole site using the vBulletin user table.
However, unless they enter the forums area non of the last visit or last login items are changed in the table.
I would like to include a quick update to the hack that I know how to do code wise, but need to know which field in the DB to set. I do not want to affect the discussion forums in any way, no icons should change, I just want to set the last time the person logged in so I know the last time they visited my site.
What field to I need to set in the user table to do this without affecting the icons and everything in the forums?
Xenon
11-22-2002, 11:32 AM
well, if you update the lastvisit time, that will affect all new-post icons, there's no way around it....
mt_100
11-22-2002, 11:46 AM
What about the last activity field, any ideas about what it does?
Xenon
11-22-2002, 11:48 AM
it show when a user has been active the last time.
it's been used for automatic logout....
but i think if you just manipulate this field you can get the wanted effect, but i'm not 100% sure
mt_100
11-22-2002, 11:54 AM
Strange, I got a reply on the vBulletin.com board and the guy from the vBulletin team says last activity controls the icons.
I have no idea what to think now...??
Xenon
11-22-2002, 12:05 PM
well, that can happen, but i can tell i'm right here, look at this for example from forumdisplay.php:
if ($userlastvisit<$forum['lastpost']) {
$forum['onoff']='on';
} else {
$forum['onoff']='off';
}
that uses lastvisit for the forumicons
also in forumdisplay:
$forumusers = $DB_site->query("SELECT username, invisible, userid
FROM user
WHERE inforum = $foruminfo[forumid]
AND lastactivity > $datecut
AND lastvisit <> lastactivity");
here is uses lastactivity. it has nothing to do with the icons, just which users browse which forums.
Logician
11-22-2002, 01:48 PM
Why dont you just add a new field to the user table or a profile field editable by admins only and populate this field in your code?
mt_100
11-22-2002, 01:52 PM
I was thinking about that but I didn't want the field to get erased everytime the tables were changed in new upgrades.
Logician
11-22-2002, 04:08 PM
vb upgrades do not modify table data. You just need to add your hack code afterwards, that's all. Your data will be intact :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.