Merge pull request #7 from redmatrix/dev

Dev
This commit is contained in:
mrjive 2018-04-14 15:59:30 +02:00 committed by GitHub
commit 99dc161483
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 6181 additions and 5079 deletions

View File

@ -117,6 +117,8 @@ class Enotify {
$always_show_in_notices = get_pconfig($recip['channel_id'],'system','always_show_in_notices');
$vnotify = get_pconfig($recip['channel_id'],'system','vnotify');
$salutation = $recip['channel_name'];
// e.g. "your post", "David's photo", etc.
$possess_desc = t('%s <!item_type!>');
@ -124,7 +126,7 @@ class Enotify {
logger('notification: mail');
$subject = sprintf( t('[$Projectname:Notify] New mail received at %s'),$sitename);
$preamble = sprintf( t('%1$s, %2$s sent you a new private message at %3$s.'),$recip['channel_name'], $sender['xchan_name'],$sitename);
$preamble = sprintf( t('%1$s sent you a new private message at %2$s.'), $sender['xchan_name'],$sitename);
$epreamble = sprintf( t('%1$s sent you %2$s.'),'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]', '[zrl=$itemlink]' . t('a private message') . '[/zrl]');
$sitelink = t('Please visit %s to view and/or reply to your private messages.');
$tsitelink = sprintf( $sitelink, $siteurl . '/mail/' . $params['item']['id'] );
@ -196,8 +198,7 @@ class Enotify {
//$possess_desc = str_replace('<!item_type!>',$possess_desc);
// "a post"
$dest_str = sprintf(t('%1$s, %2$s %3$s [zrl=%4$s]a %5$s[/zrl]'),
$recip['channel_name'],
$dest_str = sprintf(t('%1$s %2$s [zrl=%3$s]a %4$s[/zrl]'),
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$action,
$itemlink,
@ -205,8 +206,7 @@ class Enotify {
// "George Bull's post"
if($p)
$dest_str = sprintf(t('%1$s, %2$s %3$s [zrl=%4$s]%5$s\'s %6$s[/zrl]'),
$recip['channel_name'],
$dest_str = sprintf(t('%1$s %2$s [zrl=%3$s]%4$s\'s %5$s[/zrl]'),
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$action,
$itemlink,
@ -215,8 +215,7 @@ class Enotify {
// "your post"
if($p[0]['owner']['xchan_name'] == $p[0]['author']['xchan_name'] && intval($p[0]['item_wall']))
$dest_str = sprintf(t('%1$s, %2$s %3$s [zrl=%4$s]your %5$s[/zrl]'),
$recip['channel_name'],
$dest_str = sprintf(t('%1$s %2$s [zrl=%3$s]your %4$s[/zrl]'),
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$action,
$itemlink,
@ -231,7 +230,7 @@ class Enotify {
$subject = sprintf( t('[$Projectname:Notify] Moderated Comment to conversation #%1$d by %2$s'), $parent_id, $sender['xchan_name']);
else
$subject = sprintf( t('[$Projectname:Notify] Comment to conversation #%1$d by %2$s'), $parent_id, $sender['xchan_name']);
$preamble = sprintf( t('%1$s, %2$s commented on an item/conversation you have been following.'), $recip['channel_name'], $sender['xchan_name']);
$preamble = sprintf( t('%1$s commented on an item/conversation you have been following.'), $sender['xchan_name']);
$epreamble = $dest_str;
$sitelink = t('Please visit %s to view and/or reply to the conversation.');
@ -297,8 +296,7 @@ class Enotify {
// "your post"
if($p[0]['owner']['xchan_name'] == $p[0]['author']['xchan_name'] && intval($p[0]['item_wall']))
$dest_str = sprintf(t('%1$s, %2$s liked [zrl=%3$s]your %4$s[/zrl]'),
$recip['channel_name'],
$dest_str = sprintf(t('%1$s liked [zrl=%2$s]your %3$s[/zrl]'),
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$itemlink,
$item_post_type);
@ -313,7 +311,7 @@ class Enotify {
// differents subjects for messages on the same thread.
$subject = sprintf( t('[$Projectname:Notify] Like received to conversation #%1$d by %2$s'), $parent_id, $sender['xchan_name']);
$preamble = sprintf( t('%1$s, %2$s liked an item/conversation you created.'), $recip['channel_name'], $sender['xchan_name']);
$preamble = sprintf( t('%1$s liked an item/conversation you created.'), $sender['xchan_name']);
$epreamble = $dest_str;
$sitelink = t('Please visit %s to view and/or reply to the conversation.');
@ -326,10 +324,9 @@ class Enotify {
if($params['type'] == NOTIFY_WALL) {
$subject = sprintf( t('[$Projectname:Notify] %s posted to your profile wall') , $sender['xchan_name']);
$preamble = sprintf( t('%1$s, %2$s posted to your profile wall at %3$s') , $recip['channel_name'], $sender['xchan_name'], $sitename);
$preamble = sprintf( t('%1$s posted to your profile wall at %2$s') , $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s, %2$s posted to [zrl=%3$s]your wall[/zrl]') ,
$recip['channel_name'],
$epreamble = sprintf( t('%1$s posted to [zrl=%2$s]your wall[/zrl]') ,
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$params['link']);
@ -353,9 +350,8 @@ class Enotify {
}
$subject = sprintf( t('[$Projectname:Notify] %s tagged you') , $sender['xchan_name']);
$preamble = sprintf( t('%1$s, %2$s tagged you at %3$s') , $recip['channel_name'], $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s, %2$s [zrl=%3$s]tagged you[/zrl].') ,
$recip['channel_name'],
$preamble = sprintf( t('%1$s tagged you at %2$s') , $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s [zrl=%2$s]tagged you[/zrl].') ,
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$params['link']);
@ -367,9 +363,8 @@ class Enotify {
if ($params['type'] == NOTIFY_POKE) {
$subject = sprintf( t('[$Projectname:Notify] %1$s poked you') , $sender['xchan_name']);
$preamble = sprintf( t('%1$s, %2$s poked you at %3$s') , $recip['channel_name'], $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s, %2$s [zrl=%2$s]poked you[/zrl].') ,
$recip['channel_name'],
$preamble = sprintf( t('%1$s poked you at %2$s') , $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s [zrl=%2$s]poked you[/zrl].') ,
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$params['link']);
@ -385,9 +380,8 @@ class Enotify {
if ($params['type'] == NOTIFY_TAGSHARE) {
$subject = sprintf( t('[$Projectname:Notify] %s tagged your post') , $sender['xchan_name']);
$preamble = sprintf( t('%1$s, %2$s tagged your post at %3$s') , $recip['channel_name'],$sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s, %2$s tagged [zrl=%3$s]your post[/zrl]') ,
$recip['channel_name'],
$preamble = sprintf( t('%1$s tagged your post at %2$s'),$sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s tagged [zrl=%2$s]your post[/zrl]') ,
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$itemlink);
@ -399,9 +393,8 @@ class Enotify {
if ($params['type'] == NOTIFY_INTRO) {
$subject = sprintf( t('[$Projectname:Notify] Introduction received'));
$preamble = sprintf( t('%1$s, you\'ve received an new connection request from \'%2$s\' at %3$s'), $recip['channel_name'], $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s, you\'ve received [zrl=%2$s]a new connection request[/zrl] from %3$s.'),
$recip['channel_name'],
$preamble = sprintf( t('You\'ve received an new connection request from \'%1$s\' at %2$s'), $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('You\'ve received [zrl=%1$s]a new connection request[/zrl] from %2$s.'),
$siteurl . '/connections/ifpending',
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]');
$body = sprintf( t('You may visit their profile at %s'),$sender['xchan_url']);
@ -414,9 +407,8 @@ class Enotify {
if ($params['type'] == NOTIFY_SUGGEST) {
$subject = sprintf( t('[$Projectname:Notify] Friend suggestion received'));
$preamble = sprintf( t('%1$s, you\'ve received a friend suggestion from \'%2$s\' at %3$s'), $recip['channel_name'], $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s, you\'ve received [zrl=%2$s]a friend suggestion[/zrl] for %3$s from %4$s.'),
$recip['channel_name'],
$preamble = sprintf( t('You\'ve received a friend suggestion from \'%1$s\' at %2$s'), $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('You\'ve received [zrl=%1$s]a friend suggestion[/zrl] for %2$s from %3$s.'),
$itemlink,
'[zrl=' . $params['item']['url'] . ']' . $params['item']['name'] . '[/zrl]',
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]');
@ -665,7 +657,7 @@ class Enotify {
'$banner' => $datarray['banner'],
'$notify_icon' => \Zotlabs\Lib\System::get_notify_icon(),
'$product' => $datarray['product'],
'$preamble' => $datarray['preamble'],
'$preamble' => $salutation . '<br><br>' . $datarray['preamble'],
'$sitename' => $datarray['sitename'],
'$siteurl' => $datarray['siteurl'],
'$source_name' => $datarray['source_name'],
@ -687,7 +679,7 @@ class Enotify {
$email_text_body = replace_macros($tpl, array(
'$banner' => $datarray['banner'],
'$product' => $datarray['product'],
'$preamble' => $datarray['preamble'],
'$preamble' => $salutation . "\n\n" . $datarray['preamble'],
'$sitename' => $datarray['sitename'],
'$siteurl' => $datarray['siteurl'],
'$source_name' => $datarray['source_name'],

View File

@ -238,9 +238,9 @@ class ThreadItem {
'do' => t("Add Star"),
'undo' => t("Remove Star"),
'toggle' => t("Toggle Star Status"),
'classdo' => (intval($item['item_starred']) ? "hidden" : ""),
'classundo' => (intval($item['item_starred']) ? "" : "hidden"),
'isstarred' => (intval($item['item_starred']) ? "starred fa-star" : "unstarred fa-star-o"),
'classdo' => ((intval($item['item_starred'])) ? "hidden" : ""),
'classundo' => ((intval($item['item_starred'])) ? "" : "hidden"),
'isstarred' => ((intval($item['item_starred'])) ? true : false),
'starred' => t('starred'),
);

View File

@ -44,9 +44,9 @@ class WebServer {
* We have to do it here because the session was just now opened.
*/
if(array_key_exists('system_language',$_POST)) {
if(strlen($_POST['system_language']))
$_SESSION['language'] = $_POST['system_language'];
if(array_key_exists('system_language',$_REQUEST)) {
if(strlen($_REQUEST['system_language']))
$_SESSION['language'] = $_REQUEST['system_language'];
else
unset($_SESSION['language']);
}

View File

@ -50,7 +50,7 @@ require_once('include/attach.php');
require_once('include/bbcode.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'STD_VERSION', '3.3.4' );
define ( 'STD_VERSION', '3.3.5' );
define ( 'ZOT_REVISION', '6.0a' );

View File

@ -0,0 +1,8 @@
<dl class="dl-horizontal">
<dt>Informations de base</dt>
<dd>Cette page vous permet d'ajuster les paramètres du journal d'événements et d'afficher le journal existant.</dd>.
<dt>Réglages du journal</dt>
<dd>Lorsque vous activez l'option "Débogage", les informations du journal système commenceront à s'ajouter au fichier spécifié dans la boîte "Fichier du journal" (le chemin est relatif à la racine du hub, par exemple /var/www). Notez que ce fichier doit être inscriptible par le serveur web.</dd>.
<dt>Niveau de journalisation</dt>
<dd>L'option "Niveau de journalisation" vous permet de définir la quantité d'informations ajoutées au fichier journal. Attention : Augmenter ce niveau peut rapidement gonfler la taille du fichier journal à >100MB, en particulier sur les hubs avec plusieurs membres.</dd>.
</dl>

View File

@ -0,0 +1,4 @@
<dl class="dl-horizontal">
<dt>Informations de base</dt>
<dd>Les statistiques de file d'attente affichent le nombre de messages dans la file d'attente pour livraison à d'autres centres. La priorité est liée au nombre de fois où la livraison a été tentée sans succès.</dd>
</dl>

View File

@ -0,0 +1,6 @@
<dl class="dl-horizontal">
<dt>Informations de base<dt>
<dd>C'est la page d'accueil d'un canal. Il est similaire au "mur" de quelqu'un dans un contexte de réseau social. Les messages créés par le canal sont affichés en fonction des permissions de visualisation de l'observateur.</dd>
<dt>Créer un message</dt>
<dd>Si vous avez la permission de créer des messages sur la page du canal, alors vous verrez l'éditeur de messages en haut de la page.</dd>
</dl>

View File

@ -0,0 +1,12 @@
<dl class="dl-horizontal">
<dt>Informations de base</dt>
<dd>Cette page vous permet de configurer les paramètres pour les nombreuses fonctionnalités supplémentaires de Hubzilla.</dd>
<dt><a href='#' onclick='$("#general-settings-title h3 a").click(); setTimeout((function() {contextualHelpFocus("#general-settings-title", 0)}), 1000); return false;' title="Click to highlight element...">Paramètres généraux</a></dt>
<dd>Les paramètres généraux des fonctionnalités incluent des options pertinentes pour votre canal, telles que la page web et l'hébergement wiki.</dd>
<dt><a href='#' onclick='$("#composition-settings-title h3 a").click(); setTimeout((function() {contextualHelpFocus("#composition-settings-title", 0)}), 1000); return false;' title="Click to highlight element...">Fonctions de composition de messages</a></dt>
<dd>Les fonctions de composition de messages offrent des options et des capacités supplémentaires lors de la composition de nouveaux messages.</dd>
<dt><a href='#' onclick='$("#net_module-settings-title h3 a").click(); setTimeout((function() {contextualHelpFocus("#net_module-settings-title", 0)}), 1000); return false;' title="Click to highlight element...">Filtrage des réseaux et des flux</a></dt>
<dd>Ces paramètres modifient les fonctions associées au filtrage et au contrôle de l'affichage des messages entrants.</dd>
<dt><a href='#' onclick='$("#tools-settings-title h3 a").click(); setTimeout((function() {contextualHelpFocus("#tools-settings-title", 0)}), 1000); return false;' title="Click to highlight element...">Outils d'affichage et de commentaires</a></dt>
<dd>Ceux-ci fournissent des outils supplémentaires pour catégoriser les messages et permettre des méthodes de commentaires supplémentaires telles que l'emoji ou le balisage de la communauté.</dd>
</dl>

View File

@ -364,12 +364,14 @@ Note: In previous releases, forums were delivered by using @forum+ with a plus s
[h4]Private Mentions[/h4]
If you wish to restrict a post to a single person or a number of people, you can do this by selecting channels or privacy groups from the privacy tool. You can also just tag them with a privacy tag. A privacy tag is a name preceded by the two characters @! - and in addition to tagging these channels, will also change the privacy permissions of the post to only include them. You can have more than one privacy tag, for instance @!bob and @!linda will send the post only to Bob and Linda. This mechanism over-rides the privacy selector.
Forums may be mentioned in the same way. !!dogs will post to the dogs forum privately. The forum will redeliver the post to all the forum members, but your own followers will not see the post unless they are also members of the dogs forum.
You may also tag privacy groups which are "public". When you create or edit a privacy group, there is a checkbox to allow the group members to be seen by others. If this box is checked for a group and you tag (for instance) @!Friends - the post will be restricted to the Friends group. Check that the group is public before doing this - as there is no way to take back a post except to delete it. The group name will appear in the post and will alert members of that group that they are members of it.
[h4]Mentions and Comments[/h4]
The above mechanisms only apply to "top-level" posts you create. Mentioning a channel with any of the above mechanisms has no effect in comments, except that the mentioned channel may receive a notification if they were already included as a recipient in the conversation.
[h4]Topical Tags[/h4]
[h4]Topical Tags (also known as Hashtags)[/h4]
Topical tags are indicated by preceding the tag name with the # character. This will create a link in the post to a generalised site search for the term provided. For example, #[zrl=[baseurl]/search?tag=cars]cars[/zrl] will provide a search link for all posts mentioning 'cars' on your site. Topical tags are generally a minimum of three characters in length. Shorter search terms are not likely to yield any search results, although this depends on the database configuration.
Topical tags are also not linked if they are purely numeric, e.g. #1. If you wish to use a numeric hashtag, please add some descriptive text such as #2012-elections.

View File

@ -1724,7 +1724,7 @@ function network_tabs() {
if(feature_enabled(local_channel(),'star_posts')) {
$tabs[] = array(
'label' => t('Starred'),
'url'=>z_root() . '/' . $cmd . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1',
'url'=>z_root() . '/' . $cmd . '/?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&star=1',
'sel'=>$starred_active,
'title' => t('Favourite Posts'),
);

View File

@ -606,7 +606,7 @@ class IXR_Client
if (!$path) {
// Assume we have been given a URL instead
$bits = parse_url($server);
$this->server = $bits['host'];
$this->server = $server;
$this->port = isset($bits['port']) ? $bits['port'] : 80;
$this->path = isset($bits['path']) ? $bits['path'] : '/';
@ -634,64 +634,39 @@ class IXR_Client
$request = "POST {$this->path} HTTP/1.0$r";
// Merged from WP #8145 - allow custom headers
$this->headers['Host'] = $this->server;
$this->headers['Content-Type'] = 'text/xml';
$this->headers['User-Agent'] = $this->useragent;
$this->headers['Content-Length']= $length;
$headers = [];
foreach( $this->headers as $header => $value ) {
$request .= "{$header}: {$value}{$r}";
}
$request .= $r;
$request .= $xml;
// Now send the request
if ($this->debug) {
echo '<pre class="ixr_request">'.htmlspecialchars($request)."\n</pre>\n\n";
$headers[] .= "{$header}: {$value}";
}
if ($this->timeout) {
$fp = @fsockopen($this->server, $this->port, $errno, $errstr, $this->timeout);
} else {
$fp = @fsockopen($this->server, $this->port, $errno, $errstr);
}
if (!$fp) {
//logger('server: ' . $this->server);
//logger('xml: ' . $xml);
//logger('headers: ' . print_r($headers,true));
$retries = 0;
$result = z_post_url($this->server,$xml,$retries, [ 'headers' => $headers] );
// logger('result: ' . print_r($result,true));
if (! $result['success']) {
$this->error = new IXR_Error(-32300, 'transport error - could not open socket');
return false;
}
fputs($fp, $request);
$contents = '';
$debugContents = '';
$gotFirstLine = false;
$gettingHeaders = true;
while (!feof($fp)) {
$line = fgets($fp, 4096);
if (!$gotFirstLine) {
// Check line for '200'
if (strstr($line, '200') === false) {
$this->error = new IXR_Error(-32300, 'transport error - HTTP status code was not 200');
return false;
}
$gotFirstLine = true;
}
if (trim($line) == '') {
$gettingHeaders = false;
}
if (!$gettingHeaders) {
// merged from WP #12559 - remove trim
$contents .= $line;
}
if ($this->debug) {
$debugContents .= $line;
}
}
if ($this->debug) {
echo '<pre class="ixr_response">'.htmlspecialchars($debugContents)."\n</pre>\n\n";
echo '<pre class="ixr_response">'.htmlspecialchars($result['header'] . "\n\n" . $result['body'])."\n</pre>\n\n";
}
// Now parse what we've got back
$this->message = new IXR_Message($contents);
$this->message = new IXR_Message($result['body']);
if (!$this->message->parse()) {
// XML error
$this->error = new IXR_Error(-32700, 'parse error. not well formed');

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -168,15 +168,6 @@ function handle_comment_form(e) {
$('#' + commentElm).attr('tabindex','9');
$('#' + submitElm).attr('tabindex','10');
if(auto_save_draft) {
var commentBody = localStorage.getItem("comment_body");
if(commentBody && $('#' + commentElm).val() === '') {
$('#' + commentElm).val(commentBody);
}
} else {
localStorage.removeItem("comment_body");
}
form.find(':not(:visible)').show();
}
@ -199,24 +190,31 @@ function handle_comment_form(e) {
var commentSaveTimer = null;
var emptyCommentElm = form.find('.comment-edit-text').attr('id');
var convId = emptyCommentElm.replace('comment-edit-text-','');
$(document).on('focusout','#' + emptyCommentElm,function(e){
if(commentSaveTimer)
clearTimeout(commentSaveTimer);
commentSaveChanges(true);
commentSaveChanges(convId,true);
commentSaveTimer = null;
});
$(document).on('focusin','#' + emptyCommentElm,function(e){
commentSaveTimer = setTimeout(function () {
commentSaveChanges(false);
commentSaveChanges(convId,false);
},10000);
});
function commentSaveChanges(isFinal = false) {
function commentSaveChanges(convId,isFinal = false) {
if(auto_save_draft) {
localStorage.setItem("comment_body", $('#' + emptyCommentElm).val());
tmp = $('#' + emptyCommentElm).val();
if(tmp) {
localStorage.setItem("comment_body-" + convId, tmp);
}
else {
localStorage.removeItem("comment_body-" + convId);
}
if( !isFinal) {
commentSaveTimer = setTimeout(commentSaveChanges,10000);
commentSaveTimer = setTimeout(commentSaveChanges,10000,convId);
}
}
}
@ -600,8 +598,10 @@ function updateConvItems(mode,data) {
$('.thread-wrapper.toplevel_item',data).each(function() {
var ident = $(this).attr('id');
var convId = ident.replace('thread-wrapper-','');
var commentWrap = $('#'+ident+' .collapsed-comments').attr('id');
var itmId = 0;
var isVisible = false;
@ -612,6 +612,9 @@ function updateConvItems(mode,data) {
if($('#collapsed-comments-'+itmId).is(':visible'))
isVisible = true;
// insert the content according to the mode and first_page
// and whether or not the content exists already (overwrite it)
@ -633,6 +636,24 @@ function updateConvItems(mode,data) {
if(isVisible)
showHideComments(itmId);
var commentBody = localStorage.getItem("comment_body-" + convId);
if(commentBody) {
var commentElm = $('#comment-edit-text-' + convId);
if(auto_save_draft) {
if($(commentElm).val() === '') {
$('#comment-edit-form-' + convId).show();
$(commentElm).addClass("expanded");
openMenu("comment-tools-" + convId);
$(commentElm).val(commentBody);
}
} else {
localStorage.removeItem("comment_body-" + convId);
}
}
// trigger the autotime function on all newly created content
$("> .wall-item-outside-wrapper .autotime, > .thread-wrapper .autotime",this).timeago();
@ -1075,18 +1096,21 @@ function dostar(ident) {
if(data.result == 1) {
$('#starred-' + ident).addClass('starred');
$('#starred-' + ident).removeClass('unstarred');
$('#starred-' + ident).addClass('fa-star-full');
$('#starred-' + ident).addClass('fa-star');
$('#starred-' + ident).removeClass('fa-star-o');
$('#star-' + ident).addClass('hidden');
$('#unstar-' + ident).removeClass('hidden');
var btn_tpl = '<div class="btn-group" id="star-button-' + ident + '"><button type="button" class="btn btn-outline-secondary btn-sm wall-item-like" onclick="dostar(' + ident + ');"><i class="fa fa-star"></i></button></div>'
$('#wall-item-tools-left-' + ident).prepend(btn_tpl);
}
else {
$('#starred-' + ident).addClass('unstarred');
$('#starred-' + ident).removeClass('starred');
$('#starred-' + ident).addClass('fa-star-o');
$('#starred-' + ident).removeClass('fa-star-full');
$('#starred-' + ident).removeClass('fa-star');
$('#star-' + ident).removeClass('hidden');
$('#unstar-' + ident).addClass('hidden');
$('#star-button-' + ident).remove();
}
$('#like-rotator-' + ident).hide();
});
@ -1141,7 +1165,7 @@ function post_comment(id) {
$("#comment-edit-form-" + id).serialize(),
function(data) {
if(data.success) {
localStorage.removeItem("comment_body");
localStorage.removeItem("comment_body-" + id);
$("#comment-edit-preview-" + id).hide();
$("#comment-edit-wrapper-" + id).hide();
$("#comment-edit-text-" + id).val('');

View File

@ -27,9 +27,9 @@
{{/if}}
{{/if}}
<div class="p-2 clearfix wall-item-head{{if $item.is_new && !$item.title && !$item.event && !$item.is_comment}} wall-item-head-new rounded-top{{/if}}">
<div class="wall-item-info" id="wall-item-info-{{$item.id}}" >
<div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}} h-card p-author" id="wall-item-photo-wrapper-{{$item.id}}" data-toggle="dropdown">
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-photo-link u-url" id="wall-item-photo-link-{{$item.id}}"><img src="{{$item.thumb}}" class="wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" /></a>
<div class="wall-item-info " id="wall-item-info-{{$item.id}}" >
<div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}} h-card p-author" id="wall-item-photo-wrapper-{{$item.id}}">
<img src="{{$item.thumb}}" class="fakelink wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" data-toggle="dropdown" />
{{if $item.thread_author_menu}}
<div class="dropdown-menu">
{{foreach $item.thread_author_menu as $mitem}}
@ -48,7 +48,7 @@
{{/if}}
<div class="wall-item-author">
{{if $item.previewing}}<span class="preview-indicator"><i class="fa fa-eye" title="{{$item.preview_lbl}}"></i></span>&nbsp;{{/if}}
<a href="#" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}} dropdown" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>{{if $item.owner_url}}&nbsp;{{$item.via}}&nbsp;<a href="{{$item.owner_url}}" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}}
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link u-url"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>{{if $item.owner_url}}&nbsp;{{$item.via}}&nbsp;<a href="{{$item.owner_url}}" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}}
</div>
<div class="wall-item-ago" id="wall-item-ago-{{$item.id}}">
{{if $item.verified}}<i class="fa fa-check item-verified" title="{{$item.verified}}"></i>&nbsp;{{elseif $item.forged}}<i class="fa fa-exclamation item-forged" title="{{$item.forged}}"></i>&nbsp;{{/if}}{{if $item.location}}<span class="wall-item-location p-location" id="wall-item-location-{{$item.id}}">{{$item.location}},&nbsp;</span>{{/if}}<span class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.editedtime}}&nbsp;{{$item.editedtime}}{{/if}}{{if $item.expiretime}}&nbsp;{{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}}&nbsp;<i class="fa fa-pencil"></i>{{/if}}&nbsp;{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}
@ -66,32 +66,9 @@
{{/if}}
{{if $item.has_tags}}
<div class="p-2 wall-item-tools clearfix">
<div class="body-tags">
<span class="tag">{{$item.mentions}} {{$item.tags}} {{$item.categories}} {{$item.folders}}</span>
</div>
{{**
{{if $item.mentions}}
<div class="body-tags" id="item-mentions">
<span class="tag">{{$item.mentions}}</span>
</div>
{{/if}}
{{if $item.tags}}
<div class="body-tags" id="item-tags">
<span class="tag">{{$item.tags}}</span>
</div>
{{/if}}
{{if $item.categories}}
<div class="body-tags" id="item-categories">
<span class="tag p-category">{{$item.categories}}</span>
</div>
{{/if}}
{{if $item.folders}}
<div class="body-tags" id="item-folders">
<span class="tag">{{$item.folders}}</span>
</div>
{{/if}}
**}}
</div>
{{/if}}
<div class="p-2 clearfix wall-item-tools">
@ -187,7 +164,7 @@
<a class="dropdown-item" href="#" onclick="itemAddToCal({{$item.id}}); return false;"><i id="addtocal-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-calendar" title="{{$item.addtocal}}"></i>{{$item.addtocal}}</a>
{{/if}}
{{if $item.star}}
<a class="dropdown-item" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-star {{$item.star.isstarred}}" title="{{$item.star.toggle}}"></i>{{$item.star.toggle}}</a>
<a class="dropdown-item" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="generic-icons-nav fa fa-fw{{if $item.star.isstarred}} starred fa-star{{else}} unstarred fa-star-o{{/if}}" title="{{$item.star.toggle}}"></i>{{$item.star.toggle}}</a>
{{/if}}
{{if $item.thread_action_menu}}
{{foreach $item.thread_action_menu as $mitem}}
@ -207,7 +184,12 @@
</div>
{{if $item.responses || $item.attachments}}
<div class="wall-item-tools-left{{if ($item.responses.count > 1) || ($item.responses.count && $item.attachments)}} btn-group{{/if}}">
<div class="wall-item-tools-left btn-group" id="wall-item-tools-left-{{$item.id}}">
{{if $item.star && $item.star.isstarred}}
<div class="btn-group" id="star-button-{{$item.id}}">
<button type="button" class="btn btn-outline-secondary btn-sm wall-item-like" onclick="dostar({{$item.id}});"><i class="fa fa-star"></i></button>
</div>
{{/if}}
{{if $item.attachments}}
<div class="btn-group">
<button type="button" class="btn btn-outline-secondary btn-sm wall-item-like dropdown-toggle" data-toggle="dropdown" id="attachment-menu-{{$item.id}}"><i class="fa fa-paperclip"></i></button>

View File

@ -28,8 +28,8 @@
{{/if}}
<div class="p-2 clearfix wall-item-head{{if $item.is_new && !$item.title && !$item.event && !$item.is_comment}} wall-item-head-new rounded-top{{/if}}">
<div class="wall-item-info" id="wall-item-info-{{$item.id}}" >
<div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}} h-card p-author" id="wall-item-photo-wrapper-{{$item.id}}" data-toggle="dropdown">
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-photo-link u-url" id="wall-item-photo-link-{{$item.id}}"><img src="{{$item.thumb}}" class="wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" /></a>
<div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}} h-card p-author" id="wall-item-photo-wrapper-{{$item.id}}">
<img src="{{$item.thumb}}" class="fakelink wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" data-toggle="dropdown" /></a>
{{if $item.thread_author_menu}}
<div class="dropdown-menu">
{{foreach $item.thread_author_menu as $mitem}}
@ -47,7 +47,7 @@
</div>
{{/if}}
<div class="wall-item-author">
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>{{if $item.owner_url}}&nbsp;{{$item.via}}&nbsp;<a href="{{$item.owner_url}}" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}}
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link u-url"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>{{if $item.owner_url}}&nbsp;{{$item.via}}&nbsp;<a href="{{$item.owner_url}}" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}}
</div>
<div class="wall-item-ago" id="wall-item-ago-{{$item.id}}">
{{if $item.verified}}<i class="fa fa-check item-verified" title="{{$item.verified}}"></i>&nbsp;{{elseif $item.forged}}<i class="fa fa-exclamation item-forged" title="{{$item.forged}}"></i>&nbsp;{{/if}}{{if $item.location}}<span class="wall-item-location p-location" id="wall-item-location-{{$item.id}}">{{$item.location}},&nbsp;</span>{{/if}}<span class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.editedtime}}&nbsp;{{$item.editedtime}}{{/if}}{{if $item.expiretime}}&nbsp;{{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}}&nbsp;<i class="fa fa-pencil"></i>{{/if}}&nbsp;{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}
@ -67,28 +67,6 @@
<div class="body-tags">
<span class="tag">{{$item.mentions}} {{$item.tags}} {{$item.categories}} {{$item.folders}}</span>
</div>
{{**
{{if $item.mentions}}
<div class="body-tags" id="item-mentions">
<span class="tag">{{$item.mentions}}</span>
</div>
{{/if}}
{{if $item.tags}}
<div class="body-tags" id="item-tags">
<span class="tag">{{$item.tags}}</span>
</div>
{{/if}}
{{if $item.categories}}
<div class="body-tags" id="item-categories">
<span class="tag p-category">{{$item.categories}}</span>
</div>
{{/if}}
{{if $item.folders}}
<div class="body-tags" id="item-folders">
<span class="tag">{{$item.folders}}</span>
</div>
{{/if}}
**}}
</div>
{{/if}}
<div class="p-2 clearfix wall-item-tools">
@ -179,7 +157,7 @@
<a class="dropdown-item" href="#" onclick="itemAddToCal({{$item.id}}); return false;"><i id="addtocal-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-calendar" title="{{$item.addtocal}}"></i>{{$item.addtocal}}</a>
{{/if}}
{{if $item.star}}
<a class="dropdown-item" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-star {{$item.star.isstarred}}" title="{{$item.star.toggle}}"></i>{{$item.star.toggle}}</a>
<a class="dropdown-item" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="generic-icons-nav fa fa-fw{{if $item.star.isstarred}} starred fa-star{{else}} unstarred fa-star-o{{/if}}" title="{{$item.star.toggle}}"></i>{{$item.star.toggle}}</a>
{{/if}}
{{if $item.thread_action_menu}}
{{foreach $item.thread_action_menu as $mitem}}
@ -198,7 +176,12 @@
</div>
</div>
<div id="like-rotator-{{$item.id}}" class="like-rotator"></div>
<div class="wall-item-tools-left{{if $item.unseen_comments || $item.like_count || $item.dislike_count || $item.attachments}} btn-group{{/if}}">
<div class="wall-item-tools-left btn-group" id="wall-item-tools-left-{{$item.id}}">
{{if $item.star && $item.star.isstarred}}
<div class="btn-group" id="star-button-{{$item.id}}">
<button type="button" class="btn btn-outline-secondary btn-sm wall-item-like" onclick="dostar({{$item.id}});"><i class="fa fa-star"></i></button>
</div>
{{/if}}
{{if $item.attachments}}
<div class="btn-group">
<button type="button" class="btn btn-outline-secondary btn-sm wall-item-like dropdown-toggle" data-toggle="dropdown" id="attachment-menu-{{$item.id}}"><i class="fa fa-paperclip"></i></button>