You are here

about.html in Heartbeat 7

File

help/about.html
View source
<h2>Heartbeat logging</h2>

<p>Heartbeat is an API to log activity from all over the site. As soon as an event occurs and you have 
a possibility to take action, activity can be logged.</p>

<p>In short, activity messages are occurencies of an event that happened. Heartbeat comes with a data type "heartbeat message template" which is configurational object that contains a dynamic sentence/phrase. Using dynamic variable within that phrase, we can see ""HeartbeatActivity" objects as the instance of a heartbeat message template at some point in time.</p>

<p>When talking about triggering events and taking action, one module comes to mind: <a href="http://drupal.org/project/rules">Rules</a>. It is very easy to use the rules integration module and log your activity by UI only.</p>
<p>The biggest change to heartbeat for drupal6 is that the variables in the message template are delivered in separate input fields, making it much easier to assign the tokens to the dynamic phrase variables used in the heartbeat templates. The tokens will be available according to the context the event is in. E.g. when a user adds a node, you will certainly have the user object and the node object to make a dynamical sentence.</p>
 
 <p>In code, HeartbeatActivity is a fieldable entity where the HeartbeatMessageTemplate is the bundle. This means that we can use the drag and drop display overview to layout our messages. The message templates are also exportable objects that live in code and database in case overridden. This implies that you will need to use the ctools CRUD functions.</p>

<h2>Heartbeat streams</h2>
<p>Activity streams are a list of activity messages ordered so most recent activity is displayed on top. We have some configurations here as well, the HeartbeatStreamConfig objects.</p>
<p>Each activity message in the stream has a bundle type, the heartbeat message template. By using <a href="http://drupal.org/project/ds">Display suite</a> or <a href="http://drupal.org/project/field_group">Field group</a> we can bring more conventional and advanced layout to our streams.</p>
<p>HeartbeatStreamConfig objects are exportables as well. The live in code and database in case overridden.</p>