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.
Sign In
Not a member yet? Click here to register.
Forgot Password?
Navigation

Infusion.php Question

Last updated on 5 years ago
G
GrimlochSenior Member
Posted 5 years ago
I have an infusion that I have coded to work with version 9.03.110 (all 9.03 versions actually) but it's not a standard infusion in the sense that it is a split infusion. In the infusions folder I have 'infusion.php, infusion_db.php, my_infusion_panel.php' and an 'admin' folder with all of the admin files. In the root folder I have the rest of the files in 'my_infusion' folder. So 'index.php' in the 'root folder/my_infusion' is the target of the site link that needs to be created in 'infusion.php' ... no matter how I try to code the link it always adds 'root/infusions' to the link url that is created.

How can I successfully, at infuse time, create that link as: 'root/my_infusion/index.php' ?? Would it be kosher to use this:
if (isset($infuse)) {
create the site link
}
Energy can neither be created nor destroyed; only transformed !
F
FalkSuper Admin
Posted 5 years ago
You can use ,
$inf_insertdbrow[] = DB_SITE_LINKS." (link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('YOUR_TITLE', 'YOUR_LINK', -101, '1', '0', '1', '1', '".LANGUAGE."')";
Edited by Falk on 08-03-2021 10:36, 5 years ago
G
GrimlochSenior Member
Posted 5 years ago
Because of the way administration/infusions works your method ($inf_insertdbrow) does not work! It invariably adds "root/infusions/" to the link that is created. However I have it working great by doing it this way:
$inf_insertdbrow[] = DB_PANELS." (panel_name, panel_filename, panel_content, panel_side, panel_order, panel_type, panel_access, panel_display, panel_status, panel_url_list, panel_restriction, panel_languages) VALUES('My Panel', 'my_infusion_panel', '', '4', '3', 'file', '0', '1', '1', '', '3', '".LANGUAGE."')";

if (isset($_POST['infuse'])) {
 $result = dbquery("INSERT INTO ".DB_SITE_LINKS." (link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES('My Link Name', 'my_folder/index.php', '0', '2', '0', '8', '1', '".LANGUAGE."')");
 $result = dbquery("INSERT INTO ".DB_SITE_LINKS." (link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('Submit Data', 'my_folder/my_submit.php', -101, '2', '0', '17', '1', '".LANGUAGE."')");
}


But thanks for trying. My way gets me BOTH links plus my side panel in one swoop. Problem solved.

I also discovered that with a few tweaks this works well for the version 8 of my infusion
Edited by Grimloch on 09-03-2021 04:21, 5 years ago
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
You cannot set up a bounty in this discussion thread.
Moderator: Support Team
Users who participated in discussion: Falk, Grimloch