Download & Extend

Still can't find any good step-by-step installation guide

Project:Heartbeat
Version:6.x-4.x-dev
Component:installation
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I saw some posts regarding this, but I still can't find any good guide. Been days that I'd tried and looked around the net (this being the latest one?), but what I found is just too simple which doesn't help at all.

I like what I saw here: http://heartbeat.menhireffect.be, and what I really want is just like what Facebook is having. To place this on user's wall, and stream their own activities + shoutout (using FBSS).

I'd enabled all required modules (I believe) including Rules. Edit heartbeat_rules and saved it. Still, both Personal & Private Heartbeat doesn't show anything at all (No activity yet). Of course I add nodes, comments, etc.

So, what else do I need to get it work? Any other better guide? Thanks in advance.

Comments

#1

Same here.
Done everything including permissions etc.
Activities like adding node done after fully setting up Heartbeat,

Nothing shows up in the blocks or views page.

heartbeat-6.x-4.9.tar.gz

#2

What's in your heartbeat_activity table? Does something actually get logged?

#3

jaochoo, for my case, most of the fields in MySQL heartbeat_activity are just empty when browsed.

MySQL returned an empty result set (i.e. zero rows). (Query took 0.0001 sec)

AttachmentSize
mysql_heartbeat.gif 45.64 KB

#4

If the table is empty it means there was nothing logged, so you should look into your Rules setup (if you're using Rules to log the activity) or your custom module (if you're using the Heartbeat API to log programmatically yourself). Btw I am not sure what you mean with this statement:

Edit heartbeat_rules and saved it.

Actually (as far as you do not import your Rules definitions) there should not be any need to edit and save any files concerning. The advantage of Rules is that you can just setup your rules using the GUI. So I suggest you first look into the admin area of Rules to find out whether there is an active rule defined which uses the Heartbeat action to log something to the database. You might also consider to setup some rules there yourself.

I know that understanding and setting up Heartbeat can take some time in the beginning, but once you got it you will see it is pretty streightforward and very powerful.

#5

give us an easy step by step tutorial
plz...

#6

I would provide you a tutorial, but I do not have the time to write it at the moment. I hope this brief guide helps:

1a. Install the module just like any other module.
1b. Install the Rules module if not yet installed and the Heartbeat Rules support submodule (I suppose you use Rules to log activity).
2. Define at least one message template. A message template defines how your activity messages look like and what information they include when getting logged to the database, e.g. "Username wrote a new blog: Title", or "There was a new story posted: Title by Username", etc. It's a sceleton build of placeholders (which later on will get replaced by concrete data such as the node title or username) and normal language. If you want to have different message types, i.e. messages looking differently depending on whether they are a blog, a story, a system notification, or similar, you will have to define different message templates, e.g. a message template for a new blog entry ("Username wrote a new blog: Title") and for a system notification ("System says: Notification")
3. Go to the Rules configuration and create a new Rule for each message template you've created before. Define the event which should trigger the logging of a new message (e.g. a new node was created), and for the action to be carried out select the logging action provided by Heartbeat. You will then have to configure the logging action by selecting your desired message template and by replacing the placeholders of your message template with concrete values provides by the even which triggers your Rule (e.g. values from the node create, from the user who created the node, etc.).
4. Choose at least one of the message streams (such as the Public Stream), configure it, and place it on the desired path. For example, place the Public Heartbeat block on the path <front> (i.e. homepage)
5. Check the general Heartbeat settings if you want to change something.
6. Check the Hearbeat related permissions.
7. For testing, carry out a task which will trigger the event defined under 3. For example, fo you setup Rules to log an activity whenever a new node is created, go and create a new node. Check your Heartbeat stream and the Heartbeat database if the message was logged.
8. For more fine grained control use the hooks provided by Heartbeat. For example, create an own custom module and use the message theme hook to customize the message design.

#7

thnx a lot jaochoo.

i mean this is what i really wanted.
i want to know how to use the hooks provided by Heartbeat,where i can place it
i guess one more tutorial will needed for it.
plz help.

#8

