diff options
author | Thomas Willingham <founder@kakste.com> | 2012-12-07 22:27:35 +0000 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2012-12-07 22:27:35 +0000 |
commit | 44263d5ac3e5189df28c92f58c2875137052b6ea (patch) | |
tree | 70aa75426f2b3c984faecdb5f684157bccedda3a | |
parent | 555226ada4946b78be5fa2966f5c8532a997953f (diff) | |
parent | 2452b822f909a3cac432a76d8c928733a7683c6a (diff) | |
download | volse-hubzilla-44263d5ac3e5189df28c92f58c2875137052b6ea.tar.gz volse-hubzilla-44263d5ac3e5189df28c92f58c2875137052b6ea.tar.bz2 volse-hubzilla-44263d5ac3e5189df28c92f58c2875137052b6ea.zip |
Merge remote-tracking branch 'upstream/master'
-rw-r--r-- | UPDATES | 2 | ||||
-rw-r--r-- | boot.php | 6 | ||||
-rw-r--r-- | include/Contact.php | 17 | ||||
-rw-r--r-- | include/Photo.php | 2 | ||||
-rw-r--r-- | include/gprobe.php | 52 | ||||
-rw-r--r-- | include/group.php | 16 | ||||
-rw-r--r-- | include/nav.php | 2 | ||||
-rw-r--r-- | include/network.php | 2 | ||||
-rw-r--r-- | include/text.php | 75 | ||||
-rw-r--r-- | include/zot.php | 5 | ||||
-rw-r--r-- | install/database.sql | 8 | ||||
-rw-r--r-- | js/acl.js | 8 | ||||
-rw-r--r-- | mod/acl.php | 42 | ||||
-rw-r--r-- | mod/chanview.php | 6 | ||||
-rw-r--r-- | version.inc | 2 | ||||
-rw-r--r-- | view/js/mod_connections.js | 2 | ||||
-rw-r--r-- | view/tpl/micropro_img.tpl | 1 | ||||
-rw-r--r-- | view/tpl/micropro_txt.tpl | 1 | ||||
-rw-r--r-- | view/tpl/profile_vcard.tpl | 10 | ||||
-rw-r--r-- | view/tpl/xchan_vcard.tpl | 11 |
20 files changed, 130 insertions, 140 deletions
diff --git a/UPDATES b/UPDATES new file mode 100644 index 000000000..8ccae42c8 --- /dev/null +++ b/UPDATES @@ -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);
\ No newline at end of file @@ -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) { diff --git a/include/Contact.php b/include/Contact.php index ff798ed74..e52b5c9cf 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -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 )); } diff --git a/include/Photo.php b/include/Photo.php index f77605b98..c3165cc9f 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -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)) { diff --git a/include/gprobe.php b/include/gprobe.php index 377d40209..e66635302 100644 --- a/include/gprobe.php +++ b/include/gprobe.php @@ -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); - }; - - require_once('include/session.php'); - require_once('include/datetime.php'); - - load_config('config'); - load_config('system'); + cli_startup(); - $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; } diff --git a/include/group.php b/include/group.php index 1019daa9c..35ec72167 100644 --- a/include/group.php +++ b/include/group.php @@ -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) ); diff --git a/include/nav.php b/include/nav.php index eacb0f29a..7db053741 100644 --- a/include/nav.php +++ b/include/nav.php @@ -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' }}); }); diff --git a/include/network.php b/include/network.php index 47fa1d939..333e0e83f 100644 --- a/include/network.php +++ b/include/network.php @@ -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; } diff --git a/include/text.php b/include/text.php index b97b21981..3ca0b3b6d 100644 --- a/include/text.php +++ b/include/text.php @@ -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 = $contact['xchan_url']; - $sparkle = ''; - $redir = false; + $url = chanlink_hash($contact['xchan_hash']); - 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'])) diff --git a/include/zot.php b/include/zot.php index 2d2bc92c6..31f0e8771 100644 --- a/include/zot.php +++ b/include/zot.php @@ -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", diff --git a/install/database.sql b/install/database.sql index 24c9b9922..36b1003ae 100644 --- a/install/database.sql +++ b/install/database.sql @@ -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); diff --git a/mod/acl.php b/mod/acl.php index 7bd11765f..76be01ee6 100644 --- a/mod/acl.php +++ b/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'], ); diff --git a/mod/chanview.php b/mod/chanview.php index abc7fc216..42e5e1ed9 100644 --- a/mod/chanview.php +++ b/mod/chanview.php @@ -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]; diff --git a/version.inc b/version.inc index eeab63b3f..a69a6ee09 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2012-12-05.160 +2012-12-06.161 diff --git a/view/js/mod_connections.js b/view/js/mod_connections.js index b7352d336..6a7f2eaed 100644 --- a/view/js/mod_connections.js +++ b/view/js/mod_connections.js @@ -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' }}); }); diff --git a/view/tpl/micropro_img.tpl b/view/tpl/micropro_img.tpl new file mode 100644 index 000000000..06df22d7b --- /dev/null +++ b/view/tpl/micropro_img.tpl @@ -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> diff --git a/view/tpl/micropro_txt.tpl b/view/tpl/micropro_txt.tpl new file mode 100644 index 000000000..6a6ef6392 --- /dev/null +++ b/view/tpl/micropro_txt.tpl @@ -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> diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl index 216f9665a..7ae62330c 100644 --- a/view/tpl/profile_vcard.tpl +++ b/view/tpl/profile_vcard.tpl @@ -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 diff --git a/view/tpl/xchan_vcard.tpl b/view/tpl/xchan_vcard.tpl index 6bc56ce74..4e3f69b0c 100644 --- a/view/tpl/xchan_vcard.tpl +++ b/view/tpl/xchan_vcard.tpl @@ -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> + |