vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Need pointers on the best method to do this.... (https://vborg.vbsupport.ru/showthread.php?t=176341)

jwocky 04-16-2008 02:32 PM

Need pointers on the best method to do this....
 
Ok, I want to attach a variable to each user called 'userage'. When a user first enters the site he will type in an age and then whatever page he visits, be it the forumhome, showthread or forumdisplay, this variable will follow with him, this should be functional with logged in and non logged in users.

What would be the best way to do this, I was thinking that would be something a cookie would do, but I dont really know how the cookies system with vB works.

Before I set out and try to learn it the vB system I wanted to get any pointers/ideas on hat the best way to do this variable passing throughout the forum for each individual user for each session?

thanks!

Opserty 04-16-2008 02:44 PM

One possibility: [How-To] Extend and use the Session Table Effectively

Not 100% sure if it will still apply to the latest version of vBulletin but you may want to try messing around with it on a dev. board or something.

jwocky 04-16-2008 08:50 PM

Wow this sounds perfect! Thanks for the find, i'm going to play around with this tonight, the only real drawback I can think of with this method is that if a user goes idle for a while (out of cookie time) then comes back he would have to re-enter the info I guess even tho his browser was still open and untouched. I wonder if there is a workaround to that issue....

Opserty 04-16-2008 08:54 PM

I don't think so because otherwise you'd have to store data based on IP and if you doing this for all guests your database is going to start getting fairly big quite soon. I think the session method is just fine, the session timeout is a reasonable period anyway.


All times are GMT. The time now is 03:02 PM.

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.00911 seconds
  • Memory Usage 1,712KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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