From d963cdfe48b536a4c5eeeae54acf97493fca304f Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Wed, 2 Dec 2015 20:01:22 +0100 Subject: [PATCH] photos-albms widget: add some classes --- include/identity.php | 16 +++++++++------- mod/photos.php | 10 +++------- mod/videos.php | 10 +++------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/include/identity.php b/include/identity.php index b9984f10a..2230d98a4 100644 --- a/include/identity.php +++ b/include/identity.php @@ -286,13 +286,15 @@ if(! function_exists('profile_sidebar')) { ); } - if((x($profile['page-flags']) == 1) - || (x($profile['page-flags']) == 2) - || (x($profile['page-flags']) == 5)) - $account_type = page_type_translate($profile['page-flags']); - - if(! $account_type) - $account_type = (x($profile['forum']) || x($profile['prv']) || (x($profile['community'])) ? t('Forum') : ""); + // check if profile is a forum + if((x($profile['page-flags']) == 2) + || (x($profile['page-flags']) == 5) + || (x($profile['forum'])) + || (x($profile['prv'])) + || (x($profile['community']))) + $account_type = t('Forum'); + else + $account_type = ""; if((x($profile,'address') == 1) || (x($profile,'locality') == 1) diff --git a/mod/photos.php b/mod/photos.php index 7ca850bc9..6b97d7d4f 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -37,14 +37,10 @@ function photos_init(&$a) { $profile = get_profiledata_by_nick($nick, $a->profile_uid); - if((x($profile['page-flags']) == 1) - || (x($profile['page-flags']) == 2) - || (x($profile['page-flags']) == 5)) { - $account_type = page_type_translate($profile['page-flags']); - } - else { + if((x($profile['page-flags']) == 2) || (x($profile['page-flags']) == 5)) + $account_type = t('Forum'); + else $account_type = ""; - } $tpl = get_markup_template("vcard-widget.tpl"); diff --git a/mod/videos.php b/mod/videos.php index de9feac06..707606769 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -33,14 +33,10 @@ function videos_init(&$a) { $profile = get_profiledata_by_nick($nick, $a->profile_uid); - if((x($profile['page-flags']) == 1) - || (x($profile['page-flags']) == 2) - || (x($profile['page-flags']) == 5)) { - $account_type = page_type_translate($profile['page-flags']); - } - else { + if((x($profile['page-flags']) == 2) || (x($profile['page-flags']) == 5)) + $account_type = t('Forum'); + else $account_type = ""; - } $tpl = get_markup_template("vcard-widget.tpl");