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

Secret Crush mini-API Documentation

Shaun Inman
Mint/Pepper Developer
Posted on Nov 13, '07 at 02:27 pm

What the Secret Crush mini-API does

Allows you to add activity or meta data tracked by your Pepper during a user’s session to the expanded accordion-view of the Crushes pane’s Most Recent and Search tabs. Your Pepper provides a description of the activity and the time it occurred. Secret Crush figures out the duration and relative placement of that activity and formats it for display. The API allows for adding a row to the session meta data that appears before the list of session activity.

How to implement the Secret Crush mini-API

  1. Add a session_checksum column to your custom Pepper table (or otherwise store the session_checksum) in order to associate the activity with an existing session.

  2. The existing session_checksum is available as $_COOKIE['MintCrush'] (check for availability before using, default to 0).

  3. Register/unregister your Pepper with Secret Crush during install, update or uninstall.

  4. Add an onSecretCrushActivity method that returns an array of activity for the given session, indexed by a Unix timestamp. Or add an onSecretCrushMeta method that returns an associative array of session meta data indexed by display label.

See the Outbound Pepper for an example of an implemented Secret Crush mini-API. Of particular interest: the session_checksum index of the $manifest property and the isCompatible, onInstall, update, onUninstall, onSecretCrushActivity and (commented out) onSecretCrushMeta methods. Neither onSecretCrush* method is required (you can have one without the other).

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