vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Quick question (https://vborg.vbsupport.ru/showthread.php?t=45967)

mt_100 11-21-2002 07:00 PM

Quick question
 
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:
PHP Code:

          if ($userlastvisit<$forum['lastpost']) {
            
$forum['onoff']='on';
          } else {
            
$forum['onoff']='off';
          } 

that uses lastvisit for the forumicons

also in forumdisplay:
PHP Code:

$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 :)


All times are GMT. The time now is 06:10 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01102 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete