Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Upgrading v7 Infusion Forms

Asked Modified Viewed 2,196 times
M
mawe4585
M
  • Member, joined since
  • Contributed 84 posts on the community forums.
  • Started 34 threads in the forums
  • Started this discussions
asked
Member

What do i need to consider when upgrading from 7 to 9 concerning my own infusions?
Should they work as they did before or do i need to make some adjustments?

What are the most likely things i need to change?
Edited by N/A on 06-04-2017 04:24,
0 replies

3 posts

F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

The only real thing is if you use forms. To avoid a token notice you need to use the new native token system and replace all <form> tags with the openform and closeform function.
The token notice will only be displayed to admin.
0 replies
— 8 months later —
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Expanding this answer,

You need to replace all <form> with openform(); and </form> with closeform();
Since many old infusions use formaction, this is how you would make it work with openform();

$formaction = "".INFUSIONS."yourinfusion/target.php";
echo openform('inputform', 'post', $formaction, array('enctype' => 1,'class' => 'm-t-20'));

If you do not want to use the new form system you can manually insert tokens like,

               // Token data
               $options['form_id'] = "12345678";
               $options['max_tokens'] = "1";
               $options['remote_url'] = fusion_get_settings('site_path').'infusions/myinfusion/post.php';
               $token = \Defender\Token::generate_token($options['form_id'], $options['max_tokens'], $options['remote_url']);

               // Begin Form
               echo "<form id='".$options['form_id']."' name='postform' method='POST' action='".$options['remote_url']."'>\n";
               echo "<input type='hidden' name='fusion_token' value='".$token."' />\n";
               echo "<input type='hidden' name='form_id' value='".$options['form_id']."' />\n";
               
               // Form content as usual
               
               echo "</form>\n";
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Token does nothing unless you implement the PF9 safe guard.


if (\defender::safe()) { // token is not error
// do secured stuff.
}


To trigger guard yourself.

\defender::stop();
0 replies

Category Forum

Upgrading issues - 9

Labels

None yet

Statistics

  • Views 0 views
  • Posts 3 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
M
M
  • Member, joined since
  • Contributed 84 posts on the community forums.
  • Started 34 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet