vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Forms -- securitytoken? (https://vborg.vbsupport.ru/showthread.php?t=255814)

CroNiX 12-24-2010 04:37 AM

Forms -- securitytoken?
 
I've been looking for an example/tutorial of a custom form which makes use of the vb securitytoken system but haven't had any luck. Can anyone help out? I'd appreciate it.

Lynne 12-24-2010 04:02 PM

A Search in Templates for securitytoken gives me the template (well, many, many, but..) "navbar" which has it at the very bottom of that template.

HTML Code:

<form action="profile.php?do=dismissnotice" method="post" id="notices" class="notices">
        <input type="hidden" name="do" value="dismissnotice" />
        <input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
        <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
        <input type="hidden" id="dismiss_notice_hidden" name="dismiss_noticeid" value="" />
        <input type="hidden" name="url" value="{vb:raw return_link}" />
        <ol>
            {vb:raw notices}
        </ol>
    </form>


CroNiX 12-24-2010 05:35 PM

Thank you Lynne :) I appreciate how helpful you are in the community. Your tutorials, in particular, have been very helpful. Does anything have to be done for vb to make use of the token or does it do it automatically if the "securitytoken" var is present?

I am trying to reverse engineer how vb does form processing/validation/error display/repopulate form fields (if error). I am writing a fairly large database application and would like to do it securely using vb's native methods.

Until now, I normally would just include vb into a framework like codeigniter and use that for the custom app using vb's user/permission system, but thought I would take a stab at learning vb more in depth and trying to stay native. I recently purchased v4 for a new project and really appreciate how far its come in its maturity. Looking at vb4 code and vb3 code is night and day. (now if they would just move templates out of the database it would be sooo much easier to develop for :D)

Thanks for any advise.


All times are GMT. The time now is 01:11 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01755 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete