Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Haakon Meland Eriksen 2016-01-21 17:30:04 +01:00
commit fb1e6ca6c1
12 changed files with 76 additions and 83 deletions

View file

@ -48,7 +48,7 @@ require_once('include/AccessList.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')));
define ( 'STD_VERSION', '1.1.2' );
define ( 'STD_VERSION', '1.1.3' );
define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1161 );

View file

@ -1,19 +1,23 @@
[h3]Plugins/Addons[/h3]
[list=1]
[*] abcjsplugin - Create musical scores in your posts
[*] adultphotoflag - prevents nsfw photos from being displayed in public albums
[*] bbmath - use complex math expressions in your posts
[*] bookmarker - replace #^ with bookmark link in posts
[*] buglink - provide a bug reporting icon in the lower-left corner of every page
[*] calc - a scientific calculator
[*] chess - cross domain identity aware interactive chess games
[*] chords - generate fingering charts and alternatives for every known guitar chord
[*] custom_home - set a custom page as the hub start page
[*] diaspora - crosspost to a Diaspora account (different from the built-in Diaspora emulator)
[*] dfedfix - fixes some federation issues with Diaspora releases around aug-sep 2015
[*] diaspora - Diaspora protocol emulator
[*] diaspost - crosspost to a Diaspora account (different from the Diaspora protocol emulator)
[*] dirstats - show some interesting statistics generated by the driectory server
[*] donate - provides a project donation page
[*] dwpost - crosspost to Dreamwidth
[*] embedly - use the embedly (formerly ooehmbed) service to embed media from many providers
[*] extcron - use an external cron service to run your hub's scheduled tasks
[*] flattr - provides a "Flattr Us" button
[*] flattrwidget - provides a "Flattr Us" button
[*] flip - create upside down text
[*] fortunate - displays random quote (fortune cookie). Requires setting up a fortune server.
[*] frphotos - import photo albums from Friendica
@ -26,12 +30,15 @@
[*] libertree - crosspost to Libertree
[*] likebanner - create a "like us on red#matrix" banner image
[*] ljpost - crosspost to LiveJournal
[*] logrot - logfile rotation utility
[*] mahjongg - Chinese puzzle game
[*] mailhost - when using multiple channel clones, select one to receive email notifications
[*] mayan_places - set location field to a random city in the Mayan world
[*] morechoice - additional gender/sexual-preference choices for profiles (not safe for work)
[*] moremoods - Additional mood options
[*] morepokes - additional poke options (not safe for work)
[*] msgfooter - provide legal or other text on each outgoing post
[*] nofed - prevent "federation" of channel posts, maintains all interaction on your site
[*] nsabait - add random terrorism related hashtags to your posts
[*] nsfw - Highly recommended plugin to collpase posts with inappropriate content
[*] openclipatar - choose a profile photo from hundreds of royalty free images
@ -42,21 +49,29 @@
[*] qrator - generate QR code images
[*] rainbowtag - display your tag and category clouds in colours
[*] randpost - post/reply bot based on and requires fortunate
[*] redfiles - import file storage from redmatrix
[*] redphotos - import photo albums from redmatrix
[*] redred - Crosspost to another Red Matrix or Hubzilla channel
[*] rtof - Crosspost to Friendica
[*] sendzid - add 'zid' auth parmaters to all outbound links, not just in-network links
[*] skeleton - sample addon/plugin to demonstrate plugin development
[*] smiley_pack - extend the built-in smilie (emoticon) support
[*] smileybutton - provides a smiley selector on the post window
[*] startpage - set a personal preferred page to redirect after logging in.
[*] statistics_json - Diaspora statistics generator
[*] statusnet - GNU-social and StatusNet crosspost [zrl=[baseurl]/help/addons_gnusocial]Posting To Gnu Social[/zrl]
[*] superblock - Highly recommended - completely block an offensive channel from your stream
[*] testdrive - Turns your hub into a test drive site with accounts that expire after a trail period.
[*] tictac - 3D tic-tac-toe
[*] torch - flashlight app
[*] tour - feature tour for new members
[*] twitter - crosspost to Twitter
[*] upload_limits - discover what server setting (there are a few) may be causing large photo uploads to fail
[*] visage - show visitors to your channel
[*] wholikesme - provides a page to display what connections have 'liked' your posts the most
[*] webRTC - use an external server (mayfirst.org) to negotiate webRTC hookups
[*] wppost - crosspost to WordPress (or other wordpress XMLRPC service)
[*] xmpp - XMPP chat based on converse.js
[/list]
[h3]Addon Repositories[/h3]

View file

