mirror of
https://github.com/friendica/friendica
synced 2024-12-23 05:20:15 +00:00
share,retweet,relay,forward, whatever
This commit is contained in:
parent
e2ea341094
commit
3f432a7b82
17 changed files with 80 additions and 3 deletions
2
boot.php
2
boot.php
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
define ( 'FRIENDIKA_VERSION', '2.1.919' );
|
define ( 'FRIENDIKA_VERSION', '2.1.920' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.1' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.1' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1043 );
|
define ( 'DB_UPDATE_VERSION', 1043 );
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 365 B |
BIN
images/share.gif
Normal file
BIN
images/share.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 155 B |
|
@ -155,6 +155,7 @@ function display_content(&$a) {
|
||||||
'$id' => $item['id'],
|
'$id' => $item['id'],
|
||||||
'$likethis' => t("I like this \x28toggle\x29"),
|
'$likethis' => t("I like this \x28toggle\x29"),
|
||||||
'$nolike' => t("I don't like this \x28toggle\x29"),
|
'$nolike' => t("I don't like this \x28toggle\x29"),
|
||||||
|
'$share' => t('Share'),
|
||||||
'$wait' => t('Please wait')
|
'$wait' => t('Please wait')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -364,6 +364,7 @@ function network_content(&$a, $update = 0) {
|
||||||
'$id' => $item['id'],
|
'$id' => $item['id'],
|
||||||
'$likethis' => t("I like this \x28toggle\x29"),
|
'$likethis' => t("I like this \x28toggle\x29"),
|
||||||
'$nolike' => t("I don't like this \x28toggle\x29"),
|
'$nolike' => t("I don't like this \x28toggle\x29"),
|
||||||
|
'$share' => t('Share'),
|
||||||
'$wait' => t('Please wait')
|
'$wait' => t('Please wait')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1073,7 +1073,7 @@ function photos_content(&$a) {
|
||||||
$tpl = load_view_file('view/photo_item.tpl');
|
$tpl = load_view_file('view/photo_item.tpl');
|
||||||
$return_url = $a->cmd;
|
$return_url = $a->cmd;
|
||||||
|
|
||||||
$like_tpl = load_view_file('view/like.tpl');
|
$like_tpl = load_view_file('view/lik_noshare.tpl');
|
||||||
|
|
||||||
$likebuttons = '';
|
$likebuttons = '';
|
||||||
|
|
||||||
|
@ -1082,6 +1082,7 @@ function photos_content(&$a) {
|
||||||
'$id' => $item['id'],
|
'$id' => $item['id'],
|
||||||
'$likethis' => t("I like this \x28toggle\x29"),
|
'$likethis' => t("I like this \x28toggle\x29"),
|
||||||
'$nolike' => t("I don't like this \x28toggle\x29"),
|
'$nolike' => t("I don't like this \x28toggle\x29"),
|
||||||
|
'$share' => t('Share'),
|
||||||
'$wait' => t('Please wait')
|
'$wait' => t('Please wait')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -311,6 +311,7 @@ function profile_content(&$a, $update = 0) {
|
||||||
'$id' => $item['id'],
|
'$id' => $item['id'],
|
||||||
'$likethis' => t("I like this \x28toggle\x29"),
|
'$likethis' => t("I like this \x28toggle\x29"),
|
||||||
'$nolike' => t("I don't like this \x28toggle\x29"),
|
'$nolike' => t("I don't like this \x28toggle\x29"),
|
||||||
|
'$share' => t('Share'),
|
||||||
'$wait' => t('Please wait')
|
'$wait' => t('Please wait')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ function profile_photo_post(&$a) {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Update global directory in background
|
// 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')))
|
if($url && strlen(get_config('system','directory_submit_url')))
|
||||||
proc_run('php',"include/directory.php","$url");
|
proc_run('php',"include/directory.php","$url");
|
||||||
}
|
}
|
||||||
|
|
23
mod/share.php
Normal file
23
mod/share.php
Normal 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 .= '♲ <a href="' . $r[0]['author-link'] . '">' . $r[0]['author-name'] . '</a><br />';
|
||||||
|
$o .= prepare_body($r[0]);
|
||||||
|
echo $o . '<br />';
|
||||||
|
killme();
|
||||||
|
}
|
|
@ -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) {
|
function linkdropper(event) {
|
||||||
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
||||||
|
|
|
@ -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) {
|
function linkdropper(event) {
|
||||||
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
||||||
|
|
|
@ -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) {
|
function linkdropper(event) {
|
||||||
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
||||||
|
|
|
@ -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) {
|
function linkdropper(event) {
|
||||||
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<div class="wall-item-like-buttons" id="wall-item-like-buttons-$id">
|
<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/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/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;" />
|
<img id="like-rotator-$id" class="like-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
|
||||||
</div>
|
</div>
|
||||||
|
|
5
view/like_noshare.tpl
Normal file
5
view/like_noshare.tpl
Normal 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>
|
|
@ -921,6 +921,10 @@ input#dfrn-url {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wall-item-share-buttons {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.wall-item-links-wrapper {
|
.wall-item-links-wrapper {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
|
@ -993,6 +993,10 @@ input#dfrn-url {
|
||||||
border-right: 2px solid #fff;
|
border-right: 2px solid #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wall-item-share-buttons {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.wall-item-links-wrapper {
|
.wall-item-links-wrapper {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue