Hello Folks,
i am newbie in writing plugins, i have read all the related documents but i am still missing something. So my plugin has a button in the task bar when the user click it i send an Ajax request to the server and it is handled by the plugin php file. what i want to do there is to open a popup window in the roundcube? how i should do this? is the php file responsible to build it and show it in the same Page? or i should use the JavaScript?
as testing i used the default plugin page which contains just some text, and after the request nothing happens (it rename the page header but nothing else...), knowing that if i copied the URL to a new browser window will open it and see my text.
so at least for testing how i can show the default plugin template page in the same browser tab? i am using this code to show it:
$rcmail = rcmail::get_instance();
$rcmail->output->set_pagetitle('TEST PAGE');
$rcmail->output->send('my_plugin.plugin');
and whats the best way to build a window pop up in a plugin?
Thanks in advance,
Jamil Isayyed
You would need to write some javascript to make the popup, right now all your doing is changing the page title.
Thanks SKaero for your reply,
in case i want to open a new page (html) templates what i should do? in the documentation the mentioned this
QuoteFinally, to instruct roundcube to show your template:
$rcmail = rcmail::get_instance();
$rcmail->output->set_pagetitle('my_title');
$rcmail->output->send('my_plugin.mytemplate');
is there another way to do it?
Thanks,
Jamil Isayyed
Are you trying to open a popup, model window, or just a new page?
well, i will need both i managed to open a window using JavaScript. but how i can open a new page?
Take a look at the help plugin I think works similar to the way you want your plugin to.