Quote:
On a side note, here is something related to this. So I was able to add a new page with the template. Looks great except one thing. There is some extra space on the top of the page so now my logo and login is moved down and there is about a 1/2" gap of nothing from the top. This is only on the new external php page I created. All my other pages look fine. Any suggestions? |
That's either something in the PHP-Code or in the template you created, or some stray css. Without knowing the code and/or seeing the page that's just guesswork.
|
Quote:
|
I got my vB page working. It's a newsletter subscription form, real simple. A user enters an email address, enter the security code and that's it. Problem is vB bounces back with
"Your submission could not be processed because a security token was missing." If I turn off CSRF_PROTECTION to FALSE the problem goes away, but I'm leery of disabling anything that is titled PROTECTION. I found some posts saying that I should add Code:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> (If this should be a new thread then I apologize for doing it here. Feel free to move if necessary.) |
Quote:
Code:
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" /> |
Does this go in the template I created or in the .php file? Because if it's the template it doesn't seem to be working. I have it in the blockrow area. Does it go somewhere else?
--------------- Added [DATE]1310697032[/DATE] at [TIME]1310697032[/TIME] --------------- I've pinpointed the problem. It's value="$bbuserinfo[securitytoken]" that's causing the problem. If I change it to "guest" it works fine, but only if the user isn't logged in. Is there a way to get this working so if it's a non-member/not logged in member or a logged in member it behaves the same way? What if I just disable CSRF_PROTECTION for this particular script? |
The code I posted goes into the form which should be in the template. I took the code directly out of the header template - if you have written it correctly, it will work for a guest or member.
|
I wrote a simple product that allows you to embed Google Custom Search using this approach.
https://vborg.vbsupport.ru/showthread.php?t=266449 It is really just a page shell + tab, feel free to grab the code as you need. Kym |
Quote:
Quote:
If I can't get it working I'll just go with turning off the protection. It works for both then, and the form has two security measures of it's own so I think it's fairly safe. |
Quote:
HTML Code:
<input type="hidden" name="securitytoken" value="<?php global $vbulletin; echo $vbulletin->userinfo['securitytoken']; ?>" /> This would be easier if, as someone pointed out in the other thread, you were to put your form in a template, but that would mean making more changes to the form code. |
All times are GMT. The time now is 12:15 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|