Hi Stalksi,

Thank you so much for this exceptional module, amazing :)

Please would you be so kind to put me in the right direction for theming the output of an activity stream, in this case siteactivity (have gone through all documentation and files)

On attached screenshot, the message float to the bottom of the div. I've tried floating img left, but then it changes all images throughout the site.

If only the message would appear next to the user image I can launch ..

Most appreciated,
Lilian

CommentFileSizeAuthor
screenshot.gif15.04 KBLiliplanet
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Liliplanet’s picture

I found that the user image displays correctly next to comments with the following code:

.heartbeat-comment span.avatar {
    clear: left;
    float: left;
    margin: 3px 3px 3px 0;
    width: 35px;
}

pls how would I do that for the streams?

Stalski’s picture

I always use display suite. There is a built-in ds layout called activity. Otherwise you ll need to use the theme templates

Liliplanet’s picture

Stalski, thank you for your reply. I actually do not want to install the whole Display Suite just for this option. I have installed it before, but find no other use for it, except for this instance.

Please what do you mean by 'use the theme templates' as I have not been able to find a template specifically to align the avatar next to the message.

and it's not possible with a css similar to comments (above)?

If you would please just send me in the right direction on where and how to theme a template for the avatar would be fabulous :)

Stalski’s picture

Hey Lili,

First of all, it is certainly possible with CSS alone ... just add your css file somehow and you are good to go.
If CSS does not suffice and you want extra html, you can override the default template within heartbeat (heartbeat-activity-row.tpl.php)
So it's certainly not difficult, if you work with position absolute of with floating divs.

Secondly, I always use Display Suite. It's certainly recommended. You say you have only this use case but that is just not possible. Display Suite makes your whole theme layer consistent and easy to theme (much less css). I can't imagine you are not using nodes and users. Especially for nodes and even nodes rendered by views are extremely easy.

Third, even when you decide to use Display Suite only for that feature, it still is not a big delay in your site. Display suite is not a performance killer.

So my expert opinion says, try with Display Suite and this way you will start to know the module better and see how it's a big improvement to your site. I can't create a site without Display Suite anymore as I always have to through up on all the template logic that needs to be written ;)

Liliplanet’s picture

You are a star! thank you Stalski!

Will try to override the tpl and if I can't figure that out, will resort to DS.

Most most appreciated :)

Stalski’s picture

Status: Active » Closed (works as designed)

I will write an article shortly about how to configure and theme heartbeat. For this issue, It is certainly possible with CSS , very much like the css for comments.
Something like this (dunno if this will work but it'll be close)

.heartbeat-activity span.avatar {
    clear: left;
    float: left;
    margin: 3px 3px 3px 0;
    width: 35px;
}