For the hooks, you use it just like any other (Drupal core or contrib) hook: Create a custom module (folder "mymodule" under "sites/all/modules" with "mymodule.info" and "mymodule.module" files) and place the desired hooks inside your "mymodule.module" file (since this is the file where the actual code goes). Examples of how to use the Heartbeat hooks are provided in the Heartbeat_example module and the Heartbeat_implementation module (both modules' purpose is to demonstrate how to use the Heartbeat hooks and API). You will most certainly only need to use:

  • hook_heartbeat_theme_alter() to theme a message. I use it to load the the user picture for the message author, add my own CSS classes, etc.
  • hook_heartbeat_comments() to traverse and output all comments for a certain message (it's actually a theme function as far as I understand it, but you can use it like a hook). I use it to display the oldest N-2 comments in a hidden DIV element (which can be displayed clicking a "Show all comments" link usign JQuery) and the newest 2 comments in a visible DIV element to make the stream more compact (just like on Facebook)
  • hook_heartbeat_comment() to theme a single comment (it's actually a theme function as far as I understand it, but you can use it like a hook). I use it to display a small user picture next to the comment, etc.

"hook" gets replaced with "mymodule", i.e. mymodule_heartbeat_theme_alter() just like with any other hook. There is detailled information available on Drupal.org and in the WWW how to write Drupal modules and how to use hooks (it's really not that difficult once you got it, actually it is just placing 2 files in an own folder and then using the hooks you want to use).

Note that you do not neccessarily need the hooks. Heartbeat should work without the hooks. The hooks are needed for customization, in particular theming. So I suggest you first try to setup and configure Heartbeat without using the hooks and once your messages get logged to the DB and displayed in the stream you go on an use the hooks to customize your streams.

I understand that Heartbeat is a little bit difficult to understand and setup in the beginning; I needed my time to learn it, too. However, once you got it it's really straightforward.

#9

Hi jaochoo, thanks for the help.

I'd just realised that Private Heartbeat is a block where it will list the current logged in user's streams. But what I was trying is to list the current profile's activities and place it on user-profile.tpl.php.

So I guess I need to use hook for my purpose? I'd tried using it with Views before this, but something wasn't right, so I scrapped the idea. I might try it again.

Is there anyone already done so? Care to share any views or hook that will display the current profile streams just like Facebook wall?

#10

I'm also trying to explore Display Suite, but am totally clueless about that module. I don't know which method is best solution for my purpose.

#11

I'd just realised that Private Heartbeat is a block where it will list the current logged in user's streams. But what I was trying is to list the current profile's activities and place it on user-profile.tpl.php.

Place the Private Heartbeat block on the path user/%uid and in the block configuration set it to display the activity for the user profile. I did exactly the same and it works. I remember there is information about it here in the issue queue.

So I guess I need to use hook for my purpose?

Definitely not. The hooks are for changing the messages before they get displayed, i.e. theming and/or completely removing certain messages.

I'd tried using it with Views before this, but something wasn't right, so I scrapped the idea. I might try it again.

I am not using any Views related to Heartbeat and AFAIK stalski said it is more a little add-on but does not provide much functionality (i.e. with Views you cannot generate a complete stream). I suggest you use the blocks and pages provided by Heartbeat.

Is there anyone already done so? Care to share any views or hook that will display the current profile streams just like Facebook wall?

  1. Place the "Personal Heartbeat" bock on user/%uid and in the block configurations set it to display the messages related to that user profile.
  2. Use the Drupal core hook_menu_alter() to rename the "View" tab of the user profile to "Wall"
  3. Use the Heartbeat hooks hook_heartbeat_theme_alter(), hook_heartbeat_comments(), hook_heartbeat_comment() to theme the messages and comments so that they look like on Facebook. For the rest, use CSS.
  4. See http://drupal.org/node/806940 and http://drupal.org/node/811862 for Facebook-like delete buttons

I'm also trying to explore Display Suite, but am totally clueless about that module. I don't know which method is best solution for my purpose.

I think you don't really need it, because you can achieve everything you want using only Heartbeat and hooks. So I would drop it; it's just overhead then.

#12

@Jaochoo Wow dude, thx a lot! I am so glad to see such activity on this activity module and even more satisfied with the fact that somebody completely understood the module considering the few documentation.
You deserve a reward ;)

#13

Status:active» fixed

I posted your guideline here: http://heartbeat.menhireffect.be/docs/short-step-step-guideline

Feel free to reopen this issue if there are still questions. Still planning a screencast but can't seem to find the time.

#14

Thank you so much Stalski.. will feedback once I'd tried that with your guide.

#15

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#16

bookmarked

nobody click here