Tweak facebook block style
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 16 Aug 2010 17:23:01 +0000 (13:23 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 16 Aug 2010 17:23:01 +0000 (13:23 -0400)
horde/services/facebook.php
horde/templates/block/facebook_story.html.php
horde/themes/facebook.css

index 2f5db7e..dd97f7a 100644 (file)
@@ -92,7 +92,8 @@ if ($token = Horde_Util::getFormData('auth_token')) {
         foreach ($posts as $post) {
                 $postView = new Horde_View(array('templatePath' => HORDE_TEMPLATES . '/block'));
                 $postView->actorImgUrl = $profiles[(string)$post['actor_id']]['pic_square'];
-                $postView->actorProfileLink =  Horde::externalUrl($profiles[(string)$post['actor_id']]['url'], true) . $profiles[(string)$post['actor_id']]['name'] . '</a>';
+                $postView->actorProfileLink =  Horde::externalUrl($profiles[(string)$post['actor_id']]['url'], true);
+                $postView->actorName = $profiles[(string)$post['actor_id']]['name'];
                 $postView->message = empty($post['message']) ? '' : $post['message'];
                 $postView->attachment = empty($post['attachment']) ? null : $post['attachment'];
                 $postView->likes = $post['likes'];
index 04f6582..8984a52 100644 (file)
  */
 ?>
 <div class="hordeSmStreamstory">
- <div class="fbstreampic"><img style="float:left;" src="<?php echo $this->actorImgUrl ?>" /></div>
- <div class="hodreSmStreambody">
-  <?php echo $this->actorProfileLink ?><br />
+ <div class="hordeSmAvatar"><img width="48px" height="48px" src="<?php echo $this->actorImgUrl ?>" alt="<?php echo $this->actorName ?>" /></div>
+ <div class="hordeSmStreambody">
+  <?php echo $this->actorProfileLink . $this->actorName?></a><br />
   <?php echo empty($this->message) ? '' : $this->message;?>
-  <?php if(!empty($this->attachment)):?>
+  <?php if(!empty($this->attachment) &&
+           (!empty($this->attachment['description']) ||
+            !empty($this->attachment['media']) ||
+            !empty($this->attachment['caption']))):?>
     <div class="fbattachment">
       <?php if (!empty($this->attachment['media']) && count($this->attachment['media'])):?>
         <div class="fbmedia<?php echo count($this->attachment['media']) > 1 ? ' fbmediawide' : ''?>">
index f2d7888..57d83cf 100644 (file)
     width: 50px;
 }
 .fbattachment {
-    margin-top: 6px;
+    margin: 6px 6px 0 0;
     overflow: hidden;
+    padding: 4px;
+    border: 1px solid #3B5998;
 }
 .fbattachmenttitle {
     font-weight: bold;