Browse Source

share,retweet,relay,forward, whatever

pull/1/head
Friendika 11 years ago
parent
commit
3f432a7b82
  1. 2
      boot.php
  2. BIN
      images/remote-link.gif
  3. BIN
      images/share.gif
  4. 1
      mod/display.php
  5. 1
      mod/network.php
  6. 3
      mod/photos.php
  7. 1
      mod/profile.php
  8. 2
      mod/profile_photo.php
  9. 23
      mod/share.php
  10. 10
      view/de/jot-header.tpl
  11. 8
      view/en/jot-header.tpl
  12. 9
      view/fr/jot-header.tpl
  13. 9
      view/it/jot-header.tpl
  14. 1
      view/like.tpl
  15. 5
      view/like_noshare.tpl
  16. 4
      view/theme/duepuntozero/style.css
  17. 4
      view/theme/loozah/style.css

2
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 );

BIN
images/remote-link.gif

Before

Width: 16  |  Height: 16  |  Size: 357 B

After

Width: 16  |  Height: 16  |  Size: 365 B

BIN
images/share.gif

After

Width: 16  |  Height: 16  |  Size: 155 B

1
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')
));
}

1
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')
));
}

3
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')
));
}

1
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')
));
}

2
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");
}

23
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();
}

10
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");

8
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");

9
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");

9
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");

1
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>

5
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>

4
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;
}

4
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;
}

Loading…
Cancel
Save