aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-04 13:07:09 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-04 13:07:09 +0000
commit9bb7b4c8afddc734adfd2717d766d1711cf8127c (patch)
tree0140067d3c0f32ad29f5e379b9c9a5d86d1a7969 /views/default
parent4e80e365f054dea55bd481cbebd7af5fed7bb288 (diff)
downloadelgg-9bb7b4c8afddc734adfd2717d766d1711cf8127c.tar.gz
elgg-9bb7b4c8afddc734adfd2717d766d1711cf8127c.tar.bz2
blog sidebar html updates finished - uses modules!
git-svn-id: http://code.elgg.org/elgg/trunk@7526 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/annotation/latest_comments.php8
-rw-r--r--views/default/css/screen.php4
-rw-r--r--views/default/layout_elements/module.php (renamed from views/default/layouts/module.php)19
-rw-r--r--views/default/output/tagcloud.php44
4 files changed, 43 insertions, 32 deletions
diff --git a/views/default/annotation/latest_comments.php b/views/default/annotation/latest_comments.php
index a43ec4fee..d603a3830 100644
--- a/views/default/annotation/latest_comments.php
+++ b/views/default/annotation/latest_comments.php
@@ -1,12 +1,12 @@
<?php
/**
* Display latest comments on objects
- **/
+ */
-if($vars['comments']){
+if ($vars['comments']){
global $CONFIG;
- echo "<h3>" . elgg_echo('generic_comments:latest') . "</h3>";
- foreach($vars['comments'] as $comment){
+ //echo "<h3>" . elgg_echo('generic_comments:latest') . "</h3>";
+ foreach ($vars['comments'] as $comment) {
//grab the entity the comment is on
$entity = get_entity($comment->entity_guid);
//comment owner
diff --git a/views/default/css/screen.php b/views/default/css/screen.php
index 18e4a0bad..a33586aa7 100644
--- a/views/default/css/screen.php
+++ b/views/default/css/screen.php
@@ -207,14 +207,14 @@ h2 {
background-position: -250px top;
text-indent: -1000em;
}
-.tags {
+.elgg-tags {
background-image:url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png);
background-repeat: no-repeat;
background-position: left -196px;
padding:1px 0 0 14px;
font-size: 85%;
}
-.tagcloud {
+.elgg-tagcloud {
text-align:justify;
}
.ajax-loader {
diff --git a/views/default/layouts/module.php b/views/default/layout_elements/module.php
index db940aedc..46ddcfbfd 100644
--- a/views/default/layouts/module.php
+++ b/views/default/layout_elements/module.php
@@ -1,14 +1,17 @@
<?php
/**
- * Elgg module layout
+ * Elgg module
*
+ * @uses $vars['title'] Title text
* @uses $vars['header'] HTML content of the header
* @uses $vars['body'] HTML content of the body
* @uses $vars['footer'] HTML content of the footer
* @uses $vars['class'] Optional additional class for module
* @uses $vars['header_class'] Optional additional class for header
+ * @uses $vars['body_class'] Optional additional class for body
*/
+$title = elgg_get_array_value('title', $vars, '');
$header = elgg_get_array_value('header', $vars, '');
$body = elgg_get_array_value('body', $vars, '');
$footer = elgg_get_array_value('footer', $vars, '');
@@ -24,10 +27,18 @@ $additional_class = elgg_get_array_value('header_class', $vars, '');
if ($additional_class) {
$header_class = "$header_class $additional_class";
}
+$header = "<div class=\"$header_class\"><h3>$title</h3></div>";
+//if ($header) {
+// $header = "<div class=\"$header_class\">$header</div>";
+//}
-if ($header) {
- $header = "<div class=\"$header_class\">$header</div>";
+$body_class = 'elgg-body';
+$additional_class = elgg_get_array_value('body_class', $vars, '');
+if ($additional_class) {
+ $body_class = "$body_class $additional_class";
}
+$body = "<div class=\"$body_class\">$body</div>";
+
if ($footer) {
$footer = "<div class=\"elgg-footer\">$footer</div>";
@@ -37,7 +48,7 @@ echo <<<HTML
<div class="$class">
<div class="elgg-inner">
$header
- <div class="elgg-body">$body</div>
+ $body
$footer
</div>
</div>
diff --git a/views/default/output/tagcloud.php b/views/default/output/tagcloud.php
index d28fbf05f..b0737c6f1 100644
--- a/views/default/output/tagcloud.php
+++ b/views/default/output/tagcloud.php
@@ -31,26 +31,18 @@ if (empty($vars['tagcloud']) && !empty($vars['value'])) {
if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) {
$counter = 0;
- $cloud = "<div class='tagcloud_wrapper'>";
$max = 0;
- if ($context != 'tags') {
- $title = elgg_echo('tagcloud');
- $cloud .= "<h3>$title</h3>";
- }
-
- $cloud .= '<div class="tagcloud">';
-
- foreach($vars['tagcloud'] as $tag) {
+ foreach ($vars['tagcloud'] as $tag) {
if ($tag->total > $max) {
$max = $tag->total;
}
}
- $list = '';
- foreach($vars['tagcloud'] as $tag) {
- if ($list != '') {
- $list .= ', ';
+ $cloud = '';
+ foreach ($vars['tagcloud'] as $tag) {
+ if ($cloud != '') {
+ $cloud .= ', ';
}
// protecting against division by zero warnings
$size = round((log($tag->total) / log($max + .0001)) * 100) + 30;
@@ -58,18 +50,26 @@ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) {
$size = 100;
}
$url = elgg_get_site_url()."pg/search/?q=". urlencode($tag->tag) . "&search_type=tags$type$subtype";
- $list .= "<a href=\"$url\" style=\"font-size: $size%\" title=\"".addslashes($tag->tag)." ($tag->total)\" style=\"text-decoration:none;\">" . htmlspecialchars($tag->tag, ENT_QUOTES, 'UTF-8') . "</a>";
+ $cloud .= "<a href=\"$url\" style=\"font-size: $size%\" title=\"".addslashes($tag->tag)." ($tag->total)\" style=\"text-decoration:none;\">" . htmlspecialchars($tag->tag, ENT_QUOTES, 'UTF-8') . "</a>";
}
-
- $cloud .= "$list</div>";
-
+
if ($context != 'tags') {
- $cloud .= '<p class="tags">';
- $cloud .= "<a href=\"".elgg_get_site_url()."pg/tags\">All site tags</a>";
+ $text = elgg_echo('tagcloud:allsitetags');
+ $cloud .= '<p class="elgg-tags">';
+ $cloud .= "<a href=\"".elgg_get_site_url()."pg/tags\">$text</a>";
$cloud .= '</p>';
}
$cloud .= elgg_view('tagcloud/extend');
- $cloud .= '</div>';
- echo $cloud;
-} \ No newline at end of file
+
+ if ($context != 'tags') {
+ $params = array(
+ 'title' => elgg_echo('tagcloud'),
+ 'body' => $cloud,
+ 'body_class' => 'elgg-tagcloud',
+ );
+ echo elgg_view('layout_elements/module', $params);
+ } else {
+ echo "<div class=\"elgg-tagcloud\">$cloud</div>";
+ }
+}