aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2012-02-10 17:30:22 +0100
committerFabio Comuni <fabrix.xm@gmail.com>2012-02-10 17:30:22 +0100
commited38808aae6585bb6c31a18788f0290812bae2f8 (patch)
treebf192070db0b2f751c0480d864e15084310fbcdd
parent84805501449aa03e86d985f3e2d9734184cea0db (diff)
downloadvolse-hubzilla-ed38808aae6585bb6c31a18788f0290812bae2f8.tar.gz
volse-hubzilla-ed38808aae6585bb6c31a18788f0290812bae2f8.tar.bz2
volse-hubzilla-ed38808aae6585bb6c31a18788f0290812bae2f8.zip
hidden jot in "display" to allow reshare
-rwxr-xr-xinclude/conversation.php12
-rwxr-xr-xmod/display.php4
-rwxr-xr-xview/jot-header.tpl3
3 files changed, 16 insertions, 3 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 6defefc73..947a9b040 100755
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -494,7 +494,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
}
$likebuttons = '';
- $shareable = ((($profile_owner == local_user()) && ($mode != 'display') && (! $item['private'])) ? true : false);
+ $shareable = ((($profile_owner == local_user()) && (! $item['private'])) ? true : false); //($mode != 'display') &&
if($page_writeable) {
if($toplevelpost) {
@@ -832,7 +832,7 @@ function format_like($cnt,$arr,$type,$id) {
}}
-function status_editor($a,$x, $notes_cid = 0) {
+function status_editor($a,$x, $notes_cid = 0, $popup=false) {
$o = '';
@@ -896,7 +896,7 @@ function status_editor($a,$x, $notes_cid = 0) {
$o .= replace_macros($tpl,array(
'$return_path' => $a->cmd,
- '$action' => 'item',
+ '$action' => $a->get_baseurl().'/item',
'$share' => (($x['button']) ? $x['button'] : t('Share')),
'$upload' => t('Upload photo'),
'$shortupload' => t('upload photo'),
@@ -935,6 +935,12 @@ function status_editor($a,$x, $notes_cid = 0) {
'$preview' => t('Preview'),
));
+
+ if ($popup==true){
+ $o = '<div id="jot-popup" style="display: none;">'.$o.'</div>';
+
+ }
+
return $o;
}
diff --git a/mod/display.php b/mod/display.php
index 02f080a79..79eaf3717 100755
--- a/mod/display.php
+++ b/mod/display.php
@@ -66,6 +66,10 @@ function display_content(&$a) {
notice( t('Access to this profile has been restricted.') . EOL);
return;
}
+
+ if ($is_owner)
+ $o .= status_editor($a,$x,0,true);
+
$sql_extra = permissions_sql($a->profile['uid'],$remote_contact,$groups);
diff --git a/view/jot-header.tpl b/view/jot-header.tpl
index 22b434916..482fb0e0d 100755
--- a/view/jot-header.tpl
+++ b/view/jot-header.tpl
@@ -215,6 +215,9 @@ function enableOnUser(){
initEditor(function(){
addeditortext(data);
$('#like-rotator-' + id).hide();
+ if ($('#jot-popup').length != 0){
+ $('#jot-popup').show();
+ }
$(window).scrollTop(0);
});