![]() |
Security token with external search field.
Hello,
I copied my original board code to create a search box on my site root and my 404.php page (http://www.mythtvtalk.com and http://www.mythtvtalk.com/404.php). It worked fine for few hours but now, each time I try to use it, I get the following error: Quote:
Do you know how this can be tweaked? Thanks in advance. Ludo |
Dismounted,
Is there a way to generate a security token outside of the forum to use in a search box? I.e. Generate a token on www.domain.com when the forum is at www.domain.com/forum ? Thanks in advance. Ludo |
See the function fetch_userinfo() in functions.php for the algorithm of the security token.
PS. I have moved your post from your other thread into this one. |
You can have access to a users' security token outside of standard forum pages if you include global.php.
PHP Code:
PHP Code:
|
Yes, but doing that may be a bit excessive when you can generate your own token.
|
Quote:
|
Quote:
I can perform searches externaly IF I was not logged in before. If I was already logged in, it looks like my generated security token (using a random user) does not match mine and therefore I hit the error page. Is there a way to check/test if a security token already exists? Because if one already use it, I should use this one instead of generate a new one. I checked the cookie and I can't seem to find the security token in them :/ Any idea? Thanks Ludo |
Security tokens are generated on every page load. You must use the user ID that the user has logged in as (find this in cookies).
|
Erm, so is there a way to know/check if a user is already logged in and if so, to get his userid? (outside of the forum obviously)
And for guest/not-logged in user, which userid and user_Salt should be used? Because there is no guest member defined in the user table Thanks for your help |
Quote:
Quote:
|
All times are GMT. The time now is 10:22 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:
|