aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot.php3
-rw-r--r--images/smiley-heart.gifbin0 -> 592 bytes
-rw-r--r--include/acl_selectors.php2
-rw-r--r--include/main.js21
-rw-r--r--mod/item.php7
-rw-r--r--mod/network.php2
-rw-r--r--mod/profile.php2
-rw-r--r--view/comment_item.tpl13
8 files changed, 40 insertions, 10 deletions
diff --git a/boot.php b/boot.php
index 2cbc48cde..6a1d3a04b 100644
--- a/boot.php
+++ b/boot.php
@@ -1978,8 +1978,9 @@ function smilies($s) {
$a = get_app();
return str_replace(
- array( ':-)', ';-)', ':-(', ':(', ':-P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O'),
+ array( '<3', ':-)', ';-)', ':-(', ':(', ':-P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O'),
array(
+ '<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',
diff --git a/images/smiley-heart.gif b/images/smiley-heart.gif
new file mode 100644
index 000000000..21c0c6530
--- /dev/null
+++ b/images/smiley-heart.gif
Binary files differ
diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index 953243a43..94f51a9ff 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -44,6 +44,8 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false) {
+ $a = get_app();
+
$o = '';
// When used for private messages, we limit correspondence to mutual friends and the selector
diff --git a/include/main.js b/include/main.js
index 63b34bd21..abd097e54 100644
--- a/include/main.js
+++ b/include/main.js
@@ -29,6 +29,7 @@
$(document).ready(function() {
$.ajaxSetup({cache: false});
+
msie = $.browser.msie ;
NavUpdate();
// Allow folks to stop the ajax page updates with the pause/break key
@@ -210,3 +211,23 @@
$('#panel').hide();
}
+ function post_comment(id) {
+ $.post(
+ "item",
+ $("#comment-edit-form-" + id).serialize(),
+ function(data) {
+ if(data.success) {
+ $("#comment-edit-wrapper-" + id).hide();
+ $("#comment-edit-text-" + id).val('');
+ var tarea = document.getElementById("comment-edit-text-" + id);
+ if(tarea)
+ commentClose(tarea,id);
+ if(timer) clearTimeout(timer);
+ timer = setTimeout(NavUpdate,10);
+ }
+ },
+ "json"
+ );
+ return false;
+ }
+
diff --git a/mod/item.php b/mod/item.php
index a83373f59..2cc2b9eb2 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -490,7 +490,12 @@ function item_post(&$a) {
}
}
- goaway($a->get_baseurl() . "/" . $_POST['return'] );
+ if((x($_POST,'return')) && strlen($_POST['return']))
+ goaway($a->get_baseurl() . "/" . $_POST['return'] );
+
+ $json = array('success' => 1);
+ echo json_encode($json);
+ killme();
// NOTREACHED
}
diff --git a/mod/network.php b/mod/network.php
index f11db45a8..f09b302e9 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -340,7 +340,7 @@ function network_content(&$a, $update = 0) {
if($item['last-child']) {
$comment = replace_macros($cmnt_tpl,array(
- '$return_path' => $_SESSION['return_url'],
+ '$return_path' => '', // $_SESSION['return_url'],
'$type' => 'net-comment',
'$id' => $item['item_id'],
'$parent' => $item['parent'],
diff --git a/mod/profile.php b/mod/profile.php
index 8ec29d382..57abc479d 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -293,7 +293,7 @@ function profile_content(&$a, $update = 0) {
}
if($item['last-child']) {
$comment = replace_macros($cmnt_tpl,array(
- '$return_path' => $_SESSION['return_url'],
+ '$return_path' => '', // $_SESSION['return_url'],
'$type' => 'wall-comment',
'$id' => $item['item_id'],
'$parent' => $item['parent'],
diff --git a/view/comment_item.tpl b/view/comment_item.tpl
index 6f63e39b7..885d735ed 100644
--- a/view/comment_item.tpl
+++ b/view/comment_item.tpl
@@ -1,9 +1,9 @@
<div class="comment-$wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
- <form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" >
- <input id="f-type-$id" type="hidden" name="type" value="$type" />
- <input id="f-profile-uid-$id" type="hidden" name="profile_uid" value="$profile_uid" />
- <input id="f-parent-$id" type="hidden" name="parent" value="$parent" />
- <input id="f-return-path-$id" type="hidden" name="return" value="$return_path" />
+ <form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
+ <input type="hidden" name="type" value="$type" />
+ <input type="hidden" name="profile_uid" value="$profile_uid" />
+ <input type="hidden" name="parent" value="$parent" />
+ <input type="hidden" name="return" value="$return_path" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
@@ -13,9 +13,10 @@
<div class="comment-edit-text-end"></div>
<div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >
- <input type="submit" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="Submit" />
+ <input type="submit" onclick="post_comment($id); return false;" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="Submit" />
</div>
<div class="comment-edit-end"></div>
</form>
+
</div>