The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
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"> <-- ... var SECURITYTOKEN = "{vb:raw bbuserinfo.securitytoken}"; ... // --> </script> |
Благодарность от: | ||
efelony |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|