aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-03 09:31:29 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-03 09:31:29 +0000
commitcb321a0dad1f6ec1f3061c7882d5c244c702f0d5 (patch)
treea53076b959a0d72cfaca8038eeac0bd56b3a9e80
parent1ea82fe304b680eb9f84c24b98eb718ca9d59316 (diff)
downloadelgg-cb321a0dad1f6ec1f3061c7882d5c244c702f0d5.tar.gz
elgg-cb321a0dad1f6ec1f3061c7882d5c244c702f0d5.tar.bz2
Adding name and posted date to blog entries
git-svn-id: https://code.elgg.org/elgg/trunk@382 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/blog/languages/en.php2
-rw-r--r--mod/blog/start.php5
-rw-r--r--mod/blog/views/default/blog/css.php38
-rw-r--r--mod/blog/views/default/object/blog.php17
4 files changed, 61 insertions, 1 deletions
diff --git a/mod/blog/languages/en.php b/mod/blog/languages/en.php
index cef0f628f..1467f4774 100644
--- a/mod/blog/languages/en.php
+++ b/mod/blog/languages/en.php
@@ -16,6 +16,8 @@
'blog:text' => "Blog text",
+ 'blog:strapline' => "%s",
+
/**
* Status messages
*/
diff --git a/mod/blog/start.php b/mod/blog/start.php
index d3513dc02..6b1ca3766 100644
--- a/mod/blog/start.php
+++ b/mod/blog/start.php
@@ -25,7 +25,7 @@
// Load system configuration
global $CONFIG;
- // Load translations
+ // Load the language file
register_translations($CONFIG->pluginspath . "blog/languages/");
// Set up menu for logged in users
@@ -36,6 +36,9 @@
));
}
+ // Extend system CSS with our own styles, which are defined in the blog/css view
+ extend_view('css','blog/css');
+
}
// Make sure the blog initialisation function is called on initialisation
diff --git a/mod/blog/views/default/blog/css.php b/mod/blog/views/default/blog/css.php
new file mode 100644
index 000000000..1aa20f8e0
--- /dev/null
+++ b/mod/blog/views/default/blog/css.php
@@ -0,0 +1,38 @@
+<?php
+
+ /**
+ * Elgg blog CSS extender
+ *
+ * @package ElggBlog
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Ben Werdmuller <ben@curverider.co.uk>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+?>
+
+.blog-post {
+
+ margin-bottom: 30px;
+ border: 0px;
+ border-bottom: 1px;
+ border-style: solid;
+ border-color: #aaa;
+
+}
+
+.blog-post h3 {
+
+ font-size: 200%;
+ margin-bottom: 15px;
+
+}
+
+.blog-post .strapline {
+
+ font-size: 130%;
+ margin-bottom: 20px;
+ color: #aaa;
+
+} \ No newline at end of file
diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php
index 74b3b7c01..ee88a0888 100644
--- a/mod/blog/views/default/object/blog.php
+++ b/mod/blog/views/default/object/blog.php
@@ -18,6 +18,23 @@
<div class="blog-post">
<h3><?php echo $vars['entity']->title; ?></h3>
+ <p class="strapline">
+ <span style="float:right">
+ <?php
+
+ echo sprintf(elgg_echo("blog:strapline"),
+ date("F j",$vars['entity']->time_created)
+ );
+
+ ?>
+ </span>
+ <?php
+
+ $owner = get_entity($vars['entity']->getOwner());
+ echo $owner->name;
+
+ ?>
+ </p>
<p>
<?php