@ tag completion enhancements, show url on hover and respect custom attags
This commit is contained in:
parent
1aba538c96
commit
2d22a58324
5 changed files with 37 additions and 7 deletions
2
boot.php
2
boot.php
|
@ -11,7 +11,7 @@ require_once('include/cache.php');
|
||||||
define ( 'FRIENDIKA_PLATFORM', 'Free Friendika');
|
define ( 'FRIENDIKA_PLATFORM', 'Free Friendika');
|
||||||
define ( 'FRIENDIKA_VERSION', '2.3.1146' );
|
define ( 'FRIENDIKA_VERSION', '2.3.1146' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1098 );
|
define ( 'DB_UPDATE_VERSION', 1099 );
|
||||||
|
|
||||||
define ( 'EOL', "<br />\r\n" );
|
define ( 'EOL', "<br />\r\n" );
|
||||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||||
|
|
|
@ -100,6 +100,13 @@ CREATE TABLE IF NOT EXISTS `contact` (
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `uid` (`uid`),
|
KEY `uid` (`uid`),
|
||||||
KEY `self` (`self`),
|
KEY `self` (`self`),
|
||||||
|
KEY `network` (`network`),
|
||||||
|
KEY `name` (`name`),
|
||||||
|
KEY `nick` (`nick`),
|
||||||
|
KEY `attag` (`attag`),
|
||||||
|
KEY `url` (`url`),
|
||||||
|
KEY `addr` (`addr`),
|
||||||
|
KEY `batch` (`batch`),
|
||||||
KEY `issued-id` (`issued-id`),
|
KEY `issued-id` (`issued-id`),
|
||||||
KEY `dfrn-id` (`dfrn-id`),
|
KEY `dfrn-id` (`dfrn-id`),
|
||||||
KEY `blocked` (`blocked`),
|
KEY `blocked` (`blocked`),
|
||||||
|
|
|
@ -65,7 +65,7 @@ ACPopup.prototype._search = function(){
|
||||||
that.cont.show();
|
that.cont.show();
|
||||||
$(data.items).each(function(){
|
$(data.items).each(function(){
|
||||||
html = "<img src='{0}' height='16px' width='16px'>{1} ({2})".format(this.photo, this.name, this.nick)
|
html = "<img src='{0}' height='16px' width='16px'>{1} ({2})".format(this.photo, this.name, this.nick)
|
||||||
that.add(html, this.nick);
|
that.add(html, this.nick + ' - ' + this.link);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
that.cont.hide();
|
that.cont.hide();
|
||||||
|
@ -78,7 +78,7 @@ ACPopup.prototype.add = function(label, value){
|
||||||
var that=this;
|
var that=this;
|
||||||
var elm = $("<div class='acpopupitem' title='"+value+"'>"+label+"</div>");
|
var elm = $("<div class='acpopupitem' title='"+value+"'>"+label+"</div>");
|
||||||
elm.click(function(e){
|
elm.click(function(e){
|
||||||
t = $(this).attr('title');
|
t = $(this).attr('title').replace(new RegExp(' \- .*'),'');
|
||||||
el=$(that.element);
|
el=$(that.element);
|
||||||
sel = el.getSelection();
|
sel = el.getSelection();
|
||||||
sel.start = sel.start- that.searchText.length;
|
sel.start = sel.start- that.searchText.length;
|
||||||
|
|
|
@ -15,7 +15,7 @@ function acl_init(&$a){
|
||||||
|
|
||||||
if ($search!=""){
|
if ($search!=""){
|
||||||
$sql_extra = "AND `name` LIKE '%%".dbesc($search)."%%'";
|
$sql_extra = "AND `name` LIKE '%%".dbesc($search)."%%'";
|
||||||
$sql_extra2 = "AND (`name` LIKE '%%".dbesc($search)."%%' OR `nick` LIKE '%%".dbesc($search)."%%')";
|
$sql_extra2 = "AND (`attag` LIKE '%%".dbesc($search)."%%' OR `name` LIKE '%%".dbesc($search)."%%' OR `nick` LIKE '%%".dbesc($search)."%%')";
|
||||||
}
|
}
|
||||||
|
|
||||||
// count groups and contacts
|
// count groups and contacts
|
||||||
|
@ -89,7 +89,7 @@ function acl_init(&$a){
|
||||||
"id" => intval($g['id']),
|
"id" => intval($g['id']),
|
||||||
"network" => $g['network'],
|
"network" => $g['network'],
|
||||||
"link" => $g['url'],
|
"link" => $g['url'],
|
||||||
"nick" => $g['nick'],
|
"nick" => ($g['attag']) ? $g['attag'] : $g['nick'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
27
update.php
27
update.php
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
define( 'UPDATE_VERSION' , 1098 );
|
define( 'UPDATE_VERSION' , 1099 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -806,6 +806,29 @@ function update_1097() {
|
||||||
ADD INDEX (`created`),
|
ADD INDEX (`created`),
|
||||||
ADD INDEX (`last`),
|
ADD INDEX (`last`),
|
||||||
ADD INDEX (`network`),
|
ADD INDEX (`network`),
|
||||||
ADD INDEX (`batch`) ");
|
ADD INDEX (`batch`)
|
||||||
|
");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function update_1098() {
|
||||||
|
q("ALTER TABLE `contact`
|
||||||
|
ADD INDEX (`network`),
|
||||||
|
ADD INDEX (`name`),
|
||||||
|
ADD INDEX (`nick`),
|
||||||
|
ADD INDEX (`attag`),
|
||||||
|
ADD INDEX (`url`),
|
||||||
|
ADD INDEX (`addr`),
|
||||||
|
ADD INDEX (`batch`)
|
||||||
|
");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue