aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/thewire/actions/add.php2
-rw-r--r--mod/thewire/add.php3
-rw-r--r--mod/thewire/everyone.php4
-rw-r--r--mod/thewire/graphics/thewire_speech_bubble.gifbin560 -> 278 bytes
-rw-r--r--mod/thewire/index.php12
-rw-r--r--mod/thewire/languages/en.php6
-rw-r--r--mod/thewire/manifest.xml2
-rw-r--r--mod/thewire/views/default/object/thewire.php105
-rw-r--r--mod/thewire/views/default/thewire/css.php168
-rw-r--r--mod/thewire/views/default/thewire/forms/add.php38
-rw-r--r--mod/thewire/views/default/thewire/profile_status.php10
-rw-r--r--mod/thewire/views/default/thewire/scripts/counter.js16
12 files changed, 150 insertions, 216 deletions
diff --git a/mod/thewire/actions/add.php b/mod/thewire/actions/add.php
index 58589dc9a..1a59a979f 100644
--- a/mod/thewire/actions/add.php
+++ b/mod/thewire/actions/add.php
@@ -14,7 +14,7 @@
if (!isloggedin()) forward();
// Get input data
- $body = get_input('note');
+ $body = get_input('new_post_textarea');
$tags = get_input('thewiretags');
$access_id = (int)get_default_access();
if ($access_id == ACCESS_PRIVATE)
diff --git a/mod/thewire/add.php b/mod/thewire/add.php
index 4702c9aa5..6012338fa 100644
--- a/mod/thewire/add.php
+++ b/mod/thewire/add.php
@@ -20,7 +20,8 @@
// choose the required canvas layout and items to display
$area2 = elgg_view_title(elgg_echo('thewire:add'));
$area2 .= elgg_view("thewire/forms/add");
- $body = elgg_view_layout("two_column_left_sidebar", '',$area2);
+
+ $body = elgg_view_layout("one_column_with_sidebar", '',$area2);
// Display page
page_draw(elgg_echo('thewire:addpost'),$body);
diff --git a/mod/thewire/everyone.php b/mod/thewire/everyone.php
index a5214a212..db35f4410 100644
--- a/mod/thewire/everyone.php
+++ b/mod/thewire/everyone.php
@@ -17,9 +17,9 @@
//add form
$area2 .= elgg_view("thewire/forms/add");
+ $area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'thewire'));
- $area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'thewire')); // elgg_view("thewire/view",array('entity' => $thewireposts));
- $body = elgg_view_layout("two_column_left_sidebar", '', $area2);
+ $body = elgg_view_layout("one_column_with_sidebar", '', $area2);
// Display page
page_draw(elgg_echo('thewire:everyone'),$body);
diff --git a/mod/thewire/graphics/thewire_speech_bubble.gif b/mod/thewire/graphics/thewire_speech_bubble.gif
index d0e8606a1..ec5b89773 100644
--- a/mod/thewire/graphics/thewire_speech_bubble.gif
+++ b/mod/thewire/graphics/thewire_speech_bubble.gif
Binary files differ
diff --git a/mod/thewire/index.php b/mod/thewire/index.php
index 2514d7452..078e93271 100644
--- a/mod/thewire/index.php
+++ b/mod/thewire/index.php
@@ -21,16 +21,20 @@
}
// title
- $area2 = elgg_view_title(elgg_echo("thewire:read"));
+ if (page_owner() == $_SESSION['guid']) {
+ $area2 = elgg_view_title(elgg_echo("thewire:read"));
+ } else {
+ $area2 = elgg_view_title(sprintf(elgg_echo("thewire:user"),$page_owner->name));
+ }
//add form
$area2 .= elgg_view("thewire/forms/add");
// Display the user's wire
- $area2 .= list_user_objects($page_owner->getGUID(),'thewire'); // elgg_view("thewire/view",array('entity' => $thewire));
-
+ $area2 .= list_user_objects($page_owner->getGUID(),'thewire');
+
//select the correct canvas area
- $body = elgg_view_layout("two_column_left_sidebar", '', $area2);
+ $body = elgg_view_layout("one_column_with_sidebar", '', $area2);
// Display page
page_draw(sprintf(elgg_echo('thewire:user'),$page_owner->name),$body);
diff --git a/mod/thewire/languages/en.php b/mod/thewire/languages/en.php
index da0fc222f..69e35cdfd 100644
--- a/mod/thewire/languages/en.php
+++ b/mod/thewire/languages/en.php
@@ -7,11 +7,11 @@
*/
'thewire' => "The wire",
- 'thewire:user' => "%s's wire",
+ 'thewire:user' => "%s's wire posts",
'thewire:posttitle' => "%s's notes on the wire: %s",
'thewire:everyone' => "All wire posts",
- 'thewire:read' => "Wire posts",
+ 'thewire:read' => "My wire posts",
'thewire:strapline' => "%s",
@@ -20,7 +20,7 @@
'thewire:reply' => "Reply",
'thewire:via' => "via",
'thewire:wired' => "Posted to the wire",
- 'thewire:charleft' => "characters left",
+ 'thewire:charleft' => "characters remaining",
'item:object:thewire' => "Wire posts",
'thewire:notedeleted' => "note deleted",
'thewire:doing' => "What are you doing? Tell everyone on the wire:",
diff --git a/mod/thewire/manifest.xml b/mod/thewire/manifest.xml
index 080b69b73..a4239313a 100644
--- a/mod/thewire/manifest.xml
+++ b/mod/thewire/manifest.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin_manifest>
<field key="author" value="Curverider" />
- <field key="version" value="1.7" />
+ <field key="version" value="1.8" />
<field key="description" value="Provides a microblogging service for your Elgg site." />
<field key="website" value="http://www.elgg.org/" />
<field key="copyright" value="(C) Curverider 2008-2010" />
diff --git a/mod/thewire/views/default/object/thewire.php b/mod/thewire/views/default/object/thewire.php
index 3e8e53124..738ab96ba 100644
--- a/mod/thewire/views/default/object/thewire.php
+++ b/mod/thewire/views/default/object/thewire.php
@@ -1,9 +1,9 @@
<?php
/**
- * Elgg thewire note view
+ * Elgg Wire Posts Listings
*
- * @package ElggTheWire
+ * @package thewire
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Curverider <info@elgg.com>
* @copyright Curverider Ltd 2008-2010
@@ -14,89 +14,54 @@
* @uses $vars['entity'] Optionally, the note to view
*/
- if (isset($vars['entity'])) {
-
- $user_name = $vars['entity']->getOwnerEntity()->name;
-
- //if the note is a reply, we need some more info
-
- $note_url = '';
- $note_owner = elgg_echo("thewire:notedeleted");
-
+if (isset($vars['entity'])) {
+ $user_name = $vars['entity']->getOwnerEntity()->name;
+
+ //if the note is a reply, we need some more info
+ $note_url = '';
+ $note_owner = elgg_echo("thewire:notedeleted");
?>
-<div class="thewire-singlepage">
- <div class="thewire-post">
-
- <!-- the actual shout -->
- <div class="note_body">
+<div class="wire_post">
+ <div class="wire_post_contents clearfloat radius8">
- <div class="thewire_icon">
+ <div class="wire_post_icon">
<?php
- echo elgg_view("profile/icon",array('entity' => $vars['entity']->getOwnerEntity(), 'size' => 'small'));
+ echo elgg_view("profile/icon",array('entity' => $vars['entity']->getOwnerEntity(), 'size' => 'tiny'));
?>
</div>
- <div class="thewire_options">
-
- <a href="<?php echo $vars['url']; ?>mod/thewire/add.php?wire_username=<?php echo $vars['entity']->getOwnerEntity()->username; ?>" class="reply"><?php echo elgg_echo('thewire:reply'); ?></a>
- <?php
-/* //only have a reply option for main notes, not other replies
- if($vars['entity']->parent == 0){
- ?>
- <a href="<?php echo $vars['url']; ?>mod/thewire/reply.php?note_id=<?php echo $vars['entity']->guid; ?>" class="reply">reply</a>
- <?php
- }
-*/
- ?>
- <div class="clearfloat"></div>
- <?php
-
- // if the user looking at thewire post can edit, show the delete link
+ <div class="wire_post_options">
+ <a href="<?php echo $vars['url']; ?>mod/thewire/add.php?wire_username=<?php echo $vars['entity']->getOwnerEntity()->username; ?>" class="action_button reply small"><?php echo elgg_echo('thewire:reply'); ?></a>
+ <?php
+ // if the user looking at thewire post can edit, show the delete link
if ($vars['entity']->canEdit()) {
-
-
- echo "<div class='delete_note'>" . elgg_view("output/confirmlink",array(
- 'href' => $vars['url'] . "action/thewire/delete?thewirepost=" . $vars['entity']->getGUID(),
- 'text' => elgg_echo('delete'),
- 'confirm' => elgg_echo('deleteconfirm'),
- )) . "</div>";
-
- } //end of can edit if statement
- ?>
+ echo "<div class='delete_button'>" . elgg_view("output/confirmlink",array(
+ 'href' => $vars['url'] . "action/thewire/delete?thewirepost=" . $vars['entity']->getGUID(),
+ 'text' => elgg_echo('delete'),
+ 'confirm' => elgg_echo('deleteconfirm'),
+ )) . "</div>";
+ }
+ ?>
</div>
-
-
- <?php
- echo "<b>{$user_name}: </b>";
-
-
- $desc = $vars['entity']->description;
-
- $desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@<a href="' . $vars['url'] . 'pg/thewire/$1">$1</a>',$desc);
- echo parse_urls($desc);
- ?>
-
- <div class="clearfloat"></div>
- </div>
- <div class="note_date">
-
- <?php
-
+ <div class="wire_post_info">
+ <a href="<?php echo $vars['url']; ?>pg/thewire/<?php echo $vars['entity']->getOwnerEntity()->username; ?>"><?php echo $user_name; ?></a>
+ <?php
+ $desc = $vars['entity']->description;
+ $desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@<a href="' . $vars['url'] . 'pg/thewire/$1">$1</a>',$desc);
+ echo parse_urls($desc);
+ ?>
+ <p class="entity_subtext">
+ <?php
echo elgg_echo("thewire:wired") . " " . sprintf(elgg_echo("thewire:strapline"),
friendly_time($vars['entity']->time_created)
);
-
echo " via " . elgg_echo($vars['entity']->method) . ".";
-
- ?>
+ ?>
+ </p>
</div>
-
-
</div>
</div>
<?php
-
- }
-
+}
?> \ No newline at end of file
diff --git a/mod/thewire/views/default/thewire/css.php b/mod/thewire/views/default/thewire/css.php
index 6491af2ed..9f460458d 100644
--- a/mod/thewire/views/default/thewire/css.php
+++ b/mod/thewire/views/default/thewire/css.php
@@ -11,126 +11,90 @@
*/
?>
-/* widget */
-.thewire-singlepage {
- margin:0 10px 0 10px;
+/* new wire post form */
+.new_wire_post {
+ margin:10px 0 15px 0;
+ padding-bottom:15px;
+ border-bottom: 1px solid #dedede;
}
-.thewire-singlepage .note_body {
+.new_wire_post input[type="submit"] {
+ margin:3px 0 0 0;
+ float:right;
+}
+.new_wire_post textarea {
+ width: 719px;
+ height: 52px;
+ padding: 2px 5px 5px 5px;
+ font-size: 120%;
+ color:#333333;
+}
+.character_count {
+ width: 642px;
+ color:#666666;
+}
+.character_count input {
+ color:#666666;
+ border:none;
+ font-size: 100%;
+ font-weight: bold;
+ padding:0 2px 0 0;
+ margin:0;
+ text-align: right;
background: white;
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
}
-.collapsable_box_content .note_body {
- line-height:1.2em;
+.character_count input:focus {
+ border:none;
+ background:white;
}
-.thewire-singlepage .thewire-post {
+
+
+/* wire posts listings */
+.wire_post {
+ padding-bottom:10px;
margin-bottom:5px;
- background:transparent url(<?php echo $vars['url']; ?>mod/thewire/graphics/thewire_speech_bubble.gif) no-repeat right bottom;
-}
-.thewire-post {
- background:#cccccc;
- margin-bottom:10px;
+ background-image: url(<?php echo $vars['url']; ?>mod/thewire/graphics/thewire_speech_bubble.gif);
+ background-repeat: no-repeat;
+ background-position: right bottom;
}
-.thewire-post .note_date {
- font-size:90%;
- color:#666666;
- padding:0;
+.wire_post_contents {
+ background-color: #eeeeee;
+ margin:0;
+ padding:5px;
+ line-height: 1.2em;
+ min-height: 34px;
+ position: relative;
}
-.thewire_icon {
+.wire_post_icon {
float:left;
- margin:0 8px 4px 2px;
+ margin-right:8px;
}
-.note_body {
- margin:0;
- padding:6px 4px 4px 4px;
- min-height: 40px;
- line-height: 1.4em;
+.wire_post_info {
+ margin-top:-3px;
+ float:left;
+ width:620px;
}
-.thewire_options {
+.wire_post_options {
float:right;
width:65px;
}
-.thewire-post .reply {
- font: 11px/100% Arial, Helvetica, sans-serif;
- font-weight: bold;
- color: #ffffff;
- background:#999999;
- border: 2px solid #999999;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- width: auto;
- padding: 0 3px 2px 3px;
- margin:0 0 5px 5px;
- cursor: pointer;
+.wire_post_options .action_button.reply.small {
float:right;
}
-.thewire-post .reply:hover {
- background: #4690d6;
- border: 2px solid #4690d6;
- color:white;
- text-decoration: none;
-}
-.thewire-post .delete_note {
- width:14px;
- height:14px;
- margin:3px 0 0 0;
- float:right;
+.wire_post_options .delete_button {
+ position: absolute;
+ bottom:5px;
+ right:5px;
}
-.thewire-post .delete_note a {
- display:block;
- cursor: pointer;
- width:14px;
- height:14px;
- background: url("<?php echo $vars['url']; ?>_graphics/icon_customise_remove.png") no-repeat 0 0;
- text-indent: -9000px;
-}
-.thewire-post .delete_note a:hover {
- background-position: 0 -16px;
-}
-/* IE 6 fix */
-* html .thewire-post .delete_note a { background-position-y: 2px; }
-* html .thewire-post .delete_note a:hover { background-position-y: -14px; }
-.post_to_wire {
- background: white;
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
- margin:0 10px 10px 10px;
- padding:10px;
-}
-.post_to_wire input[type="submit"] {
- margin:0;
-}
-/* reply form */
-textarea#thewire_large-textarea {
- width: 664px;
- height: 40px;
- padding: 6px;
- font-family: Arial, 'Trebuchet MS','Lucida Grande', sans-serif;
- font-size: 100%;
- color:#666666;
-}
-/* IE 6 fix */
-* html textarea#thewire_large-textarea {
- width: 642px;
+/* latest wire post on profile page */
+.wire_post .action_button.update.small {
+ float:right;
+ padding:4px;
+ position: absolute;
+ bottom:5px;
+ right:5px;
}
-input.thewire_characters_remaining_field {
- color:#333333;
- border:none;
- font-size: 100%;
- font-weight: bold;
- padding:0 2px 0 0;
- margin:0;
- text-align: right;
- background: white;
-}
-input.thewire_characters_remaining_field:focus {
- border:none;
- background:white;
-}
-.thewire_characters_remaining {
- text-align: right;
-}
+
diff --git a/mod/thewire/views/default/thewire/forms/add.php b/mod/thewire/views/default/thewire/forms/add.php
index cf9ff15e6..60d7914ea 100644
--- a/mod/thewire/views/default/thewire/forms/add.php
+++ b/mod/thewire/views/default/thewire/forms/add.php
@@ -15,30 +15,20 @@
if (!empty($wire_user)) { $msg = '@' . $wire_user . ' '; } else { $msg = ''; }
?>
-<div class="post_to_wire">
+<div class="new_wire_post clearfloat">
<h3><?php echo elgg_echo("thewire:doing"); ?></h3>
-<script>
-function textCounter(field,cntfield,maxlimit) {
- // if too long...trim it!
- if (field.value.length > maxlimit) {
- field.value = field.value.substring(0, maxlimit);
- } else {
- // otherwise, update 'characters left' counter
- cntfield.value = maxlimit - field.value.length;
- }
-}
-</script>
-
- <form action="<?php echo $vars['url']; ?>action/thewire/add" method="post" name="noteForm">
- <?php
- $display .= "<textarea name='note' value='' onKeyDown=\"textCounter(document.noteForm.note,document.noteForm.remLen1,140)\" onKeyUp=\"textCounter(document.noteForm.note,document.noteForm.remLen1,140)\" id=\"thewire_large-textarea\">{$msg}</textarea>";
- $display .= "<div class='thewire_characters_remaining'><input readonly type=\"text\" name=\"remLen1\" size=\"3\" maxlength=\"3\" value=\"140\" class=\"thewire_characters_remaining_field\">";
- echo $display;
- echo elgg_echo("thewire:charleft") . "</div>";
- echo elgg_view('input/securitytoken');
- ?>
- <input type="hidden" name="method" value="site" />
- <input type="submit" value="<?php echo elgg_echo('save'); ?>" />
- </form>
+<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/thewire/views/default/thewire/scripts/counter.js"></script>
+<form action="<?php echo $vars['url']; ?>action/thewire/add" method="post" name="new_post">
+ <?php
+ $action_txt = elgg_echo('post');
+ $display .= "<textarea name='new_post_textarea' value='' onKeyDown=\"textCounter(document.new_post.new_post_textarea,document.new_post.remLen1,140)\" onKeyUp=\"textCounter(document.new_post.new_post_textarea,document.new_post.remLen1,140)\">{$msg}</textarea>";
+ $display .= "<input type='submit' class='action_button' value='{$action_txt}' />";
+ $display .= "<div class='character_count'><input readonly type=\"text\" name=\"remLen1\" size=\"3\" maxlength=\"3\" value=\"140\">";
+ echo $display;
+ echo elgg_echo("thewire:charleft") . "</div>";
+ echo elgg_view('input/securitytoken');
+ ?>
+ <input type="hidden" name="method" value="site" />
+</form>
</div>
<?php echo elgg_view('input/urlshortener'); ?> \ No newline at end of file
diff --git a/mod/thewire/views/default/thewire/profile_status.php b/mod/thewire/views/default/thewire/profile_status.php
index 890b8b9c3..fa8ccd76b 100644
--- a/mod/thewire/views/default/thewire/profile_status.php
+++ b/mod/thewire/views/default/thewire/profile_status.php
@@ -1,7 +1,7 @@
<?php
/**
- * New wire post view for the activity stream
+ * Latest wire post on profile activity page
*/
$owner = $vars['entity']->guid;
@@ -13,16 +13,16 @@
if($latest_wire){
foreach($latest_wire as $lw){
$content = $lw->description;
- $time = "<span> (" . friendly_time($lw->time_created) . ")</span>";
+ $time = "<p class='entity_subtext'> (" . friendly_time($lw->time_created) . ")</p>";
}
}
if($latest_wire){
- echo "<div class=\"profile_status\">";
+ echo "<div class='wire_post'><div class='wire_post_contents clearfloat radius8'>";
echo $content;
if($owner == $_SESSION['user']->guid)
- echo " <a class=\"status_update\" href=\"{$url_to_wire}\">update</a>";
+ echo " <a class='action_button update small' href=\"{$url_to_wire}\">update</a>";
echo $time;
- echo "</div>";
+ echo "</div></div>";
}
?> \ No newline at end of file
diff --git a/mod/thewire/views/default/thewire/scripts/counter.js b/mod/thewire/views/default/thewire/scripts/counter.js
index 3a1ebdbc5..7486bd1de 100644
--- a/mod/thewire/views/default/thewire/scripts/counter.js
+++ b/mod/thewire/views/default/thewire/scripts/counter.js
@@ -1,6 +1,16 @@
-// I need to move this into a JS folder for the plugin
+/**
+ * Elgg thewire text counter
+ *
+ * @package ElggTheWire
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @question - do we want users to be able to edit thewire?
+ *
+ * @uses $vars['entity'] Optionally, the note to view
-/*
<!-- Dynamic Version by: Nannette Thacker -->
<!-- http://www.shiningstar.net -->
<!-- Original by : Ronnie T. Moore -->
@@ -16,4 +26,4 @@ function textCounter(field,cntfield,maxlimit) {
// otherwise, update 'characters left' counter
cntfield.value = maxlimit - field.value.length;
}
-}
+} \ No newline at end of file