with a larger admin system
If your website includes functionality that you manage through
another administrative interface, you can embed Meditate
into that interface so that users can edit content from a
single login. This process requires that you can access and
modify the source code of your existing admin system and
set up a wrapper page. It also requires PHP version 5.3 or
- Confirm that you are running PHP 5.3 or higher on your web server. You
can print the value of phpversion() from one of your
PHP scripts to check this.
- Open Meditate's index.php file. Comment out the first line and uncomment
the two namespace lines at the top of the file.
- Open Meditate's config/constants.php file and set INTEGRATION_MODE to
- Set WRAPPER_PAGE to the directory and page name of a wrapper page in
your admin interface. A wrapper is a page containing
your system's authentication, navigation and layout code,
with an empty space where you'll embed Meditate.
- Check the set of constants beginning with SITE_PROTOCOL. These are normally
configured automatically by Meditate, but you will probably
have to set them manually to work correctly within your
- Open config/styles.css and remove any styles that conflict with
your own styles.
- Open the file in your admin system that contains the login code. At
a point after a user is logged in, set a variable $user_id
to the user's ID and then paste the following code:
$_GET["page"] = "integration_login";
$cwd = getcwd();
// save the current directory so we can return to it later
path to editor directory]"); // then set the working directory so the
editor thinks it's running from its own location
// load the editor login code
chdir($cwd); // return to the
original working directory
- Open the wrapper file in your admin system and paste the following code:
$cwd = getcwd(); // save the current directory so we can return to it later
chdir("[relative path to editor directory]"); // then set the
working directory so the editor thinks it's running from
its own location
include "index.php"; // load the editor index
chdir($cwd); // return to the original working directory
- Assuming your wrapper page is named wrapper.html, browse to wrapper.html?page=login
to start the installation script. (You can skip this step
if Meditate is already installed as a standalone
system.) When the installation is done, it will redirect
you to your system's login page; log in again.
- Browse to wrapper.html?page=users_manage and set up the editor users.
Add your system's user ID to each user record.
- Add menu items to your system for whatever Meditate pages you want to
Content > Edit:
Content > Review: wrapper.html?page=content_review
Content > History: wrapper.html?page=content_history
Content > Browse: wrapper.html?page=content_browse
Files > Manage: wrapper.html?page=files_manage
Users > Manage: wrapper.html?page=users_manage