Closed (won't fix)
Project:
Activity Stream
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
28 Jul 2008 at 06:47 UTC
Updated:
14 Aug 2008 at 13:54 UTC
Jump to comment: Most recent file
I did some considerable CSS and HTML formatting clean up by playing with
<?php
return '<div class="activitystream-item"><div class="activitystream-icon">' . theme('activitystream_twitter_icon',$activity->data) . '</div>' . "<div class=\"activitystream-post\">$name " . l('tweeted', $activity->link) . " \"" . $title . "\"" . "</div><div class=\"activitystream-created\">$date" . /*l('#', 'node/' . $node->nid, array('class' => 'permalink')) . */'</div><div class="activitystream-spacing"><div></div>';
}
?>
Note that I disabled the "#" permalink as it was not necessary on my site.
My corresponding activitystream.css for cleaned-up stream display:
.activitystream-item ul {
list-style: none; !important; }
.activitystream-item li {
list-style: none !important; }
#activitystream h3.datehead {
margin-top: 1em;
border-bottom: 1px solid #ccc;
color: #999;
font-size: 0.9em; }
.activitystream-item {
width: 100%; }
.activitystream-icon {
float: left;
width: 16px; }
.activitystream-icon img {
padding: 0 !important;
margin: 0 !important; }
.activitystream-post {
float: left;
width: 447px;
padding-left: 10px;
text-align: left;
font-size: 0.825em; !important }
.activitystream-created {
float: right;
padding-right: 5px;
font-size: 0.6em;
text-align: right;
color: #999999; }
.activitystream-spacing {
width: 100%;
height: 15px;
clear: both; }
#activitystream .permalink a {
color: #999;
font-size: 0.9em; }
I am using the Marinelli theme when making my modifications, so additional tweaking may need to be done with other themes.
Cheers!
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | activitystream-modified-screenshot.png | 19.66 KB | spiffyd |
Comments
Comment #1
spiffyd commentedHere's a screen shot to demonstrate the result of the CSS and module PHP code modifications I posted in the previous post.
Comment #2
spiffyd commentedWhoops... forgot attachment. It's been a long day.
Comment #3
akalsey commentedThe changes here are personal preference. Unless we find a bug or make some serious usability improvements in the current display code, there's no reason to make the change. It's possible with the current HTML to make all the visual changes you made using pure CSS. Every individual element in the activitystream item functions is individually addressable by CSS.
Also, instead of changing the functions in the module directly, you can do it in your theme. Copy the theme_ function into your template.php file, change the function name from theme_ to yourthemename_ and then make your changes to it.
Comment #4
spiffyd commentedI fixed it... in the feed module, at the end of Line 128, replace the end of the string with this (basically copied from the other modules):
. l('#', 'node/'. $node->nid, array('attributes' => array('class' => 'permalink'))) .'';
Comment #5
spiffyd commentedLooks like some of the other modules like twitter need to have the same line as well for the sake of consistency..
. l('#', 'node/'. $node->nid, array('attributes' => array('class' => 'permalink'))) .'';
I'm only using Feed, Twitter, and Delicious modules so others may need to check with the other modules as well.
Comment #6
akalsey commentedFixed what? I don't understand your last two comments.
Comment #7
spiffyd commented@akalsey
Sorry for the vagueness - a portion of my previous comments didn't get submitted for some reason so I'll clarify here again:
I noticed some inconsistency in the modules coding in this function: function theme_activitystream_XXXX_item($activity). The line (or snippet of a line rather) of code I'm referring to is the string near the end that starts with...
. l('#', 'node/'. $node->nid, ...I noticed that some modules have proper references to the permalink CSS class. By proper I mean that the permalink class actually works when I tested it on a browser. Here's how it looks like:
. l('#', 'node/'. $node->nid, array('attributes' => array('class' => 'permalink'))) .'</span>';However, some modules for some reason are missing the attributes portion which rendered my permalink CSS to not work. Here's how this code looks like:
. l('#', 'node/'. $node->nid, array('class' => 'permalink')) .'</span>';This just seems like a minor oversight that's all! Let me know what you think.