![]() |
Use "global.php" without updating lasactivity and lastvisit
I want to use some vBulletin functions in my own PHP Script. So i have included the global.php in my script. But when my script become executed Vbulletin refreshes the user.lastactivity and user.lastvisit informations in the databse. Is there a way to prevent this? I want to use vBulletin functions but vBulletin shouldn´t regocnizes me as an visitor in the forum.
Many many thanks for some hints. |
I found notes in includes/session.php
PHP Code:
|
I am not sure I am 100% correct, but I did this for a script I have and which I didn't want to update the lastactivity or the lastvisit:
In sessions.php find: Code:
if (!SESSION_BYPASS) Code:
if (!SESSION_BYPASS) Code:
if (THIS_SCRIPT != 'yourscriptname') [code]define('THIS_SCRIPT', 'yourscriptname'); Mind you I am using vB 3.0.xx so the code may be different if you are using a later version. |
No need to edit vb's files. Add the following before calling global.php:
PHP Code:
|
Sorry for reviving an old thread, I admit I didn't check the date.
Can you please let me know if the above are for vB 3.0.xx or later? I can't find the NOCOOKIES parameter nowhere, so I have to assume that it is for later vB releases? |
That define was added in vB 3.5
|
Well, if you use those parameters, then the external program doesn't get any $bbuserinfo. With my clumsy solution it does, the only thing that doesn't happen is to update the lastvisit and lastactivity parameters, which is what the original question was about.
|
I was assuming that belinea didn't want to be seen as a visitor to the forum (full stop, meaning no sessions either). However, it appears (although I haven't tested this) you can bypass the user (member) activity update using:
PHP Code:
|
All times are GMT. The time now is 11:15 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|