$settings = fusion_get_settings();
This might also be required in other places depending on the complexity of your infusion.
In this section ,
$inf_adminpanel = array(
Add, under rights page 5 as follows. Do not miss the , on the rights line ( Not required on last ).
"rights" => "DEMO",
"page" => 5,
"language" => LANGUAGE
page 5 means that it will be listed under Infusions, 1-4 is the other tabs.
$inf_newtable etc can all be striped of the number , like :
The system will enumrate automatically.
For both v8 and v9 Infusions need to have their infusion.php updated with utf8mb4
TYPE = MyIsam should always be ENGINE = MyISAM,
and the lines should look like this,
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Since we use UTF-8mb4 tables in 8 & 9.
You need to replace all <form> with openform(); and all </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
Please note that any MySQL errors will halt the Infuse as a whole, generic upgrade lines that fail or generic table modification attempts on non existing tables will result in a failure.
Remember to Download the 9.03 SDK as well for more examples. https://www.php-fusion.co.uk/infusion...oad_id=601