From 8b615133d528eb074a23746afef6201f474a4e3f Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Wed, 31 Aug 2011 17:31:44 +0200 Subject: remove html from profile vcard code --- include/text.php | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 66447069e..075caee00 100644 --- a/include/text.php +++ b/include/text.php @@ -539,22 +539,30 @@ function contact_block() { $total = intval($r[0]['total']); } if(! $total) { - $o .= '

' . t('No contacts') . '

'; - return $o; - } - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 ORDER BY RAND() LIMIT %d", - intval($a->profile['uid']), - intval($shown) - ); - if(count($r)) { - $o .= '

' . sprintf( tt('%d Contact','%d Contacts', $total),$total) . '

'; - foreach($r as $rr) { - $o .= micropro($rr,true,'mpfriend'); - } - $o .= '
'; - $o .= '
' . t('View Contacts') . '
'; + $contacts = t('No contacts'); + $micropro = Null; + } else { + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 ORDER BY RAND() LIMIT %d", + intval($a->profile['uid']), + intval($shown) + ); + if(count($r)) { + $contacts = sprintf( tt('%d Contact','%d Contacts', $total),$total); + $micropro = Array(); + foreach($r as $rr) { + $micropro[] = micropro($rr,true,'mpfriend'); + } + } } + + $tpl = get_markup_template('contact_block.tpl'); + $o = replace_macros($tpl, array( + '$contacts' => $contacts, + '$nickname' => $a->profile['nickname'], + '$viewcontacts' => t('View Contacts'), + '$micropro' => $micropro, + )); $arr = array('contacts' => $r, 'output' => $o); -- cgit v1.2.3 From 6b6f45f9f1c0fa5c0142c0bf1d9a93b77694ea4b Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Fri, 16 Sep 2011 12:51:14 +0200 Subject: quattro: initial style of conversations --- include/text.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 1f038c49c..a22faa1a5 100644 --- a/include/text.php +++ b/include/text.php @@ -834,9 +834,14 @@ function feed_salmonlinks($nick) { if(! function_exists('get_plink')) { function get_plink($item) { $a = get_app(); - $plink = (((x($item,'plink')) && (! $item['private'])) ? '' : ''); - return $plink; + if (x($item,'plink') && (! $item['private'])){ + return array( + 'href' => $item['plink'], + 'title' => t('link to source'), + ); + } else { + return false; + } }} if(! function_exists('unamp')) { -- cgit v1.2.3