Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
44263d5ac3
2
UPDATES
Normal file
2
UPDATES
Normal file
@ -0,0 +1,2 @@
|
||||
alter table `group` add hash char(255) not null default '' after id, add index (hash);
|
||||
alter table photo add size int(10) unsigned not null default '0' after width, add index (size);
|
6
boot.php
6
boot.php
@ -1334,12 +1334,6 @@ if(! function_exists('profile_sidebar')) {
|
||||
}
|
||||
}
|
||||
|
||||
if(get_my_url() && $profile['unkmail'])
|
||||
$wallmessage = t('Message');
|
||||
else
|
||||
$wallmessage = false;
|
||||
|
||||
|
||||
|
||||
// show edit profile to yourself
|
||||
if($is_owner) {
|
||||
|
@ -2,9 +2,22 @@
|
||||
|
||||
|
||||
function vcard_from_xchan($xchan) {
|
||||
|
||||
$connect = false;
|
||||
if(local_user()) {
|
||||
$r = q("select * from abook where abook_xchan = '%s' and abook_channel = %d limit 1",
|
||||
dbesc($xchan['xchan_hash']),
|
||||
intval(local_user())
|
||||
);
|
||||
if(! $r)
|
||||
$connect = t('Connect');
|
||||
}
|
||||
|
||||
return replace_macros(get_markup_template('xchan_vcard.tpl'),array(
|
||||
'$name' => $xchan['xchan_name'],
|
||||
'$photo' => $xchan['xchan_photo_l']
|
||||
'$name' => $xchan['xchan_name'],
|
||||
'$photo' => $xchan['xchan_photo_l'],
|
||||
'$url' => $xchan['xchan_addr'],
|
||||
'$connect' => $connect
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -528,7 +528,7 @@ class Photo {
|
||||
$x = q("select id from photo where `resource_id` = '%s' and uid = %d and `xchan` = '%s' and `scale` = %d limit 1",
|
||||
dbesc($rid),
|
||||
intval($uid),
|
||||
intval($xchan),
|
||||
dbesc($xchan),
|
||||
intval($scale)
|
||||
);
|
||||
if(count($x)) {
|
||||
|
@ -1,61 +1,31 @@
|
||||
<?php
|
||||
|
||||
require_once("boot.php");
|
||||
require_once('include/Scrape.php');
|
||||
require_once('include/socgraph.php');
|
||||
require_once('include/cli_startup.php');
|
||||
require_once('include/zot.php');
|
||||
|
||||
function gprobe_run($argv, $argc){
|
||||
global $a, $db;
|
||||
|
||||
if(is_null($a)) {
|
||||
$a = new App;
|
||||
}
|
||||
|
||||
if(is_null($db)) {
|
||||
@include(".htconfig.php");
|
||||
require_once("dba.php");
|
||||
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
||||
unset($db_host, $db_user, $db_pass, $db_data);
|
||||
};
|
||||
cli_startup();
|
||||
|
||||
require_once('include/session.php');
|
||||
require_once('include/datetime.php');
|
||||
|
||||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
$a->set_baseurl(get_config('system','baseurl'));
|
||||
|
||||
load_hooks();
|
||||
$a = get_app();
|
||||
|
||||
if($argc != 2)
|
||||
return;
|
||||
|
||||
$url = hex2bin($argv[1]);
|
||||
|
||||
$r = q("select * from gcontact where nurl = '%s' limit 1",
|
||||
$r = q("select * from xchan where xchan_addr = '%s' limit 1",
|
||||
dbesc(normalise_link($url))
|
||||
);
|
||||
|
||||
if(! count($r)) {
|
||||
|
||||
$arr = probe_url($url);
|
||||
if(count($arr) && x($arr,'network') && $arr['network'] === NETWORK_DFRN) {
|
||||
q("insert into `gcontact` (`name`,`url`,`nurl`,`photo`)
|
||||
values ( '%s', '%s', '%s', '%s') ",
|
||||
dbesc($arr['name']),
|
||||
dbesc($arr['url']),
|
||||
dbesc(normalise_link($arr['url'])),
|
||||
dbesc($arr['photo'])
|
||||
);
|
||||
if(! $r) {
|
||||
$x = zot_finger($url,null);
|
||||
if($x) {
|
||||
$j = json_decode($x,true);
|
||||
$y = import_xchan($j);
|
||||
}
|
||||
$r = q("select * from gcontact where nurl = '%s' limit 1",
|
||||
dbesc(normalise_link($url))
|
||||
);
|
||||
}
|
||||
if(count($r))
|
||||
poco_load(0,0,$r[0]['id'], str_replace('/channel/','/poco/',$r[0]['url']));
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -26,8 +26,20 @@ function group_add($uid,$name) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
$r = q("INSERT INTO `group` ( `uid`, `name` )
|
||||
VALUES( %d, '%s' ) ",
|
||||
|
||||
do {
|
||||
$dups = false;
|
||||
$hash = random_string() . $name;
|
||||
|
||||
$r = q("SELECT id FROM group WHERE hash = '%s' LIMIT 1", dbesc($hash));
|
||||
if(count($r))
|
||||
$dups = true;
|
||||
} while($dups == true);
|
||||
|
||||
|
||||
$r = q("INSERT INTO `group` ( hash, uid, name )
|
||||
VALUES( '%s', %d, '%s' ) ",
|
||||
dbesc($hash),
|
||||
intval($uid),
|
||||
dbesc($name)
|
||||
);
|
||||
|
@ -23,7 +23,7 @@ function nav(&$a) {
|
||||
minChars: 2,
|
||||
width: 250,
|
||||
});
|
||||
a.setOptions({ params: { autoSubmit: true, type: 'x' }});
|
||||
a.setOptions({ autoSubmit: true, params: { type: 'x' }});
|
||||
|
||||
});
|
||||
|
||||
|
@ -1044,7 +1044,7 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
|
||||
|
||||
// replace the special char encoding
|
||||
|
||||
$s = htmlspecialchars($s,ENT_QUOTES,'UTF-8');
|
||||
$s = htmlspecialchars($s,ENT_COMPAT,'UTF-8');
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ function notags($string) {
|
||||
if(! function_exists('escape_tags')) {
|
||||
function escape_tags($string) {
|
||||
|
||||
return(htmlspecialchars($string, ENT_QUOTES, 'UTF-8', false));
|
||||
return(htmlspecialchars($string, ENT_COMPAT, 'UTF-8', false));
|
||||
|
||||
}}
|
||||
|
||||
@ -331,7 +331,7 @@ function expand_acl($s) {
|
||||
|
||||
if(! function_exists('sanitise_acl')) {
|
||||
function sanitise_acl(&$item) {
|
||||
if(intval($item))
|
||||
if(strlen($item))
|
||||
$item = '<' . notags(trim($item)) . '>';
|
||||
else
|
||||
unset($item);
|
||||
@ -545,7 +545,7 @@ function contact_block() {
|
||||
$total = intval($r[0]['total']);
|
||||
}
|
||||
if(! $total) {
|
||||
$contacts = t('No contacts');
|
||||
$contacts = t('No connnections');
|
||||
$micropro = Null;
|
||||
|
||||
} else {
|
||||
@ -556,7 +556,7 @@ function contact_block() {
|
||||
);
|
||||
|
||||
if(count($r)) {
|
||||
$contacts = sprintf( tt('%d Contact','%d Contacts', $total),$total);
|
||||
$contacts = sprintf( tt('%d Connection','%d Connections', $total),$total);
|
||||
$micropro = Array();
|
||||
foreach($r as $rr) {
|
||||
$micropro[] = micropro($rr,true,'mpfriend');
|
||||
@ -568,7 +568,7 @@ function contact_block() {
|
||||
$o = replace_macros($tpl, array(
|
||||
'$contacts' => $contacts,
|
||||
'$nickname' => $a->profile['nickname'],
|
||||
'$viewcontacts' => t('View Contacts'),
|
||||
'$viewcontacts' => t('View Connnections'),
|
||||
'$micropro' => $micropro,
|
||||
));
|
||||
|
||||
@ -579,46 +579,35 @@ function contact_block() {
|
||||
|
||||
}}
|
||||
|
||||
|
||||
function chanlink_hash($s) {
|
||||
return z_root() . '/chanview?f=&hash=' . urlencode($s);
|
||||
}
|
||||
|
||||
function chanlink_url($s) {
|
||||
return z_root() . '/chanview?f=&url=' . urlencode($s);
|
||||
}
|
||||
|
||||
|
||||
function chanlink_cid($d) {
|
||||
return z_root() . '/chanview?f=&cid=' . intval($d);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(! function_exists('micropro')) {
|
||||
function micropro($contact, $redirect = false, $class = '', $textmode = false) {
|
||||
|
||||
if($class)
|
||||
$class = ' ' . $class;
|
||||
$url = chanlink_hash($contact['xchan_hash']);
|
||||
|
||||
$url = $contact['xchan_url'];
|
||||
$sparkle = '';
|
||||
$redir = false;
|
||||
|
||||
if($redirect) {
|
||||
$a = get_app();
|
||||
$redirect_url = $a->get_baseurl() . '/magic/' . $contact['abook_id'];
|
||||
if(local_user() && ($contact['abook_channel'] == local_user()) && ($contact['xchan_network'] === NETWORK_ZOT)) {
|
||||
$redir = true;
|
||||
$url = $redirect_url;
|
||||
$sparkle = ' sparkle';
|
||||
}
|
||||
else
|
||||
$url = zid($url);
|
||||
}
|
||||
$click = ((x($contact,'click')) ? ' onclick="' . $contact['click'] . '" ' : '');
|
||||
if($click)
|
||||
$url = '';
|
||||
if($textmode) {
|
||||
return '<div class="contact-block-textdiv' . $class . '"><a class="contact-block-link' . $class . $sparkle
|
||||
. (($click) ? ' fakelink' : '') . '" '
|
||||
. (($redir) ? ' ' : '')
|
||||
. (($url) ? ' href="' . $url . '"' : '') . $click
|
||||
. '" title="' . $contact['xchan_name'] . ' [' . $contact['xchan_url'] . ']" alt="' . $contact['xchan_name']
|
||||
. '" >'. $contact['xchan_name'] . '</a></div>' . "\r\n";
|
||||
}
|
||||
else {
|
||||
return '<div class="contact-block-div' . $class . '"><a class="contact-block-link' . $class . $sparkle
|
||||
. (($click) ? ' fakelink' : '') . '" '
|
||||
. (($redir) ? ' ' : '')
|
||||
. (($url) ? ' href="' . $url . '"' : '') . $click . ' ><img class="contact-block-img' . $class . $sparkle . '" src="'
|
||||
. $contact['xchan_photo_s'] . '" title="' . $contact['xchan_name'] . ' [' . $contact['xchan_url'] . ']" alt="' . $contact['xchan_name']
|
||||
. '" /></a></div>' . "\r\n";
|
||||
}
|
||||
return replace_macros(get_markup_template(($textmode)?'micropro_txt.tpl':'micropro_img.tpl'),array(
|
||||
'$click' => $click,
|
||||
'$class' => $class,
|
||||
'$url' => $url,
|
||||
'$photo' => $contact['xchan_photo_s'],
|
||||
'$name' => $contact['xchan_name'],
|
||||
'$title' => $contact['xchan_name'] . ' [' . $contact['xchan_addr'] . ']',
|
||||
));
|
||||
}}
|
||||
|
||||
|
||||
@ -963,7 +952,7 @@ function prepare_body($item,$attach = false) {
|
||||
foreach($terms as $t) {
|
||||
if(strlen($x))
|
||||
$x .= ',';
|
||||
$x .= htmlspecialchars($t['term'],ENT_QUOTES,'UTF-8')
|
||||
$x .= htmlspecialchars($t['term'],ENT_COMPAT,'UTF-8')
|
||||
. ((local_user() == $item['uid']) ? ' <a href="' . $a->get_baseurl() . '/filerm/' . $item['id'] . '?f=&cat=' . urlencode($t['term']) . '" title="' . t('remove') . '" >' . t('[remove]') . '</a>' : '');
|
||||
}
|
||||
if(strlen($x))
|
||||
@ -978,7 +967,7 @@ function prepare_body($item,$attach = false) {
|
||||
foreach($terms as $t) {
|
||||
if(strlen($x))
|
||||
$x .= ' ';
|
||||
$x .= htmlspecialchars($t['term'],ENT_QUOTES,'UTF-8')
|
||||
$x .= htmlspecialchars($t['term'],ENT_COMPAT,'UTF-8')
|
||||
. ' <a href="' . $a->get_baseurl() . '/filerm/' . $item['id'] . '?f=&term=' . urlencode($t['term']) . '" title="' . t('remove') . '" >' . t('[remove]') . '</a>';
|
||||
}
|
||||
if(strlen($x) && (local_user() == $item['uid']))
|
||||
|
@ -406,7 +406,7 @@ function import_xchan_from_json($j) {
|
||||
|
||||
require_once("Photo.php");
|
||||
|
||||
$photos = import_profile_photo($j->photo,0,$xchan_hash);
|
||||
$photos = import_profile_photo($j->photo,$xchan_hash);
|
||||
$r = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s'
|
||||
where xchan_hash = '%s' limit 1",
|
||||
dbesc($j->photo_updated),
|
||||
@ -524,7 +524,7 @@ function import_xchan($arr) {
|
||||
|
||||
require_once("Photo.php");
|
||||
|
||||
$photos = import_profile_photo($arr['photo'],0,$xchan_hash);
|
||||
$photos = import_profile_photo($arr['photo'],$xchan_hash);
|
||||
$r = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s'
|
||||
where xchan_hash = '%s' limit 1",
|
||||
dbesc($arr['photo_updated']),
|
||||
@ -870,7 +870,6 @@ function delete_imported_item($sender,$item,$uid) {
|
||||
}
|
||||
|
||||
function process_mail_delivery($sender,$arr,$deliveries) {
|
||||
|
||||
|
||||
foreach($deliveries as $d) {
|
||||
$r = q("select * from channel where channel_hash = '%s' limit 1",
|
||||
|
@ -425,6 +425,7 @@ CREATE TABLE IF NOT EXISTS `glink` (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `group` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`hash` char(255) NOT NULL DEFAULT '',
|
||||
`uid` int(10) unsigned NOT NULL,
|
||||
`visible` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`deleted` tinyint(1) NOT NULL DEFAULT '0',
|
||||
@ -432,7 +433,8 @@ CREATE TABLE IF NOT EXISTS `group` (
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `uid` (`uid`),
|
||||
KEY `visible` (`visible`),
|
||||
KEY `deleted` (`deleted`)
|
||||
KEY `deleted` (`deleted`),
|
||||
KEY `hash` (`hash`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `group_member` (
|
||||
@ -708,6 +710,7 @@ CREATE TABLE IF NOT EXISTS `photo` (
|
||||
`type` char(128) NOT NULL DEFAULT 'image/jpeg',
|
||||
`height` smallint(6) NOT NULL,
|
||||
`width` smallint(6) NOT NULL,
|
||||
`size` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`data` mediumblob NOT NULL,
|
||||
`scale` tinyint(3) NOT NULL,
|
||||
`profile` tinyint(1) NOT NULL DEFAULT '0',
|
||||
@ -724,7 +727,8 @@ CREATE TABLE IF NOT EXISTS `photo` (
|
||||
KEY `type` (`type`),
|
||||
KEY `contact-id` (`contact-id`),
|
||||
KEY `aid` (`aid`),
|
||||
KEY `xchan` (`xchan`)
|
||||
KEY `xchan` (`xchan`),
|
||||
KEY `size` (`size`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `profile` (
|
||||
|
@ -105,7 +105,7 @@ ACL.prototype.on_button_hide = function(event){
|
||||
|
||||
ACL.prototype.set_allow = function(itemid){
|
||||
type = itemid[0];
|
||||
id = parseInt(itemid.substr(1));
|
||||
id = itemid.substr(1);
|
||||
switch(type){
|
||||
case "g":
|
||||
if (that.allow_gid.indexOf(id)<0){
|
||||
@ -129,7 +129,7 @@ ACL.prototype.set_allow = function(itemid){
|
||||
|
||||
ACL.prototype.set_deny = function(itemid){
|
||||
type = itemid[0];
|
||||
id = parseInt(itemid.substr(1));
|
||||
id = itemid.substr(1);
|
||||
switch(type){
|
||||
case "g":
|
||||
if (that.deny_gid.indexOf(id)<0){
|
||||
@ -178,7 +178,7 @@ ACL.prototype.update_view = function(){
|
||||
$("#acl-list-content .acl-list-item").each(function(){
|
||||
itemid = $(this).attr('id');
|
||||
type = itemid[0];
|
||||
id = parseInt(itemid.substr(1));
|
||||
id = itemid.substr(1);
|
||||
|
||||
btshow = $(this).children(".acl-button-show").removeClass("selected");
|
||||
bthide = $(this).children(".acl-button-hide").removeClass("selected");
|
||||
@ -248,7 +248,7 @@ ACL.prototype.populate = function(data){
|
||||
that.list_content.height(height);
|
||||
$(data.items).each(function(){
|
||||
html = "<div class='acl-list-item {4} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
|
||||
html = html.format( this.photo, this.name, this.type, this.id, '', this.network, this.link );
|
||||
html = html.format( this.photo, this.name, this.type, this.xid, '', this.network, this.link );
|
||||
if (this.uids!=undefined) that.group_uids[this.id] = this.uids;
|
||||
//console.log(html);
|
||||
that.list_content.append(html);
|
||||
|
42
mod/acl.php
42
mod/acl.php
@ -27,8 +27,8 @@ function acl_init(&$a){
|
||||
|
||||
|
||||
if ($search!=""){
|
||||
$sql_extra = "AND `name` LIKE '%%".dbesc($search)."%%'";
|
||||
$sql_extra2 = "AND (`attag` LIKE '%%".dbesc($search)."%%' OR `name` LIKE '%%".dbesc($search)."%%' OR `nick` LIKE '%%".dbesc($search)."%%')";
|
||||
$sql_extra = " AND `name` LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ";
|
||||
$sql_extra2 = "AND ( xchan_name LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " OR xchan_addr LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . ") ";
|
||||
|
||||
$col = ((strpos($search,'@') !== false) ? 'xchan_addr' : 'xchan_name' );
|
||||
$sql_extra3 = "AND $col like " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ";
|
||||
@ -48,14 +48,14 @@ function acl_init(&$a){
|
||||
}
|
||||
|
||||
if ($type=='' || $type=='c'){
|
||||
$r = q("SELECT COUNT(`id`) AS c FROM `contact`
|
||||
WHERE `uid` = %d AND `self` = 0
|
||||
AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0
|
||||
AND `notify` != '' $sql_extra2" ,
|
||||
intval(local_user())
|
||||
$r = q("SELECT COUNT(abook_id) AS c FROM abook left join xchan on abook_xchan = xchan_hash
|
||||
WHERE abook_channel = %d AND not ( abook_flags & %d ) $sql_extra2" ,
|
||||
intval(local_user()),
|
||||
intval(ABOOK_FLAG_SELF|ABOOK_FLAG_BLOCKED|ABOOK_FLAG_PENDING|ABOOK_FLAG_ARCHIVE)
|
||||
);
|
||||
$contact_count = (int)$r[0]['c'];
|
||||
}
|
||||
|
||||
elseif ($type == 'm') {
|
||||
|
||||
// autocomplete for Private Messages
|
||||
@ -94,7 +94,8 @@ function acl_init(&$a){
|
||||
|
||||
if ($type=='' || $type=='g'){
|
||||
|
||||
$r = q("SELECT `group`.`id`, `group`.`name`, GROUP_CONCAT(DISTINCT `group_member`.`xchan` SEPARATOR ',') as uids
|
||||
$r = q("SELECT `group`.`id`, `group`.`hash`, `group`.`name`,
|
||||
GROUP_CONCAT(DISTINCT `group_member`.`xchan` SEPARATOR ',') as uids
|
||||
FROM `group`,`group_member`
|
||||
WHERE `group`.`deleted` = 0 AND `group`.`uid` = %d
|
||||
AND `group_member`.`gid`=`group`.`id`
|
||||
@ -113,24 +114,24 @@ function acl_init(&$a){
|
||||
"type" => "g",
|
||||
"photo" => "images/twopeople.png",
|
||||
"name" => $g['name'],
|
||||
"id" => intval($g['id']),
|
||||
"uids" => array_map("intval", explode(",",$g['uids'])),
|
||||
"id" => $g['id'],
|
||||
"xid" => $g['hash'],
|
||||
"uids" => explode(",",$g['uids']),
|
||||
"link" => ''
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($type=='' || $type=='c'){
|
||||
|
||||
$r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag` FROM `contact`
|
||||
WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 AND `notify` != ''
|
||||
$sql_extra2
|
||||
ORDER BY `name` ASC ",
|
||||
intval(local_user())
|
||||
if ($type=='' || $type=='c') {
|
||||
$r = q("SELECT abook_id as id, xchan_hash as hash, xchan_name as name, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick
|
||||
FROM abook left join xchan on abook_xchan = xchan_hash
|
||||
WHERE abook_channel = %d AND not ( abook_flags & %d ) $sql_extra2 order by xchan_name asc" ,
|
||||
intval(local_user()),
|
||||
intval(ABOOK_FLAG_SELF|ABOOK_FLAG_BLOCKED|ABOOK_FLAG_PENDING|ABOOK_FLAG_ARCHIVE)
|
||||
);
|
||||
}
|
||||
elseif($type == 'm') {
|
||||
dbg(1);
|
||||
|
||||
$r = q("SELECT xchan_hash as id, xchan_name as name, xchan_addr as nick, xchan_photo_s as micro, xchan_url as url
|
||||
FROM abook left join xchan on abook_xchan = xchan_hash
|
||||
WHERE abook_channel = %d and ( (abook_their_perms = null) or (abook_their_perms & %d ))
|
||||
@ -139,7 +140,6 @@ dbg(1);
|
||||
intval(local_user()),
|
||||
intval(PERMS_W_MAIL)
|
||||
);
|
||||
dbg(0);
|
||||
}
|
||||
elseif($type == 'a') {
|
||||
$r = q("SELECT abook_id as id, xchan_name as name, xchan_addr as nick, xchan_photo_s as micro, xchan_network as network, xchan_url as url, xchan_addr as attag FROM abook left join xchan on abook_xchan = xchan_hash
|
||||
@ -186,8 +186,8 @@ dbg(0);
|
||||
"type" => "c",
|
||||
"photo" => $g['micro'],
|
||||
"name" => $g['name'],
|
||||
"id" => intval($g['id']),
|
||||
"network" => $g['network'],
|
||||
"id" => $g['id'],
|
||||
"xid" => $g['hash'],
|
||||
"link" => $g['url'],
|
||||
"nick" => $g['nick'],
|
||||
);
|
||||
|
@ -22,7 +22,11 @@ function chanview_content(&$a) {
|
||||
);
|
||||
}
|
||||
elseif($_REQUEST['url']) {
|
||||
$r = array(array('xchan_url' => $_REQUEST['url']));
|
||||
$r = q("select * from xchan where xchan_url = '%s' limit 1",
|
||||
dbesc($_REQUEST['url'])
|
||||
);
|
||||
if(! $r)
|
||||
$r = array(array('xchan_url' => $_REQUEST['url']));
|
||||
}
|
||||
if($r) {
|
||||
$xchan = $r[0];
|
||||
|
@ -1 +1 @@
|
||||
2012-12-05.160
|
||||
2012-12-06.161
|
||||
|
@ -5,7 +5,7 @@ $(document).ready(function() {
|
||||
minChars: 2,
|
||||
width: 350,
|
||||
});
|
||||
a.setOptions({ params: { autoSubmit: true, type: 'a' }});
|
||||
a.setOptions({ autoSubmit: true, params: { type: 'a' }});
|
||||
|
||||
});
|
||||
|
||||
|
1
view/tpl/micropro_img.tpl
Normal file
1
view/tpl/micropro_img.tpl
Normal file
@ -0,0 +1 @@
|
||||
<div class="contact-block-div{{if $class}} $class{{endif}}"><a class="contact-block-link{{if $class}} $class{{endif}}{{if $click}} fakelink{{endif}}" href="{{if $click}}#{{else}}$url{{endif}}" {{if $click}}onclick="$click"{{endif}}><img class="contact-block-img{{if $class}} $class{{endif}}" src="$photo" title="$title" alt="$name" /></a></div>
|
1
view/tpl/micropro_txt.tpl
Normal file
1
view/tpl/micropro_txt.tpl
Normal file
@ -0,0 +1 @@
|
||||
<div class="contact-block-textdiv{{if $class}} $class{{endif}}"><a class="contact-block-link{{if $class}} $class{{endif}}{{if $click}} fakelink{{endif}}" href="{{if $click}}#{{else}}$url{{endif}}" {{if $click}}onclick="$click"{{endif}} title="$title">$name</a></div>
|
@ -47,16 +47,6 @@
|
||||
{{ if $homepage }}<dl class="homepage"><dt class="homepage-label">$homepage</dt><dd class="homepage-url"><a href="$profile.homepage" >$profile.homepage</a></dd></dl>{{ endif }}
|
||||
|
||||
|
||||
<div id="profile-extra-links">
|
||||
<ul>
|
||||
{{ if $connect }}
|
||||
<li><a id="dfrn-request-link" href="dfrn_request/$profile.nickname">$connect</a></li>
|
||||
{{ endif }}
|
||||
{{ if $wallmessage }}
|
||||
<li><a id="wallmessage-link" href="wallmessage/$profile.nickname">$wallmessage</a></li>
|
||||
{{ endif }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
$contact_block
|
||||
|
@ -2,3 +2,14 @@
|
||||
<div class="fn">$name</div>
|
||||
<div id="profile-photo-wrapper"><img class="vcard-photo photo" src="$photo" alt="name" /></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="profile-extra-links">
|
||||
<ul>
|
||||
{{ if $connect }}
|
||||
<li><a id="follow-link" href="follow?f=&url=$follow">$connect</a></li>
|
||||
{{ endif }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user