The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Logged in status on non-forum page
Hi,
I hope you can help! I have been looking for a modification ever since having vb (about 4 years now) that will enable me to show whether a user is logged in or not on a non-vbulletin page. So it will welcome them if they are logged in, and suggest they register if they are not logged in. Something like this has to already exist as its such a cool but relatively basic thing to do (I imagine). Can anyone enlighten me about this ? Thank you |
#2
|
|||
|
|||
Quote:
|
#3
|
|||
|
|||
You will have to query the session table for that i think, and then check if lastactivity is more then TIMENOW - cookietimeout
|
#4
|
|||
|
|||
Quote:
Is there any way to avoid having to chdir to use the global.php file ? I'm thinking of the necessity to do this: <? chdir('/forum/path/'); require_once('global.php'); ?> If I chdir the rest of my scripts break |
#5
|
|||
|
|||
There is no way around that chdir. You might need to chdir back after global.php.
|
#6
|
|||
|
|||
You can't set a path or call global.php with its full path? Pardon the ignorance of my question -- I'm not suggesting an alternative, just looking for why chdir is required.
|
#7
|
|||
|
|||
In vB version 3.0.x (this has changed in 3.5) all includes that are called from global.php, are using a relative path to the current working directory. That is why fully qualifying global.php will not work, but a chdir to the forumhome before calling global.php does work.
|
#8
|
|||
|
|||
Marco, thanks for making me smarter about this. I suppose it changes for the better in 3.5. I'm actually coding some tests using chdir right now; I'm hoping that global.php doesn't clear my form variables. Cheers.
edit:Yep. Completely wipes out the form submission (http_post_vars) when I authenticate the target of the form action. This becomes really byzantine, I'm vb authenticating the dynamically loaded input form just fine by loading global.php before my other requires. I guess at that point I have to set my own cookie to be checked by the target of the submission? Is there a better way? |
#9
|
|||
|
|||
Quote:
I'd like to use only some of the global values, WITHOUT calling global.php (because it wipes out my other apps variables). I only need a few template globals and whether the user is a Member... Any solution without calling global.php? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|