Roundcube Community Forum

 

possibility to integrate an html/php page into roundcube?

Started by katja_bj92, January 12, 2014, 03:52:27 PM

Previous topic - Next topic

katja_bj92

Dear Forum
my goal is to integrade a page with HTML- and PHP functionality (with some database controls) into RC. Actually the 'help'-plugin which comes with the RC-installation, already looks quite good to me. It allows me to integrate simple HTML-pages (eg. test.html) into RC. But unfortunately if I insert PHP-content into the page and create a 'test.php' the PHP-part of that pages gets ignored.

My first questions to you:
Is it possible to change the help-plugin to execute also php-source code content within RC?

If this should not be possible, I thought about to use an  external 'test.php' and just insert a link into RC. But therefore I would need to extend the RC user session to that external page and maybe make the external page look like RC.

My second question:
How can I extend the roundcube-session to my external test.php? And how can I check on test.php that the session is valid?


Thank you very much for your help.
I know the questions are quite generel. I need a push into the right direction.

kind regards
Katja

SKaero

The quick and dirty way to use php in the skin files is to change the $config['skin_include_php'] option in the RoundCube config. The better solution would be to code a plugin that does what you want.

katja_bj92

Hello SKaero,
thanks for the fast reply. The quick and dirty way would do it for me  ;). I'm far better in PHP then I am in writing RC plugins, which seems to be quite complicated to learn.
I need a lot of additional form elements like input fields, buttons, I want to display content from my DB and so on. In PHP this would take me
one or two hours to be done. So If it would be possible to 'include' my own php-page into RC it would save me a lot of time.

I changed the value that you mentioned: $rcmail_config['skin_include_php'] = true;
For testing I modified the 'help'-plugin by
1. changed the name from about.html to about.php and put some test PHP content into it.
2. changed the help.php to call the about.php

if ($rcmail->action == 'about')
{
   return @file_get_contents($this->home.'/content/about.php');
}


But still the PHP part is being ignored and only the html part gets displayed.
How do I need to call the 'about.php' in a way that the PHP part does not get ignored?

kind regards
Katja