vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Form in forumblock (https://vborg.vbsupport.ru/showthread.php?t=283705)

Dave-ahfb 05-30-2012 05:34 PM

Form in forumblock
 
I can get the below to work(logged in and as guest) if placed in a standard template, but if placed in the forumblock I get the typical securitytoken issue when logged in (it is still ok for guest).

Code:

<form action="findwebhost.php" method="post">
---code---
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
</form>


kh99 05-30-2012 08:30 PM

An html orum block is not a template, so you can't use {vb:raw bbuserinfo.securitytoken} to get the securitytoken value. What you can do is make it a php block, build your html into a string and return it. In that case you could either put your html in a string constant, or you can render a template.

cellarius 06-02-2012 08:13 AM

Or you can create a template, put all your stuff in there and use it for your forumblock (if it's the same as for widgets, havn't looked at forumblocks for quite some time).

kh99 06-02-2012 11:50 AM

Quote:

Originally Posted by cellarius (Post 2335733)
Or you can create a template, put all your stuff in there and use it for your forumblock (if it's the same as for widgets, havn't looked at forumblocks for quite some time).

That's true, you could also add a "Custom HTML/PHP" block, and on the settings page don't change anything except the "Template To Use" at the bottom. In that case you'd probably want to copy the template "block_html" for your new template and edit it to include your form. That way your block will have the correct "wrapper" html.


All times are GMT. The time now is 07:06 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
  • Page Generation 0.01004 seconds
  • Memory Usage 1,714KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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