Here's a simple way to do it.
Install CMSMS in a directory. In this case, I installed it in a directory named "cmsms" within the directory containing the established site.
At the top of the pages that will have embedded CMSMS, put in:
Code: Select all
<?php
@ob_start();
include('cmsms/index.php');
$out0 = ob_get_clean();
$out = ob_get_clean();
$thisFile = str_replace(dirname(__FILE__),'',__FILE__);
$out = str_replace('index.php',$thisFile,$out);
?>
But maybe you want to embed pages other than the default CMSMS page? Simply pass your page=my_page_alias parameter on the URL to the wrapper page, or hard code it like:
Code: Select all
$_GET['page']='my_page_alias';
right before the include.
This all works very nicely. The CMSMS Admin will continue to be usable as normal, for managing modules, etc.
You can prevent direct requests to your CMSMS directory via your web server, if you choose.
Enjoy!
___Samuel___