share,retweet,relay,forward, whatever

2022.09-rc
Friendika 2011-03-16 19:36:59 -07:00
rodzic e2ea341094
commit 3f432a7b82
17 zmienionych plików z 80 dodań i 3 usunięć

Wyświetl plik

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

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 357 B

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 365 B

BIN
images/share.gif 100644

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 155 B

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

@ -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 100644
Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

@ -921,6 +921,10 @@ input#dfrn-url {
cursor: pointer;
}
.wall-item-share-buttons {
margin-left: 5px;
}
.wall-item-links-wrapper {
float: left;
}

Wyświetl plik

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