]> git.mxchange.org Git - friendica.git/commitdiff
share,retweet,relay,forward, whatever
authorFriendika <info@friendika.com>
Thu, 17 Mar 2011 02:36:59 +0000 (19:36 -0700)
committerFriendika <info@friendika.com>
Thu, 17 Mar 2011 02:36:59 +0000 (19:36 -0700)
17 files changed:
boot.php
images/remote-link.gif
images/share.gif [new file with mode: 0644]
mod/display.php
mod/network.php
mod/photos.php
mod/profile.php
mod/profile_photo.php
mod/share.php [new file with mode: 0644]
view/de/jot-header.tpl
view/en/jot-header.tpl
view/fr/jot-header.tpl
view/it/jot-header.tpl
view/like.tpl
view/like_noshare.tpl [new file with mode: 0644]
view/theme/duepuntozero/style.css
view/theme/loozah/style.css

index b03221bf80dfd8ba4921523aa94de1eb3bafa9d2..08caa72ab9ddb703da83d4d8d08eab5ac26d082e 100644 (file)
--- 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   );
 
index 008397fe8d957604ef4be8ec2ab96f4f1b6805b0..1224e3db5fb7f8c72353b5291029ef1ef965dbd3 100644 (file)
Binary files a/images/remote-link.gif and b/images/remote-link.gif differ
diff --git a/images/share.gif b/images/share.gif
new file mode 100644 (file)
index 0000000..035fa2e
Binary files /dev/null and b/images/share.gif differ
index 096ea16c9b7d432b3de449008866e7c8ddd0d482..f919cba64647373b804480db22fdb96b0ec735c1 100644 (file)
@@ -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') 
                                        ));
                                }
index 32c7216d44e62638a2bda53f6916e22a17cb65a7..1f92145d102dd0dbe52ce86005c3fc578a65965a 100644 (file)
@@ -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') 
                                ));
                        }
index 929d1c971ce72206b1075d8b12f2e8e76f7b4090..4bb6e3eab47b6a96e2759d886f831aafec9bd6bb 100644 (file)
@@ -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') 
                                ));
                        }
index 88fc16ebb1f8707ba4e3b01217e600a317729fc1..3354bc9a33cb2a3bff83ab25a908b3cb7f80e846 100644 (file)
@@ -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') 
                                        ));
                                }
index 0f84a85c9235b529214c2f2d87fe933d9bb6ea15..5365aa3b878b4b79209a8f8cfe0159a1d739efcd 100644 (file)
@@ -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 (file)
index 0000000..8a8229e
--- /dev/null
@@ -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
index 58403f1ba65739d9268eb5349adf3cd9a25f9e53..25d28c3a7be2d223ce61312ed65eb5afe3795ca5 100644 (file)
@@ -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");
index fe818410e5e3319e6c03af968f2dcd318ecd09b1..20f84b851e81cf59ae673179a0e69f7725d859fe 100644 (file)
@@ -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");
index ff7e543a5ed9928d38bfb45f931e92085aeac3ad..a4c5f42a43731a8d4bd1b04b538ce14fb8eda327 100644 (file)
@@ -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");
index 117cd1651195a4ce140bb82ce0aa6fd41bf6d46b..ff28def6191213a49c71a278a1ab72b001f2a55e 100644 (file)
@@ -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");
index e36a624a4196b072f923c0627a663ff041650896..4f530407e1d6420bc6e57f0a165c80e07d4ef7ca 100644 (file)
@@ -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 (file)
index 0000000..e36a624
--- /dev/null
@@ -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>
index 54a522881ff84955ab84e5c3d9c8df9e1d5e495b..e44ab80c28fdb273e2d23815c7c7ac4f3245fb7f 100644 (file)
@@ -921,6 +921,10 @@ input#dfrn-url {
        cursor: pointer;
 }
 
+.wall-item-share-buttons {
+       margin-left: 5px;
+}
+
 .wall-item-links-wrapper {
        float: left;
 }
index f1de801cb01e8649a3694ba0da9826686f4f0e15..13c2dda272c202a493de246a12911679fb76658b 100644 (file)
@@ -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;
 }