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?

Infusion.php Question

Asked Modified Viewed 893 times
G
Grimloch
G
Energy can neither be created nor destroyed; only transformed !
  • Senior Member, joined since
  • Contributed 722 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
  • Answered 2 questions
asked
Senior Member

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
}
0 replies

2 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

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,
0 replies
G
Grimloch
G
Energy can neither be created nor destroyed; only transformed !
  • Senior Member, joined since
  • Contributed 722 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
  • Answered 2 questions
answered
Senior Member

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,
0 replies

Category Forum

Panels and Infusions

Labels

Statistics

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

2 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
G
G
Energy can neither be created nor destroyed; only transformed !
  • Senior Member, joined since
  • Contributed 722 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
  • Answered 2 questions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet