Browse Source

share,retweet,relay,forward, whatever

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

+ 1
- 1
boot.php View File

@@ -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 View File

Before After
Width: 16  |  Height: 16  |  Size: 357 B Width: 16  |  Height: 16  |  Size: 365 B

BIN
images/share.gif View File

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

+ 1
- 0
mod/display.php View 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')
));
}


+ 1
- 0
mod/network.php View 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')
));
}


+ 2
- 1
mod/photos.php View 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')
));
}


+ 1
- 0
mod/profile.php View 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')
));
}


+ 1
- 1
mod/profile_photo.php View 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");
}


+ 23
- 0
mod/share.php View File

@@ -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
- 0
view/de/jot-header.tpl View 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");


+ 8
- 0
view/en/jot-header.tpl View 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");


+ 9
- 0
view/fr/jot-header.tpl View 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");


+ 9
- 0
view/it/jot-header.tpl View 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");


+ 1
- 0
view/like.tpl View 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>

+ 5
- 0
view/like_noshare.tpl View File

@@ -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
- 0
view/theme/duepuntozero/style.css View File

@@ -921,6 +921,10 @@ input#dfrn-url {
cursor: pointer;
}

.wall-item-share-buttons {
margin-left: 5px;
}

.wall-item-links-wrapper {
float: left;
}


+ 4
- 0
view/theme/loozah/style.css View 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;
}


Loading…
Cancel
Save