Back to vBulletin 3.0 Add-Ons

Workaround session timeout too fast
Mod Version: 1.00, by StewardManscat

This modification is in the archives.
vB Version: 3.0.3 Rating: (0 vote - 0 average) Installs: 0
Released: 13 Jul 2004 Last Update: Never Downloads:
Not Supported  

I posted a note on this subject earlier and cannot locate it now.
If it was moved or deleted please let me know so I do not make the same mistake again.

Meantime, another fellow is looking for this, and I don't want to post a hack at vbulletin.

Problem: something funny with php session logic (?) Some customers get logged out way too fast. Cannot use "remember me" because we are an adult site.

1. Change STANDARD ERROR and login templates so that the "remember me" field is type="hidden" and value="1"

2. In includes/functions.vbsetcookie add:

PHP Code:
// ###################### Start vbsetcookie #######################
function vbsetcookie($name$value ''$permanent 1)
{
    global 
$vboptions$_SERVER;

    if (
$permanent)
    {
        
$expire TIMENOW 60 60 24 365;
    }
    else
    {
        
$expire 0;
    }
// HACKBEGIN
    
if ($name=='userid') {
    
$expire TIMENOW 60 60 4// four hours
  
}
// HACKEND

    
if ($_SERVER['SERVER_PORT'] == '443'
Result:

1. Users stay logged in for four hours. No instant session timeout.

2. Can now use the photopost vb forum integration right out of the box, no mussing with sessionhash cookie lookup

3. Can never have "remember me" (a good thing for our site).

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024