Invision Community Suite - Display popup modal in PHP hook via plugin?

15 Views Asked by At

I'm trying to create a plugin which hooks into Invision Community Suite's 'saved actions' functionality. Essentially, when a saved action is run against a topic, I want to ask for more information.

This is for the latest version of IPS, no third-party applications/plugins installed.

I have tried 'echo'ing the JavaScript out onto the page, with no avail - it just refreshed and didn't show anything.

I have tried utilising the '\IPS\Output' class to run some custom JavaScript:

\IPS\Output::i()->jsVariables['arr_showConfirmationModal'] = 'ara_ShowDialog()';

where the 'ara_ShowDialog' method is as simple as:

function ara_ShowDialog() {
    dialog.show();
}

I have the hook working which hooks into the 'SavedAction' class, but I can't for the life of me figure out how to stop the page redirecting and display a popup modal - any help will be greatly appreciated!

0

There are 0 best solutions below