aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/views
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-13 10:30:09 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-13 10:30:09 +0000
commit4973086aa9dd4d482e54c0e5b177c09251e6a7ec (patch)
tree57ff1b398099ec072857c54033b09cab54f749ed /mod/blog/views
parent2c0154782f1e84e1bcf2517a910abe2ceab28ae6 (diff)
downloadelgg-4973086aa9dd4d482e54c0e5b177c09251e6a7ec.tar.gz
elgg-4973086aa9dd4d482e54c0e5b177c09251e6a7ec.tar.bz2
Removing some messages
git-svn-id: https://code.elgg.org/elgg/trunk@1879 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/views')
-rw-r--r--mod/blog/views/default/blog/css.php96
-rw-r--r--mod/blog/views/default/blog/forms/edit.php86
-rw-r--r--mod/blog/views/default/blog/gallery.php31
-rw-r--r--mod/blog/views/default/blog/listing.php25
-rw-r--r--mod/blog/views/default/blog/menu.php17
-rw-r--r--mod/blog/views/default/blog/notfound.php21
-rw-r--r--mod/blog/views/default/blog/view.php26
-rw-r--r--mod/blog/views/default/object/blog.php115
-rw-r--r--mod/blog/views/default/river/blog/annotate.php13
-rw-r--r--mod/blog/views/default/river/blog/create.php13
-rw-r--r--mod/blog/views/default/river/blog/update.php13
11 files changed, 456 insertions, 0 deletions
diff --git a/mod/blog/views/default/blog/css.php b/mod/blog/views/default/blog/css.php
new file mode 100644
index 000000000..77a59baae
--- /dev/null
+++ b/mod/blog/views/default/blog/css.php
@@ -0,0 +1,96 @@
+<?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 Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+?>
+
+
+.blog_post {
+ margin-bottom: 15px;
+ border-bottom: 1px solid #aaaaaa;
+}
+
+.blog_post_icon {
+ position: relative;
+ float:left;
+ margin:3px 0 0 0;
+ padding:0;
+}
+
+
+.blog_post h3 {
+ font-size: 150%;
+ margin-bottom: 5px;
+}
+
+.blog_post h3 a {
+ text-decoration: none;
+}
+
+.blog_post p {
+ margin: 0 0 5px 0;
+}
+
+.blog_post .strapline {
+ margin: 0 0 0 35px;
+ padding:0;
+ color: #aaa;
+ line-height:1em;
+}
+.blog_post p.tags {
+ background:transparent url(<?php echo $vars['url']; ?>_graphics/icon_tag.gif) no-repeat scroll left 2px;
+ margin:0 0 0 35px;
+ padding:0pt 0pt 0pt 16px;
+ min-height:22px;
+}
+.blog_post .options {
+ margin:0;
+ padding:0;
+}
+
+.blog_post_body img[align="left"] {
+ margin: 10px 10px 10px 0;
+ float:left;
+}
+.blog_post_body img[align="right"] {
+ margin: 10px 0 10px 10px;
+ float:right;
+}
+
+.blog-comments h3 {
+ font-size: 150%;
+ margin-bottom: 10px;
+}
+.blog-comment {
+ margin-top: 10px;
+ margin-bottom:20px;
+ border-bottom: 1px solid #aaaaaa;
+}
+.blog-comment img {
+ float:left;
+ margin: 0 10px 0 0;
+}
+.blog-comment-menu {
+ margin:0;
+}
+.blog-comment-byline {
+ background: #dddddd;
+ height:22px;
+ padding-top:3px;
+ margin:0;
+}
+.blog-comment-text {
+ margin:5px 0 5px 0;
+}
+
+
+
+
diff --git a/mod/blog/views/default/blog/forms/edit.php b/mod/blog/views/default/blog/forms/edit.php
new file mode 100644
index 000000000..79dca974f
--- /dev/null
+++ b/mod/blog/views/default/blog/forms/edit.php
@@ -0,0 +1,86 @@
+<?php
+
+ /**
+ * Elgg blog edit/add page
+ *
+ * @package ElggBlog
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ *
+ * @uses $vars['object'] Optionally, the blog post to edit
+ */
+
+ // Set title, form destination
+ if (isset($vars['entity'])) {
+ $title = sprintf(elgg_echo("blog:editpost"),$object->title);
+ $action = "blog/edit";
+ $title = $vars['entity']->title;
+ $body = $vars['entity']->description;
+ $tags = $vars['entity']->tags;
+ } else {
+ $title = elgg_echo("blog:addpost");
+ $action = "blog/add";
+ $tags = "";
+ $title = "";
+ $description = "";
+ }
+
+ // Just in case we have some cached details
+ if (isset($vars['blogtitle'])) {
+ $title = $vars['blogtitle'];
+ $body = $vars['blogbody'];
+ $tags = $vars['blogtags'];
+ }
+
+?>
+
+ <form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" method="post">
+
+ <p>
+ <label><?php echo elgg_echo("title"); ?><br />
+ <?php
+
+ echo elgg_view("input/text", array(
+ "internalname" => "blogtitle",
+ "value" => $title,
+ ));
+
+ ?>
+ </label>
+ </p>
+ <p>
+ <label><?php echo elgg_echo("blog:text"); ?><br />
+ <?php
+
+ echo elgg_view("input/longtext",array(
+ "internalname" => "blogbody",
+ "value" => $body,
+ ));
+ ?>
+ </label>
+ </p>
+ <p>
+ <label><?php echo elgg_echo("tags"); ?><br />
+ <?php
+
+ echo elgg_view("input/tags", array(
+ "internalname" => "blogtags",
+ "value" => $tags,
+ ));
+
+ ?>
+ </p>
+ <p>
+ <?php
+
+ if (isset($vars['entity'])) {
+ ?><input type="hidden" name="blogpost" value="<?php echo $vars['entity']->getGUID(); ?>" /><?php
+ }
+
+ ?>
+ <input type="submit" name="submit" value="<?php echo elgg_echo('save'); ?>" />
+ </p>
+
+ </form> \ No newline at end of file
diff --git a/mod/blog/views/default/blog/gallery.php b/mod/blog/views/default/blog/gallery.php
new file mode 100644
index 000000000..0006ac890
--- /dev/null
+++ b/mod/blog/views/default/blog/gallery.php
@@ -0,0 +1,31 @@
+<?php
+
+ /**
+ * Elgg blog listing
+ *
+ * @package ElggBlog
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+ $owner = $vars['entity']->getOwnerEntity();
+ $friendlytime = friendly_time($vars['entity']->time_created);
+ $icon = elgg_view(
+ "profile/icon", array(
+ 'entity' => $owner,
+ 'size' => 'small',
+ )
+ );
+ $info = "<p>" . elgg_echo('blog') . ": <a href=\"{$vars['entity']->getURL()}\">{$vars['entity']->title}</a></p>";
+ $info .= "<p><a href=\"{$owner->getURL()}\">{$owner->name}</a> {$friendlytime}</p>";
+
+ //display
+ echo "<div class=\"blog_gallery\">";
+ echo "<div class=\"blog_gallery_icon\">" . $icon . "</div>";
+ echo "<div class=\"blog_gallery_content\">" . $info . "</div>";
+ echo "</div>";
+
+
+?> \ No newline at end of file
diff --git a/mod/blog/views/default/blog/listing.php b/mod/blog/views/default/blog/listing.php
new file mode 100644
index 000000000..13631cca0
--- /dev/null
+++ b/mod/blog/views/default/blog/listing.php
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Elgg blog listing
+ *
+ * @package ElggBlog
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+ $owner = $vars['entity']->getOwnerEntity();
+ $friendlytime = friendly_time($vars['entity']->time_created);
+ $icon = elgg_view(
+ "profile/icon", array(
+ 'entity' => $owner,
+ 'size' => 'small',
+ )
+ );
+ $info = "<p>" . elgg_echo('blog') . ": <a href=\"{$vars['entity']->getURL()}\">{$vars['entity']->title}</a></p>";
+ $info .= "<p class=\"owner_timestamp\"><a href=\"{$owner->getURL()}\">{$owner->name}</a> {$friendlytime}</p>";
+ echo elgg_view_listing($icon,$info);
+
+?> \ No newline at end of file
diff --git a/mod/blog/views/default/blog/menu.php b/mod/blog/views/default/blog/menu.php
new file mode 100644
index 000000000..3a4b9f8bd
--- /dev/null
+++ b/mod/blog/views/default/blog/menu.php
@@ -0,0 +1,17 @@
+<?php
+
+ /**
+ * Elgg hoverover extender for blog
+ *
+ * @package ElggBlog
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+?>
+
+ <p class="user_menu_blog">
+ <a href="<?php echo $vars['url']; ?>pg/blog/<?php echo $vars['entity']->username; ?>"><?php echo elgg_echo("blog"); ?></a>
+ </p> \ No newline at end of file
diff --git a/mod/blog/views/default/blog/notfound.php b/mod/blog/views/default/blog/notfound.php
new file mode 100644
index 000000000..76fc5368c
--- /dev/null
+++ b/mod/blog/views/default/blog/notfound.php
@@ -0,0 +1,21 @@
+<?php
+
+ /**
+ * Elgg blog not found page
+ *
+ * @package ElggBlog
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+?>
+
+ <p>
+ <?php
+
+ echo elgg_echo("blog:notfound");
+
+ ?>
+ </p> \ No newline at end of file
diff --git a/mod/blog/views/default/blog/view.php b/mod/blog/views/default/blog/view.php
new file mode 100644
index 000000000..616468280
--- /dev/null
+++ b/mod/blog/views/default/blog/view.php
@@ -0,0 +1,26 @@
+<?php
+
+ /**
+ * Elgg blog view page
+ *
+ * @package ElggBlog
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ *
+ * @uses $vars['posts'] An array of posts to view
+ */
+
+ // If there are any posts to view, view them
+ if (is_array($vars['posts']) && sizeof($vars['posts']) > 0) {
+
+ foreach($vars['posts'] as $post) {
+
+ echo elgg_view_entity($post);
+
+ }
+
+ }
+
+?> \ No newline at end of file
diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php
new file mode 100644
index 000000000..202be6340
--- /dev/null
+++ b/mod/blog/views/default/object/blog.php
@@ -0,0 +1,115 @@
+<?php
+
+ /**
+ * Elgg blog individual post view
+ *
+ * @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/
+ *
+ * @uses $vars['entity'] Optionally, the blog post to view
+ */
+
+ if (isset($vars['entity'])) {
+
+ if (get_context() == "search") {
+
+ //display the correct layout depending on gallery or list view
+ if (get_input('search_viewtype') == "gallery") {
+
+ //display the gallery view
+ echo elgg_view("blog/gallery",$vars);
+
+ } else {
+
+ echo elgg_view("blog/listing",$vars);
+
+ }
+
+
+ } else {
+
+?>
+
+ <div class="blog_post">
+ <h3><a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo $vars['entity']->title; ?></a></h3>
+ <!-- display the user icon -->
+ <div class="blog_post_icon">
+ <?php
+ echo elgg_view("profile/icon",array('entity' => $vars['entity']->getOwnerEntity(), 'size' => 'tiny'));
+ ?>
+ </div>
+ <p class="strapline">
+ <?php
+
+ echo sprintf(elgg_echo("blog:strapline"),
+ date("F j, Y",$vars['entity']->time_created)
+ );
+
+ ?>
+ <?php echo elgg_echo('by'); ?> <a href="<?php echo $vars['url']; ?>pg/blog/<?php echo $vars['entity']->getOwnerEntity()->username; ?>"><?php echo $vars['entity']->getOwnerEntity()->name; ?></a> &nbsp;
+ <!-- display the comments link -->
+ <?php
+ //get the number of comments
+ $num_comments = elgg_count_comments($vars['entity']);
+ ?>
+ <a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo sprintf(elgg_echo("comments")) . " (" . $num_comments . ")"; ?></a><br />
+ </p>
+ <!-- display tags -->
+ <p class="tags">
+ <?php
+
+ echo elgg_view('output/tags', array('tags' => $vars['entity']->tags));
+
+ ?>
+ </p>
+ <div class="blog_post_body">
+
+ <!-- display the actual blog post -->
+ <?php
+
+ echo autop($vars['entity']->description);
+
+ ?>
+ </div>
+ <!-- display edit options if it is the blog post owner -->
+ <p class="options">
+ <?php
+
+ if ($vars['entity']->canEdit()) {
+
+ ?>
+ <a href="<?php echo $vars['url']; ?>mod/blog/edit.php?blogpost=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("edit"); ?></a> &nbsp;
+ <?php
+
+ echo elgg_view("output/confirmlink", array(
+ 'href' => $vars['url'] . "action/blog/delete?blogpost=" . $vars['entity']->getGUID(),
+ 'text' => elgg_echo('delete'),
+ 'confirm' => elgg_echo('deleteconfirm'),
+ ));
+
+ // Allow the menu to be extended
+ echo elgg_view("editmenu",array('entity' => $vars['entity']));
+
+ ?>
+ <?php
+ }
+
+ ?>
+ </p>
+ </div>
+
+<?php
+
+ // If we've been asked to display the full view
+ if (isset($vars['full']) && $vars['full'] == true) {
+ echo elgg_view_comments($vars['entity']);
+ }
+
+ }
+
+ }
+
+?> \ No newline at end of file
diff --git a/mod/blog/views/default/river/blog/annotate.php b/mod/blog/views/default/river/blog/annotate.php
new file mode 100644
index 000000000..a977c296b
--- /dev/null
+++ b/mod/blog/views/default/river/blog/annotate.php
@@ -0,0 +1,13 @@
+<?php
+
+ $statement = $vars['statement'];
+ $performed_by = $statement->getSubject();
+ $object = $statement->getObject();
+
+ $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+ $string = sprintf(elgg_echo("blog:river:posted"),$url) . " ";
+ $string .= "<a href=\"" . $object->getURL() . "\">" . elgg_echo("blog:river:annotate:create") . "</a>";
+
+?>
+
+<?php echo $string; ?> \ No newline at end of file
diff --git a/mod/blog/views/default/river/blog/create.php b/mod/blog/views/default/river/blog/create.php
new file mode 100644
index 000000000..2a4c19397
--- /dev/null
+++ b/mod/blog/views/default/river/blog/create.php
@@ -0,0 +1,13 @@
+<?php
+
+ $statement = $vars['statement'];
+ $performed_by = $statement->getSubject();
+ $object = $statement->getObject();
+
+ $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+ $string = sprintf(elgg_echo("blog:river:created"),$url) . " ";
+ $string .= "<a href=\"" . $object->getURL() . "\">" . elgg_echo("blog:river:create") . "</a>";
+
+?>
+
+<?php echo $string; ?> \ No newline at end of file
diff --git a/mod/blog/views/default/river/blog/update.php b/mod/blog/views/default/river/blog/update.php
new file mode 100644
index 000000000..afdfb44f0
--- /dev/null
+++ b/mod/blog/views/default/river/blog/update.php
@@ -0,0 +1,13 @@
+<?php
+
+ $statement = $vars['statement'];
+ $performed_by = $statement->getSubject();
+ $object = $statement->getObject();
+
+ $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+ $string = sprintf(elgg_echo("blog:river:updated"),$url) . " ";
+ $string .= "<a href=\"" . $object->getURL() . "\">" . elgg_echo("blog:river:update") . "</a>";
+
+?>
+
+<?php echo $string; ?> \ No newline at end of file