![]() |
Adding security token to custom .php using a .js hook?
Hey :)
I used a tutorial from PureVB This one for creating a custom php, the js i have hooked has a submit button to call results, when you click submit i get a security token error, is there a snippet i can add to verify? sorry if this is the wrong area or not allowed. |
If your js is in a template, you can use {vb:raw bbuserinfo.securitytoken} to get the value of the security token. You'd add a parameter to your request called "securitytoken" and set it to that value. If you were using an html form, you'd add
Code:
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" /> Another way to do it is to add some js to the page to set a variable which you can use later. For example, the vb headinclude template includes this: Code:
<script type="text/javascript"> |
All times are GMT. The time now is 07: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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|