Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

Solution for Multiple Users

The following is my solution for creating a multi-user mint installation. Keep in mind that in order to do this, you should have knowledge of PHP, htaccess, and Apache configuration. I’ll try to walk you through a lot of the configuration but your configuration will vary.

I’d like to thank Shaun once again for creating such an awesome codebase to make this solution so simple. Thanks Shaun! :)

Two things before you try this solution: (1) Read the whole walkthrough before trying it. (2) Don’t ask me to post code samples as doing so would be a violation of the Mint license.

Caveats

  • This will break the auto-update system due to the Mint Location setting not being the actual location of the core.

File/Folder Changes

  1. Move your mint installation to a sub-directory of the mint folder and call it panel, so you get a structure like this: http://www.example.com/mint/panel/
  2. Copy mint/panel/index.php to mint/index.php and make the following changes to it.
    • Change the MINT_ROOT to dirname(__FILE__).'/panel/'
    • Add if (!isset($_GET['js']) && !isset($_GET['record'])) header('Location: panel/'); right before where MINT is defined.

This basically creates an entry point for all users but restricts the entry point to &js and &record requests. All other requests are routed to the panel/ where you can see your stats.

Do NOT change your javascript code to /mint/panel/?js. It should be /mint/?js

Mint Changes

  1. Run the ?moved query at /mint/panel/ to let Mint readjust.
  2. Log-in and make sure Mint Location is set to http://www.example.com/mint/ (it shouldn’t have panel/ at the end of it)

Password protecting

You are now free to password protect the panel/ folder without adversely affecting your stats gathering. I’ve been using this solution for almost a week without problems.

You can secure the folder using htaccess authentication. There are dozens of tutorials around the web about this.

Sam Brown
Third-Party Pepper Developer
Posted on Apr 13, '09 at 04:19 am

Interesting method, but I know what Shaun is going to say and what should also be clearly stated is that tampering with any of the codebase will negate any support requests should one have any problems in the future.

Shaun Inman
Mint/Pepper Developer
Posted on Apr 13, '09 at 09:29 am

Sam is correct. I cannot support this configuration.

I’m aware of that and I’d prefer to have used another solution but there is nothing I could do short of programming a multi-user interface to Mint. My clients want their stats ;)

FWIW, this is not in any way a change to the core, it is merely a separate entry-point for tracking the visitors: An index.php for tracking, and a separate index.php for viewing. They both communicate with a pristine copy of Mint 2.17. I made no changes to that.

The Mint codebase is solid enough I didn’t have to do anything to it ;)

You must be logged in to reply. Login above or create an account