@ -331,6 +331,7 @@ function channel_remove($channel_id, $local = true, $unset_session=true) {
dbesc(datetime_convert()),
intval($channel_id)
);
// if this was the default channel, set another one as default
if($a->account['account_default_channel'] == $channel_id) {
$r = q("select channel_id from channel where channel_account_id = %d and channel_removed = 0 limit 1",
@ -344,12 +345,11 @@ function channel_remove($channel_id, $local = true, $unset_session=true) {
}
else {
$rr = q("update account set account_default_channel = 0 where account_id = %d",
intval($r[0]['channel_id']),
intval($a->account['account_id']));
intval($a->account['account_id'])
);
}
}
logger('deleting hublocs',LOGGER_DEBUG);
$r = q("update hubloc set hubloc_deleted = 1 where hubloc_hash = '%s' and hubloc_url = '%s' ",

View file

@ -942,25 +942,35 @@ function item_photo_menu($item){
$clean_url = normalise_link($item['author-link']);
}
$menu = Array(
$poco_rating = get_config('system','poco_rating_enable');
// if unset default to enabled
if($poco_rating === false)
$poco_rating = true;
$ratings_url = (($poco_rating) ? z_root() . '/ratings/' . urlencode($item['author_xchan']) : '');
$post_menu = Array(
t("View Source") => $vsrc_link,
t("Follow Thread") => $sub_link,
t("Unfollow Thread") => $unsub_link,
t("View Status") => $status_link,
);
$author_menu = array(
t("View Profile") => $profile_link,
t("View Photos") => $photos_link,
t("Activity/Posts") => $posts_link,
t("Connect") => $follow_url,
t("Edit Connection") => $contact_url,
t("Send PM") => $pm_url,
t("Message") => $pm_url,
t('Ratings') => $ratings_url,
t("Poke") => $poke_link
);
$args = array('item' => $item, 'menu' => $menu);
$args = array('item' => $item, 'post_menu' => $post_menu, 'author_menu' => $author_menu);
call_hooks('item_photo_menu', $args);
$menu = $args['menu'];
$menu = array_merge($args['post_menu'],$args['author_menu']);
$o = "";
foreach($menu as $k=>$v){

View file

@ -812,7 +812,7 @@ function contact_block() {
);
if(count($r)) {
$contacts = sprintf( tt('%d Connection','%d Connections', $total),$total);
$contacts = t('Connections');
$micropro = Array();
foreach($r as $rr) {
$rr['archived'] = (intval($rr['abook_archived']) ? true : false);
@ -825,7 +825,7 @@ function contact_block() {
$o = replace_macros($tpl, array(
'$contacts' => $contacts,
'$nickname' => $a->profile['channel_address'],
'$viewconnections' => t('View Connections'),
'$viewconnections' => (($total > $shown) ? sprintf(t('View all %s connections'),$total) : ''),
'$micropro' => $micropro,
));

View file

@ -1110,16 +1110,18 @@ function widget_rating($arr) {
}
$o = '<div class="widget">';
$o .= '<h3>' . t('Rating Tools') . '</h3>';
if((($remote) || (local_channel())) && (! $self)) {
$o = '<div class="widget rateme">';
if($remote)
$o .= '<a class="rateme" href="' . $url . '"><i class="icon-pencil"></i> ' . t('Rate Me') . '</a>';
$o .= '<a class="btn btn-block btn-primary btn-sm" href="' . $url . '"><i class="icon-pencil"></i> ' . t('Rate Me') . '</a>';
else
$o .= '<div class="rateme fakelink" onclick="doRatings(\'' . $hash . '\'); return false;"><i class="icon-pencil"></i> ' . t('Rate Me') . '</div>';
$o .= '</div>';
$o .= '<div class="btn btn-block btn-primary btn-sm" onclick="doRatings(\'' . $hash . '\'); return false;"><i class="icon-pencil"></i> ' . t('Rate Me') . '</div>';
}
$o .= '<div class="widget rateme"><a class="rateme" href="ratings/' . $hash . '"><i class="icon-eye-open"></i> ' . t('View Ratings') . '</a>';
$o .= '<a class="btn btn-block btn-default btn-sm" href="ratings/' . $hash . '"><i class="icon-eye-open"></i> ' . t('View Ratings') . '</a>';
$o .= '</div>';
return $o;

View file

@ -817,25 +817,26 @@ function item_post(&$a) {
dbesc($body)
);
if($z && $z[0]['created'] > datetime_convert('UTC','UTC', 'now - 2 minutes')) {
$datarray['cancel'] = 1;
notice( t('Duplicate post suppressed.') . EOL);
logger('Duplicate post. Faking plugin cancel.');
if($z) {
foreach($z as $zz) {
if($zz['created'] > datetime_convert('UTC','UTC', 'now - 2 minutes')) {
$datarray['cancel'] = 1;
notice( t('Duplicate post suppressed.') . EOL);
logger('Duplicate post. Faking plugin cancel.');
}
}
}
}
call_hooks('post_local',$datarray);
if(x($datarray,'cancel')) {
logger('mod_item: post cancelled by plugin.');
if($return_path) {
logger('mod_item: post cancelled by plugin or duplicate suppressed.');
if($return_path)
goaway($a->get_baseurl() . "/" . $return_path);
}
$json = array('cancel' => 1);
if(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload']))
$json['reload'] = $a->get_baseurl() . '/' . $_REQUEST['jsreload'];
$json['reload'] = $a->get_baseurl() . '/' . $_REQUEST['jsreload'];
echo json_encode($json);
killme();
}

View file

@ -1 +1 @@
2016-01-18.1282H
2016-01-20.1284H

View file

@ -310,6 +310,11 @@ footer {
margin-bottom: 0px;
}
.connect-btn-wrapper {
margin-bottom: 10px;
}
.profile-edit-side-link {
padding: 3px 0px;
opacity: 0;
@ -475,53 +480,15 @@ footer {
float: right;
}
.rconnect {
display: block;
color: $nav_active_icon_colour;
margin-top: 15px;
background-color: $nav_bg;
-webkit-border-radius: $radiuspx ;
-moz-border-radius: $radiuspx;
border-radius: $radiuspx;
border: 1px solid $nav_bd;
padding: 5px;
font-weight: bold;
clear: both;
}
a.rateme, div.rateme {
display: block;
color: $nav_active_icon_colour;
background-color: $nav_bg;
-webkit-border-radius: $radiuspx ;
-moz-border-radius: $radiuspx;
border-radius: $radiuspx;
border: 1px solid $nav_bd;
padding: 5px;
font-weight: bold;
clear: both;
}
#pause {
position: fixed;
bottom: 5px;
right: 5px;
}
#vcard-end {
clear: both;
}
#contact-block {
width: 100%;
float: left;
background-color: rgba(254,254,254,0.5);
border-bottom: 1px solid rgba(238,238,238,0.8);
-moz-border-radius: $radiuspx;
-webkit-border-radius: $radiuspx;
border-radius: $radiuspx;
padding: 10px;
margin-bottom:10px;
}
#contact-block-numcontacts {

View file

@ -1,7 +1,9 @@
<div id="contact-block">
<div id="contact-block-numcontacts">{{$contacts}}</div>
<div id="contact-block" class="widget">
<h3>{{$contacts}}</h3>
{{if $micropro}}
{{if $viewconnections}}
<a class="allcontact-link" href="viewconnections/{{$nickname}}">{{$viewconnections}}</a>
{{/if}}
<div class='contact-block-content'>
{{foreach $micropro as $m}}
{{$m}}

View file

@ -1,5 +1,8 @@
<div class="vcard">
<div id="profile-photo-wrapper"><img class="photo" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></div>
{{if $connect}}
<div class="connect-btn-wrapper"><a href="{{$connect_url}}" class="btn btn-block btn-success btn-sm"><i class="icon-plus"></i> {{$connect}}</a></div>
{{/if}}
{{if $profile.edit}}
<div class="dropdown">
<a class="profile-edit-side-link dropdown-toggle" data-toggle="dropdown" title="{{$profile.edit.3}}" href="#" ><i class="icon-pencil" title="{{$profile.edit.1}}" ></i></a>
@ -45,17 +48,11 @@
{{if $diaspora}}
{{include file="diaspora_vcard.tpl"}}
{{/if}}
{{if $connect}}
<a href="{{$connect_url}}" class="rconnect"><i class="icon-plus connect-icon"></i> {{$connect}}</a>
{{/if}}
</div>
<div id="clear"></div>
{{$rating}}
</div>
<div id="vcard-end"></div>
{{$chanmenu}}
{{$contact_block}}

View file

@ -1,11 +1,10 @@
<div class="vcard">
<div id="profile-photo-wrapper"><a href="{{$link}}"><img class="vcard-photo photo" src="{{$photo}}" alt="{{$name}}" /></a></div>
{{if $connect}}
<div class="connect-btn-wrapper"><a href="follow?f=&url={{$follow}}" class="btn btn-block btn-success btn-sm"><i class="icon-plus"></i> {{$connect}}</a></div>
{{/if}}
<div class="fn">{{$name}}</div>
</div>
{{if $mode != 'mail'}}
{{if $connect}}
<a href="follow?f=&url={{$follow}}" class="rconnect"><i class="icon-plus connect-icon"></i> {{$connect}}</a>
{{/if}}
{{/if}}