aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-03-16 19:36:59 -0700
committerFriendika <info@friendika.com>2011-03-16 19:36:59 -0700
commit3f432a7b82480dd985dbc2a67ae23cfc1ed258c6 (patch)
tree1fc92a535b189b0283273ff97517c74e4d79b20d
parente2ea341094c53e78ae7473a83d2b6c85b1cde4eb (diff)
downloadvolse-hubzilla-3f432a7b82480dd985dbc2a67ae23cfc1ed258c6.tar.gz
volse-hubzilla-3f432a7b82480dd985dbc2a67ae23cfc1ed258c6.tar.bz2
volse-hubzilla-3f432a7b82480dd985dbc2a67ae23cfc1ed258c6.zip
share,retweet,relay,forward, whatever
-rw-r--r--boot.php2
-rw-r--r--images/remote-link.gifbin357 -> 365 bytes
-rw-r--r--images/share.gifbin0 -> 155 bytes
-rw-r--r--mod/display.php1
-rw-r--r--mod/network.php1
-rw-r--r--mod/photos.php3
-rw-r--r--mod/profile.php1
-rw-r--r--mod/profile_photo.php2
-rw-r--r--mod/share.php23
-rw-r--r--view/de/jot-header.tpl10
-rw-r--r--view/en/jot-header.tpl8
-rw-r--r--view/fr/jot-header.tpl9
-rw-r--r--view/it/jot-header.tpl9
-rw-r--r--view/like.tpl1
-rw-r--r--view/like_noshare.tpl5
-rw-r--r--view/theme/duepuntozero/style.css4
-rw-r--r--view/theme/loozah/style.css4
17 files changed, 80 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index b03221bf8..08caa72ab 100644
--- a/boot.php
+++ b/boot.php
@@ -2,7 +2,7 @@
set_time_limit(0);
-define ( 'FRIENDIKA_VERSION', '2.1.919' );
+define ( 'FRIENDIKA_VERSION', '2.1.920' );
define ( 'DFRN_PROTOCOL_VERSION', '2.1' );
define ( 'DB_UPDATE_VERSION', 1043 );
diff --git a/images/remote-link.gif b/images/remote-link.gif
index 008397fe8..1224e3db5 100644
--- a/images/remote-link.gif
+++ b/images/remote-link.gif
Binary files differ
diff --git a/images/share.gif b/images/share.gif
new file mode 100644
index 000000000..035fa2e38
--- /dev/null
+++ b/images/share.gif
Binary files differ
diff --git a/mod/display.php b/mod/display.php
index 096ea16c9..f919cba64 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -155,6 +155,7 @@ function display_content(&$a) {
'$id' => $item['id'],
'$likethis' => t("I like this \x28toggle\x29"),
'$nolike' => t("I don't like this \x28toggle\x29"),
+ '$share' => t('Share'),
'$wait' => t('Please wait')
));
}
diff --git a/mod/network.php b/mod/network.php
index 32c7216d4..1f92145d1 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -364,6 +364,7 @@ function network_content(&$a, $update = 0) {
'$id' => $item['id'],
'$likethis' => t("I like this \x28toggle\x29"),
'$nolike' => t("I don't like this \x28toggle\x29"),
+ '$share' => t('Share'),
'$wait' => t('Please wait')
));
}
diff --git a/mod/photos.php b/mod/photos.php
index 929d1c971..4bb6e3eab 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -1073,7 +1073,7 @@ function photos_content(&$a) {
$tpl = load_view_file('view/photo_item.tpl');
$return_url = $a->cmd;
- $like_tpl = load_view_file('view/like.tpl');
+ $like_tpl = load_view_file('view/lik_noshare.tpl');
$likebuttons = '';
@@ -1082,6 +1082,7 @@ function photos_content(&$a) {
'$id' => $item['id'],
'$likethis' => t("I like this \x28toggle\x29"),
'$nolike' => t("I don't like this \x28toggle\x29"),
+ '$share' => t('Share'),
'$wait' => t('Please wait')
));
}
diff --git a/mod/profile.php b/mod/profile.php
index 88fc16ebb..3354bc9a3 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -311,6 +311,7 @@ function profile_content(&$a, $update = 0) {
'$id' => $item['id'],
'$likethis' => t("I like this \x28toggle\x29"),
'$nolike' => t("I don't like this \x28toggle\x29"),
+ '$share' => t('Share'),
'$wait' => t('Please wait')
));
}
diff --git a/mod/profile_photo.php b/mod/profile_photo.php
index 0f84a85c9..5365aa3b8 100644
--- a/mod/profile_photo.php
+++ b/mod/profile_photo.php
@@ -87,7 +87,7 @@ function profile_photo_post(&$a) {
);
// Update global directory in background
- $url = $_SESSION['my_url'];
+ $url = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
if($url && strlen(get_config('system','directory_submit_url')))
proc_run('php',"include/directory.php","$url");
}
diff --git a/mod/share.php b/mod/share.php
new file mode 100644
index 000000000..8a8229e8a
--- /dev/null
+++ b/mod/share.php
@@ -0,0 +1,23 @@
+<?php
+
+require_once('bbcode.php');
+
+function share_init(&$a) {
+
+ $post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
+ if((! $post_id) || (! local_user()))
+ killme();
+
+ $r = q("SELECT * FROM `item` WHERE `id` = %d LIMIT 1",
+ intval($post_id)
+ );
+ if(! count($r) || $r[0]['private'])
+ killme();
+
+ $o = '';
+
+ $o .= '&#x2672; <a href="' . $r[0]['author-link'] . '">' . $r[0]['author-name'] . '</a><br />';
+ $o .= prepare_body($r[0]);
+ echo $o . '<br />';
+ killme();
+} \ No newline at end of file
diff --git a/view/de/jot-header.tpl b/view/de/jot-header.tpl
index 58403f1ba..25d28c3a7 100644
--- a/view/de/jot-header.tpl
+++ b/view/de/jot-header.tpl
@@ -111,6 +111,16 @@ tinyMCE.init({
}
}
+ function jotShare(id) {
+ $('#like-rotator-' + id).show();
+ $.get('share/' + id, function(data) {
+ tinyMCE.execCommand('mceInsertRawHTML',false,data);
+ $('#like-rotator-' + id).hide();
+ $(window).scrollTop(0);
+ });
+ }
+
+
function linkdropper(event) {
var linkFound = event.dataTransfer.types.contains("text/uri-list");
diff --git a/view/en/jot-header.tpl b/view/en/jot-header.tpl
index fe818410e..20f84b851 100644
--- a/view/en/jot-header.tpl
+++ b/view/en/jot-header.tpl
@@ -111,6 +111,14 @@ tinyMCE.init({
}
}
+ function jotShare(id) {
+ $('#like-rotator-' + id).show();
+ $.get('share/' + id, function(data) {
+ tinyMCE.execCommand('mceInsertRawHTML',false,data);
+ $('#like-rotator-' + id).hide();
+ $(window).scrollTop(0);
+ });
+ }
function linkdropper(event) {
var linkFound = event.dataTransfer.types.contains("text/uri-list");
diff --git a/view/fr/jot-header.tpl b/view/fr/jot-header.tpl
index ff7e543a5..a4c5f42a4 100644
--- a/view/fr/jot-header.tpl
+++ b/view/fr/jot-header.tpl
@@ -110,6 +110,15 @@ tinyMCE.init({
}
}
+ function jotShare(id) {
+ $('#like-rotator-' + id).show();
+ $.get('share/' + id, function(data) {
+ tinyMCE.execCommand('mceInsertRawHTML',false,data);
+ $('#like-rotator-' + id).hide();
+ $(window).scrollTop(0);
+ });
+ }
+
function linkdropper(event) {
var linkFound = event.dataTransfer.types.contains("text/uri-list");
diff --git a/view/it/jot-header.tpl b/view/it/jot-header.tpl
index 117cd1651..ff28def61 100644
--- a/view/it/jot-header.tpl
+++ b/view/it/jot-header.tpl
@@ -111,6 +111,15 @@ tinyMCE.init({
}
}
+ function jotShare(id) {
+ $('#like-rotator-' + id).show();
+ $.get('share/' + id, function(data) {
+ tinyMCE.execCommand('mceInsertRawHTML',false,data);
+ $('#like-rotator-' + id).hide();
+ $(window).scrollTop(0);
+ });
+ }
+
function linkdropper(event) {
var linkFound = event.dataTransfer.types.contains("text/uri-list");
diff --git a/view/like.tpl b/view/like.tpl
index e36a624a4..4f530407e 100644
--- a/view/like.tpl
+++ b/view/like.tpl
@@ -1,5 +1,6 @@
<div class="wall-item-like-buttons" id="wall-item-like-buttons-$id">
<img src="images/like.gif" alt="$likethis" title="$likethis" onclick="dolike($id,'like');" />
<img src="images/dislike.gif" alt="$nolike" title="$nolike" onclick="dolike($id,'dislike');" />
+ <img src="images/share.gif" alt="$share" title="$share" class="wall-item-share-buttons" onclick="jotShare($id);" />
<img id="like-rotator-$id" class="like-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
</div>
diff --git a/view/like_noshare.tpl b/view/like_noshare.tpl
new file mode 100644
index 000000000..e36a624a4
--- /dev/null
+++ b/view/like_noshare.tpl
@@ -0,0 +1,5 @@
+<div class="wall-item-like-buttons" id="wall-item-like-buttons-$id">
+ <img src="images/like.gif" alt="$likethis" title="$likethis" onclick="dolike($id,'like');" />
+ <img src="images/dislike.gif" alt="$nolike" title="$nolike" onclick="dolike($id,'dislike');" />
+ <img id="like-rotator-$id" class="like-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
+ </div>
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css
index 54a522881..e44ab80c2 100644
--- a/view/theme/duepuntozero/style.css
+++ b/view/theme/duepuntozero/style.css
@@ -921,6 +921,10 @@ input#dfrn-url {
cursor: pointer;
}
+.wall-item-share-buttons {
+ margin-left: 5px;
+}
+
.wall-item-links-wrapper {
float: left;
}
diff --git a/view/theme/loozah/style.css b/view/theme/loozah/style.css
index f1de801cb..13c2dda27 100644
--- a/view/theme/loozah/style.css
+++ b/view/theme/loozah/style.css
@@ -993,6 +993,10 @@ input#dfrn-url {
border-right: 2px solid #fff;
}
+.wall-item-share-buttons {
+ margin-left: 5px;
+}
+
.wall-item-links-wrapper {
float: left;
}