Hi everyone,
I have been using Mantis for almost 3 years by making massive changes to the core to fit my needs.
I recently started using plugins and now made a system where i only need a few lines of edits and a couple of new events in the core files.
My Question is : Is their a way to grab the main page that the event triggered on? I can grab the current project in a plugin function that triggers when EVENT_X has triggered but can I do the same with the page? I would like to be able know when i am in 'bug_report_page.php' vs 'bug_update_page' because those 2 forms use 2 different .js files.
I have been looking in the helper file and searching forums but i could not find a solution.
Any help is appreciated.
Thank You
Events and pages that trigger them Question
Moderators: Developer, Contributor
Re: Events and pages that trigger them Question
yes you can, use some thing like this:
substr($_SERVER['HTTP_REFERER'],-19) will give the name of the script, for example 'bug_update_page.php'
substr($_SERVER['HTTP_REFERER'],-19) will give the name of the script, for example 'bug_update_page.php'
-
- Posts: 2
- Joined: 10 Jan 2019, 19:03
Re: Events and pages that trigger them Question
That is a good start but i think that will only give the page the user was just at. I looked at $_SERVER and found that $_SERVER['REQUEST_URI'] will give me the string I want on a few pages.
Thank you for answering so fast!
Thank you for answering so fast!