MDL-32344 blog Replacing tables for div containers
authorDavid Monllao <davidm@moodle.com>
Wed, 8 Aug 2012 07:34:37 +0000 (15:34 +0800)
committerDavid Monllao <davidm@moodle.com>
Tue, 14 Aug 2012 02:47:17 +0000 (10:47 +0800)
blog/edit.php
blog/locallib.php
blog/renderer.php
theme/arialist/style/core.css
theme/base/style/core.css

index e09cd64..f93976e 100644 (file)
@@ -105,7 +105,7 @@ if ($id) {
 }
 $returnurl->param('userid', $userid);
 
-// Blog renderer
+// Blog renderer.
 $output = $PAGE->get_renderer('blog');
 
 $strblogs = get_string('blogs','blog');
@@ -129,7 +129,7 @@ if ($action === 'delete'){
         $PAGE->set_heading($SITE->fullname);
         echo $OUTPUT->header();
 
-        // Output the entry
+        // Output the entry.
         $entry->prepare_render();
         echo $output->render($entry);
 
index 4ede567..9286513 100644 (file)
@@ -66,7 +66,7 @@ class blog_entry implements renderable {
     public $form;
     public $tags = array();
 
-    // Data needed to render the entry
+    /** @var StdClass Data needed to render the entry */
     public $renderable;
 
     // Methods
@@ -104,12 +104,12 @@ class blog_entry implements renderable {
 
         $this->renderable->user = $DB->get_record('user', array('id'=>$this->userid));
 
-        // Entry comments\r
+        // Entry comments.\r
         if (!empty($CFG->usecomments) and $CFG->blogusecomments) {\r
             require_once($CFG->dirroot . '/comment/lib.php');
 \r
             $cmt = new stdClass();\r
-            $cmt->context = get_context_instance(CONTEXT_USER, $this->userid);\r
+            $cmt->context = context_user::instance($this->userid);\r
             $cmt->courseid = $PAGE->course->id;\r
             $cmt->area = 'format_blog';\r
             $cmt->itemid = $this->id;\r
@@ -117,74 +117,70 @@ class blog_entry implements renderable {
             $cmt->component = 'blog';\r
             $this->renderable->comment = new comment($cmt);\r
         }
-
-        // Post data\r
-        $this->summary = file_rewrite_pluginfile_urls($this->summary, 'pluginfile.php', SYSCONTEXTID, 'blog', 'post', $this->id);\r
 \r
-        $options = array('overflowdiv'=>true);\r
-        $this->renderable->body = format_text($this->summary, $this->summaryformat, $options);\r
-        $this->renderable->title = format_string($this->subject);\r
-        $this->renderable->userid = $this->userid;\r
-        $this->renderable->author = fullname($this->renderable->user);\r
-        $this->renderable->created = userdate($this->created);\r
-        if ($this->created != $this->lastmodified) {\r
-            $this->renderable->lastmod = userdate($this->lastmodified);\r
-        }\r
-        $this->renderable->publishstate = $this->publishstate;
+        $this->summary = file_rewrite_pluginfile_urls($this->summary, 'pluginfile.php', SYSCONTEXTID, 'blog', 'post', $this->id);\r
 
-        // External blog\r
+        // External blog link.\r
         if ($this->uniquehash && $this->content) {\r
             if ($externalblog = $DB->get_record('blog_external', array('id' => $this->content))) {\r
                 $urlparts = parse_url($externalblog->url);\r
-                $this->renderable->externalblogtext = get_string('retrievedfrom', 'blog').get_string('labelsep', 'langconfig').html_writer::link($urlparts['scheme'].'://'.$urlparts['host'], $externalblog->name);\r
+                $this->renderable->externalblogtext = get_string('retrievedfrom', 'blog') . get_string('labelsep', 'langconfig');
+                $this->renderable->externalblogtext .= html_writer::link($urlparts['scheme'] . '://'.$urlparts['host'], $externalblog->name);\r
             }\r
         }
+
+        // Retrieve associations
+        $this->renderable->unassociatedentry = false;
+        if (!empty($CFG->useblogassociations)) {
 \r
-        // Check to see if the entry is unassociated with group/course level access\r
-        $this->renderable->unassociatedentry = false;\r
-        if (!empty($CFG->useblogassociations) && ($this->publishstate == 'group' || $this->publishstate == 'course')) {\r
-            if (!$DB->record_exists('blog_association', array('blogid' => $this->id))) {\r
-                $this->renderable->unassociatedentry = true;\r
-            }\r
-        }
+            // Adding the entry associations data.
+            if ($associations = $associations = $DB->get_records('blog_association', array('blogid' => $this->id))) {
+\r
+                // Check to see if the entry is unassociated with group/course level access.\r
+                if ($this->publishstate == 'group' || $this->publishstate == 'course') {\r
+                    $this->renderable->unassociatedentry = true;\r
+                }
+\r
+                foreach ($associations as $key => $assocrec) {\r
 
-        // Retrieve associations in case they're needed early
-        if (!empty($CFG->useblogassociations)) {\r
-            $associations = $DB->get_records('blog_association', array('blogid' => $this->id));
+                    if (!$context = context::instance_by_id($assocrec->contextid, IGNORE_MISSING)) {
+                        unset($associations[$key]);
+                        continue;
+                    }
 
-            // Adding the entry associations data
-            if ($associations) {\r
-                foreach ($associations as $key => $assocrec) {\r
-                    $context = get_context_instance_by_id($assocrec->contextid);
+                    // The renderer will need the contextlevel of the association.
+                    $associations[$key]->contextlevel = $context->contextlevel;
 \r
-                    // Course associations\r
+                    // Course associations.\r
                     if ($context->contextlevel ==  CONTEXT_COURSE) {
                         $instancename = $DB->get_field('course', 'shortname', array('id' => $context->instanceid)); //TODO: performance!!!!
-\r
-                        $associations[$key]->type = get_string('course');
+
                         $associations[$key]->url = $assocurl = new moodle_url('/course/view.php', array('id' => $context->instanceid));
                         $associations[$key]->text = $instancename;
                         $associations[$key]->icon = new pix_icon('i/course', $associations[$key]->text);\r
                     }
 
-                    // Mod associations
+                    // Mod associations.
                     if ($context->contextlevel ==  CONTEXT_MODULE) {
 
-                        $modinfo = $DB->get_record('course_modules', array('id' => $context->instanceid));
-                        $modname = $DB->get_field('modules', 'name', array('id' => $modinfo->module));
-                        $instancename = $DB->get_field($modname, 'name', array('id' => $modinfo->instance)); //TODO: performance!!!!
+                        // Getting the activity type and the activity instance id
+                        $sql = 'SELECT cm.instance, m.name FROM {course_modules} cm
+                                  JOIN {modules} m ON m.id = cm.module
+                                 WHERE cm.id = :cmid';
+                        $modinfo = $DB->get_record_sql($sql, array('cmid' => $context->instanceid));
+                        $instancename = $DB->get_field($modinfo->name, 'name', array('id' => $modinfo->instance)); //TODO: performance!!!!
 
-                        $associations[$key]->type = get_string('modulename', $modname);
-                        $associations[$key]->url = new moodle_url('/mod/'.$modname.'/view.php', array('id' => $modinfo->id));
+                        $associations[$key]->type = get_string('modulename', $modinfo->name);
+                        $associations[$key]->url = new moodle_url('/mod/' . $modinfo->name . '/view.php', array('id' => $context->instanceid));
                         $associations[$key]->text = $instancename;
-                        $associations[$key]->icon = new pix_icon('icon', $associations[$key]->text, $modname);
+                        $associations[$key]->icon = new pix_icon('icon', $associations[$key]->text, $modinfo->name);
                     }\r
                 }
             }
             $this->renderable->blogassociations = $associations;\r
         }\r
 
-        // Entry attachments
+        // Entry attachments.
         $this->renderable->attachments = $this->get_attachments();
 
         $this->renderable->usercanedit = blog_user_can_edit_entry($this);
@@ -201,12 +197,12 @@ class blog_entry implements renderable {
 \r
         require_once($CFG->libdir.'/filelib.php');\r
 \r
-        $syscontext = get_context_instance(CONTEXT_SYSTEM);
+        $syscontext = context_system::instance();
 \r
         $fs = get_file_storage();
         $files = $fs->get_area_files($syscontext->id, 'blog', 'attachment', $this->id);\r
 
-        // Adding a blog_entry_attachment for each non-directory file
+        // Adding a blog_entry_attachment for each non-directory file.
         $attachments = array();\r
         foreach ($files as $file) {\r
             if ($file->is_directory()) {\r
@@ -1010,18 +1006,18 @@ class blog_entry_attachment implements renderable {
     public $file;
 
     /**
+     * Gets the file data
+     *
      * @param stored_file $file
      * @param int $entryid Attachment entry id
      */
     public function __construct($file, $entryid) {
 
-        global $OUTPUT, $CFG;
-
-        $syscontext = get_context_instance(CONTEXT_SYSTEM);
+        global $CFG;
 
         $this->file = $file;
         $this->filename = $file->get_filename();\r
-        $this->url    = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.SYSCONTEXTID.'/blog/attachment/'.$entryid.'/'.$this->filename);\r
+        $this->url = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.SYSCONTEXTID.'/blog/attachment/'.$entryid.'/'.$this->filename);\r
     }
 
 }
index d103f94..b605016 100644 (file)
@@ -22,7 +22,7 @@
  * @copyright  2012 David MonllaĆ³
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-\r
+
 defined('MOODLE_INTERNAL') || die();
 
 /**
@@ -40,136 +40,128 @@ class core_blog_renderer extends plugin_renderer_base {
 
         global $CFG;
 
+        $syscontext = context_system::instance();
+
         $stredit = get_string('edit');
         $strdelete = get_string('delete');
 
-        // Start printing of the blog
-        $table = new html_table();
-        $table->cellspacing = 0;
-        $table->attributes['class'] = 'forumpost blog_entry blog'. ($entry->renderable->unassociatedentry ? 'draft' : $entry->renderable->publishstate);
-        $table->attributes['id'] = 'b'.$entry->id;
-        $table->width = '100%';
-
-        $picturecell = new html_table_cell();
-        $picturecell->attributes['class'] = 'picture left';
-        $picturecell->text = $this->output->user_picture($entry->renderable->user);
-
-        $table->head[] = $picturecell;
-
-        $topiccell = new html_table_cell();
-        $topiccell->attributes['class'] = 'topic starter';
-        $titlelink =  html_writer::link(new moodle_url('/blog/index.php', array('entryid' => $entry->id)), $entry->renderable->title);
-        $topiccell->text = $this->output->container($titlelink, 'subject');
-        $topiccell->text .= $this->output->container_start('author');
-\r
-        // Post by
+        // Header.
+        $mainclass = 'forumpost blog_entry blog clearfix ';
+        if ($entry->renderable->unassociatedentry) {
+            $mainclass .= 'draft';
+        } else {
+            $mainclass .= $entry->publishstate;
+        }
+        $o = $this->output->container_start($mainclass, 'b' . $entry->id);
+        $o .= $this->output->container_start('row header clearfix');
+
+        // User picture.
+        $o .= $this->output->container_start('left picture header');
+        $o .= $this->output->user_picture($entry->renderable->user);
+        $o .= $this->output->container_end();
+
+        $o .= $this->output->container_start('topic starter header clearfix');
+
+        // Title.
+        $titlelink =  html_writer::link(new moodle_url('/blog/index.php', array('entryid' => $entry->id)), format_string($entry->subject));
+        $o .= $this->output->container($titlelink, 'subject');
+
+        // Post by.
         $by = new stdClass();
-        $coursecontext = get_context_instance(CONTEXT_COURSE, $this->page->course->id);
-        $fullname = fullname($entry->renderable->user, has_capability('moodle/site:viewfullnames', $coursecontext));
+        $fullname = fullname($entry->renderable->user, has_capability('moodle/site:viewfullnames', $syscontext));
         $userurlparams = array('id' => $entry->renderable->user->id, 'course' => $this->page->course->id);
-        $by->name =  html_writer::link(new moodle_url('/user/view.php', $userurlparams), $fullname);
-        $by->date = $entry->renderable->created;
+        $by->name = html_writer::link(new moodle_url('/user/view.php', $userurlparams), $fullname);
 
-        $topiccell->text .= get_string('bynameondate', 'forum', $by);
-        $topiccell->text .= $this->output->container_end();
+        $by->date = userdate($entry->created);
+        $o .= $this->output->container(get_string('bynameondate', 'forum', $by), 'author');
 
-        // Adding external blog link
+        // Adding external blog link.
         if (!empty($entry->renderable->externalblogtext)) {
-            $topiccell->text .= $this->output->container($entry->renderable->externalblogtext, 'externalblog');
+            $o .= $this->output->container($entry->renderable->externalblogtext, 'externalblog');
+        }
+
+        // Closing subject tag and header tag.
+        $o .= $this->output->container_end();
+        $o .= $this->output->container_end();
+
+        // Post content.
+        $o .= $this->output->container_start('row maincontent clearfix');
+
+        // Entry.
+        $o .= $this->output->container_start('no-overflow content ');
+
+        // Determine text for publish state.
+        switch ($entry->publishstate) {
+            case 'draft':
+                $blogtype = get_string('publishtonoone', 'blog');
+                break;
+            case 'site':
+                $blogtype = get_string('publishtosite', 'blog');
+                break;
+            case 'public':
+                $blogtype = get_string('publishtoworld', 'blog');
+                break;
+            default:
+                $blogtype = '';
+                break;
+
         }
+        $o .= $this->output->container($blogtype, 'audience');
 
-        $topiccell->header = false;
-        $table->head[] = $topiccell;
-
-        // Actual content
-        $mainrow = new html_table_row();
-
-        $leftsidecell = new html_table_cell();
-        $leftsidecell->attributes['class'] = 'left side';
-        $mainrow->cells[] = $leftsidecell;
-
-        $contentcell = new html_table_cell();
-        $contentcell->attributes['class'] = 'content';
-\r
-        // Determine text for publish state\r
-        switch ($entry->renderable->publishstate) {\r
-            case 'draft':\r
-                $blogtype = get_string('publishtonoone', 'blog');\r
-                break;\r
-            case 'site':\r
-                $blogtype = get_string('publishtosite', 'blog');\r
-                break;\r
-            case 'public':\r
-                $blogtype = get_string('publishtoworld', 'blog');\r
-                break;\r
-            default:\r
-                $blogtype = '';\r
-                break;\r
-\r
-        }\r
-        $contentcell->text .= $this->output->container($blogtype, 'audience');
-
-        // Entry body\r
-        $contentcell->text .= $entry->renderable->body;
-
-        // Entry attachments\r
+        // Attachments.
         $attachmentsoutputs = array();
         if ($entry->renderable->attachments) {
             foreach ($entry->renderable->attachments as $attachment) {
-                $attachmentsoutputs[] = $this->render($attachment, false);
+                $o .= $this->render($attachment, false);
             }
-            $contentcell->text .= $this->output->container(implode(', ', $attachmentsoutputs), 'attachments');
         }
 
-        // Uniquehash is used as a link to an external blog
+        // Body.
+        $o .= format_text($entry->summary, $entry->summaryformat, array('overflowdiv' => true));
+
+        // Uniquehash is used as a link to an external blog.
         if (!empty($entry->uniquehash)) {
-            $contentcell->text .= $this->output->container_start('externalblog');
-            $contentcell->text .= html_writer::link($entry->uniquehash, get_string('linktooriginalentry', 'blog'));
-            $contentcell->text .= $this->output->container_end();
+            $o .= $this->output->container_start('externalblog');
+            $o .= html_writer::link($entry->uniquehash, get_string('linktooriginalentry', 'blog'));
+            $o .= $this->output->container_end();
         }
 
-        // Links to tags
+        // Links to tags.
         $officialtags = tag_get_tags_csv('post', $entry->id, TAG_RETURN_HTML, 'official');
         $defaulttags = tag_get_tags_csv('post', $entry->id, TAG_RETURN_HTML, 'default');
 
         if (!empty($CFG->usetags) && ($officialtags || $defaulttags) ) {
-            $contentcell->text .= $this->output->container_start('tags');
+            $o .= $this->output->container_start('tags');
 
             if ($officialtags) {
-                $contentcell->text .= get_string('tags', 'tag') .': '. $this->output->container($officialtags, 'officialblogtags');
+                $o .= get_string('tags', 'tag') .': '. $this->output->container($officialtags, 'officialblogtags');
                 if ($defaulttags) {
-                    $contentcell->text .=  ', ';
+                    $o .=  ', ';
                 }
             }
-            $contentcell->text .=  $defaulttags;
-            $contentcell->text .= $this->output->container_end();
+            $o .=  $defaulttags;
+            $o .= $this->output->container_end();
         }
 
-        // Add associations
+        // Add associations.
         if (!empty($CFG->useblogassociations) && !empty($entry->renderable->blogassociations)) {
-            $contentcell->text .= $this->output->container_start('tags');
-            $hascourseassocs = false;
-\r
-            // First find and show the associated course\r
-            $coursesstr = '';
+
+            // First find and show the associated course.
+            $assocstr = '';
             $coursesarray = array();
             foreach ($entry->renderable->blogassociations as $assocrec) {
-                $context = get_context_instance_by_id($assocrec->contextid);
-                if ($context->contextlevel ==  CONTEXT_COURSE) {
+                if ($assocrec->contextlevel ==  CONTEXT_COURSE) {
                     $coursesarray[] = $this->output->action_icon($assocrec->url, $assocrec->icon, null, array(), true);
                 }
             }
             if (!empty($coursesarray)) {
-                $coursesstr .= get_string('associated', 'blog', $assocrec->type) . ': ' . implode(', ', $coursesarray);
+                $assocstr .= get_string('associated', 'blog', get_string('course')) . ': ' . implode(', ', $coursesarray);
             }
 
-            // Now show mod association
-            $modulesstr = '';\r
+            // Now show mod association.
             $modulesarray = array();
             foreach ($entry->renderable->blogassociations as $assocrec) {
-                $context = get_context_instance_by_id($assocrec->contextid);
-
-                if ($context->contextlevel ==  CONTEXT_MODULE) {
+                if ($assocrec->contextlevel ==  CONTEXT_MODULE) {
                     $str = get_string('associated', 'blog', $assocrec->type) . ': ';
                     $str .= $this->output->action_icon($assocrec->url, $assocrec->icon, null, array(), true);
                     $modulesarray[] = $str;
@@ -177,96 +169,84 @@ class core_blog_renderer extends plugin_renderer_base {
             }
             if (!empty($modulesarray)) {
                 if (!empty($coursesarray)) {
-                    $modulesstr .= '<br/>';
+                    $assocstr .= '<br/>';
                 }
-                $modulesstr .= implode('<br/>', $modulesarray);
+                $assocstr .= implode('<br/>', $modulesarray);
             }
 
-            $contentcell->text .= $coursesstr.$modulesstr;
-            $contentcell->text .= $this->output->container_end();
+            // Adding the asociations to the output.
+            $o .= $this->output->container($assocstr, 'tags');
         }
 
         if ($entry->renderable->unassociatedentry) {
-            $contentcell->text .= $this->output->container(get_string('associationunviewable', 'blog'), 'noticebox');
+            $o .= $this->output->container(get_string('associationunviewable', 'blog'), 'noticebox');
         }
 
-        /// Commands
-        $contentcell->text .= $this->output->container_start('commands');
+        // Commands.
+        $o .= $this->output->container_start('commands');
         if ($entry->renderable->usercanedit) {
+
+            // External blog entries should not be edited.
             if (empty($entry->uniquehash)) {
-                //External blog entries should not be edited
-                $contentcell->text .= html_writer::link(new moodle_url('/blog/edit.php',
+                $o .= html_writer::link(new moodle_url('/blog/edit.php',
                                                         array('action' => 'edit', 'entryid' => $entry->id)),
                                                         $stredit) . ' | ';
             }
-            $contentcell->text .= html_writer::link(new moodle_url('/blog/edit.php',
+            $o .= html_writer::link(new moodle_url('/blog/edit.php',
                                                     array('action' => 'delete', 'entryid' => $entry->id)),
                                                     $strdelete) . ' | ';
         }
 
         $entryurl = new moodle_url('/blog/index.php', array('entryid' => $entry->id));
-        $contentcell->text .= html_writer::link($entryurl, get_string('permalink', 'blog'));
+        $o .= html_writer::link($entryurl, get_string('permalink', 'blog'));
 
-        $contentcell->text .= $this->output->container_end();
+        $o .= $this->output->container_end();
 
-        if (isset($entry->renderable->lastmod) ) {
-            $contentcell->text .= '<div>';
-            $contentcell->text .= ' [ '.get_string('modified').': '.$entry->renderable->lastmod.' ]';
-            $contentcell->text .= '</div>';
+        // Last modification.
+        if ($entry->created != $entry->lastmodified) {
+            $o .= $this->output->container(' [ '.get_string('modified').': '.userdate($entry->lastmodified).' ]');
         }
 
-        //add comments under everything
+        // Comments.
         if (!empty($entry->renderable->comment)) {
-            $contentcell->text .= $entry->renderable->comment->output(true);
+            $o .= $entry->renderable->comment->output(true);
         }
 
-        $mainrow->cells[] = $contentcell;
-        $table->data = array($mainrow);
+        $o .= $this->output->container_end();
+
+        // Closing maincontent div.
+        $o .= $this->output->container('&nbsp;', 'side options');
+        $o .= $this->output->container_end();
+
+        $o .= $this->output->container_end();
 
-        return html_writer::table($table);
+        return $o;
     }
 
     /**
      * Renders an entry attachment
      *
-     * if return=html, then return a html string.
-     * if return=text, then return a text-only string.
-     * otherwise, print HTML for non-images, and return image HTML
+     * Print link for non-images and returns images as HTML
      *
      * @param blog_entry_attachment $attachment
-     * @param bool $return Whether to return or print the generated code
      * @return string List of attachments depending on the $return input
      */
-    public function render_blog_entry_attachment(blog_entry_attachment $attachment, $return = false) {
+    public function render_blog_entry_attachment(blog_entry_attachment $attachment) {
 
-        $syscontext = get_context_instance(CONTEXT_SYSTEM);
-        $strattachment = get_string("attachment", "forum");
-
-        $image = $this->output->pix_icon(file_file_icon($attachment->file), $attachment->filename, 'moodle', array('class'=>'icon'));
-
-        $o = '';
-        $imagereturn = '';
-
-        if ($return == "html") {
-            $o .= html_writer::link($attachment->url, $image);
-            $o .= html_writer::link($attachment->url, $attachment->filename);
-
-        } else if ($return == "text") {
-            $o .= "$strattachment $attachment->filename:\n$attachment->url\n";
+        $syscontext = context_system::instance();
 
+        // Image attachments don't get printed as links.
+        if (file_mimetype_in_typegroup($attachment->file->get_mimetype(), 'web_image')) {
+            $attrs = array('src' => $attachment->url, 'alt' => '');
+            $o = html_writer::empty_tag('img', $attrs);
+            $class = 'attachedimages';
         } else {
-            if (file_mimetype_in_typegroup($attachment->file->get_mimetype(), 'web_image')) {    // Image attachments don't get printed as links
-                $imagereturn .= '<br /><img src="'.$attachment->url.'" alt="" />';
-            } else {
-                $imagereturn .= html_writer::link($attachment->url, $image);
-                $imagereturn .= format_text(html_writer::link($attachment->url, $attachment->filename), FORMAT_HTML, array('context'=>$syscontext));
-            }
+            $image = $this->output->pix_icon(file_file_icon($attachment->file), $attachment->filename, 'moodle', array('class'=>'icon'));
+            $o = html_writer::link($attachment->url, $image);
+            $o .= format_text(html_writer::link($attachment->url, $attachment->filename), FORMAT_HTML, array('context' => $syscontext));
+            $class = 'attachments';
         }
-\r
-        if ($return) {\r
-            return $o;\r
-        }\r
-\r
-        return $imagereturn;
+
+        return $this->output->container($o, $class);
     }
 }
index c2b442a..adb51af 100644 (file)
@@ -191,6 +191,10 @@ h2.headingblock {
     padding: 5px 10px 10px;
 }
 
+/* Blogs */
+
+.blog_entry .content {margin-left: 43px;}
+
 /* Dock */
 
 #dock {
@@ -298,4 +302,4 @@ h2.headingblock {
 }
 #custommenu .custom_menu_submenu .custom_menu_submenu .yui3-menu-content {
     border-top:1px solid #DDD;
-}
\ No newline at end of file
+}
index 856ca67..15659a9 100644 (file)
@@ -252,8 +252,9 @@ input#id_externalurl {direction:ltr;}
  * Blogs
  */
 .addbloglink {text-align: center;}
-.blog_entry .audience {text-align: right;}
+.blog_entry .audience {text-align: right;padding-right: 4px;}
 .blog_entry .tags {margin-top: 15px;}
+.blog_entry .content {margin-left: 43px;}
 
 /**
  * Group