vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   help with widgets (https://vborg.vbsupport.ru/showthread.php?t=234796)

robaiken 02-02-2010 08:32 AM

help with widgets
 
hi,

i made a php widget. i keep getting this error

Parse error: syntax error, unexpected '{' in /var/www/clients/client4/web6/web/picbasic/packages/vbcms/widget/execphp.php(171) : eval()'d code on line 18

because of this line of code

<input type=\"hidden\" name=\"securitytoken\" value=".{vb:raw bbuserinfo.securitytoken}." />


Code:

$output = "
<form enctype=multipart/form-data action=".$_SERVER['PHP_SELF']."?".$session[sessionhash]." method=POST>
Please choose a file: <input name=ftpfile type=file id=ftpfile  /><br><br>
<input name=ftpfileName type=hidden id=ftpfileName />

<select name=dir>
  <option value=0>Select a Catagory</option>
  <option value=1>Misc</option>
  <option value=2>archive</option>
  <option value=3>code</option>
  <option value=4>executable</option>
  <option value=5>image</option>
  <option value=6>pdf</option>
</select>
<br /><br />

<input type=\"hidden\" name=\"s\" value=".$session[sessionhash]." />

<input type=\"hidden\" name=\"securitytoken\" value="{vb:raw bbuserinfo.securitytoken}" />

<input type=submit name=submit value=Upload File  />
";

thank you

Rob

Lynne 02-02-2010 08:18 PM

This line is not valid for a plugin:
PHP Code:

<input type=\"hidden\" name=\"securitytoken\" value="{vb:raw bbuserinfo.securitytoken}" /> 

Try:
PHP Code:

<input type=\"hidden\" name=\"securitytoken\" value=" .$bbuserinfo.securitytoken" /> 



All times are GMT. The time now is 06:03 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.01013 seconds
  • Memory Usage 1,715KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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