diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
index c0ca82b41..b4d7de179 100644
--- a/view/theme/diabook/theme.php
+++ b/view/theme/diabook/theme.php
@@ -37,6 +37,7 @@ load_config("diabook");
load_pconfig(local_user(), "diabook");
//get statuses of boxes at right-hand-column
+$close_pages = get_diabook_config( "close_pages", 0 );
$close_profiles = get_diabook_config( "close_profiles", 0 );
$close_helpers = get_diabook_config( "close_helpers", 0 );
$close_services = get_diabook_config( "close_services", 0 );
@@ -301,6 +302,11 @@ if ($color=="dark") $color_path = "/diabook-dark/";
document.getElementById( "close_mapquery" ).style.display = "none";
};
+ if('.$close_pages.')
+ {
+ document.getElementById( "close_pages" ).style.display = "none";
+ };
+
if('.$close_profiles.')
{
document.getElementById( "close_profiles" ).style.display = "none";
@@ -362,6 +368,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
function diabook_community_info() {
$a = get_app();
+ $close_pages = get_diabook_config( "close_pages", 0 );
$close_profiles = get_diabook_config( "close_profiles", 0 );
$close_helpers = get_diabook_config( "close_helpers", 0 );
$close_services = get_diabook_config( "close_services", 0 );
@@ -372,6 +379,43 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$close_twitter = get_diabook_config( "close_twitter", 1 );
$close_mapquery = get_diabook_config( "close_mapquery", 1 );
+ //Community_Pages at right_aside
+ if($close_pages != "1") {
+ if(local_user()) {
+ $page = '
+
'.t("Community Pages").'
+ ';
+
+ $pagelist = array();
+
+ $contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact`
+ WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d
+ ORDER BY `name` ASC",
+ intval($a->user['uid'])
+ );
+
+ $pageD = array();
+
+ // Look if the profile is a community page
+ foreach($contacts as $contact) {
+ $pageD[] = array("url"=>$contact["url"], "name"=>$contact["name"], "id"=>$contact["id"], "micro"=>$contact['micro']);
+ };
+
+
+ $contacts = $pageD;
+
+ foreach($contacts as $contact) {
+ $page .= '- '.
+ $contact["name"]."
";
+ }
+ $page .= '
';
+ //if (sizeof($contacts) > 0)
+ $aside['$page'] = $page;
+ }
+ }
+ //END Community Page
+
// comunity_profiles
if($close_profiles != "1") {
$aside['$comunity_profiles_title'] = t('Community Profiles');
@@ -575,6 +619,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
}
//end twitter
if($ccCookie != "10") {
+ $close_pages = get_diabook_config( "close_pages", 0 );
$close_profiles = get_diabook_config( "close_profiles", 0 );
$close_helpers = get_diabook_config( "close_helpers", 0 );
$close_services = get_diabook_config( "close_services", 0 );
@@ -587,6 +632,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$close_or_not = array('1'=>t("don't show"), '0'=>t("show"),);
$boxsettings['title'] = Array("", t('Show/hide boxes at right-hand column:'), "", "");
$aside['$boxsettings'] = $boxsettings;
+ $aside['$close_pages'] = array('diabook_close_pages', t('Community Pages'), $close_pages, '', $close_or_not);
$aside['$close_mapquery'] = array('diabook_close_mapquery', t('Earth Layers'), $close_mapquery, '', $close_or_not);
$aside['$close_profiles'] = array('diabook_close_profiles', t('Community Profiles'), $close_profiles, '', $close_or_not);
$aside['$close_helpers'] = array('diabook_close_helpers', t('Help or @NewHere ?'), $close_helpers, '', $close_or_not);
@@ -600,6 +646,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$baseurl = $a->get_baseurl($ssl_state);
$aside['$baseurl'] = $baseurl;
if (isset($_POST['diabook-settings-box-sub']) && $_POST['diabook-settings-box-sub']!=''){
+ set_pconfig(local_user(), 'diabook', 'close_pages', $_POST['diabook_close_pages']);
set_pconfig(local_user(), 'diabook', 'close_mapquery', $_POST['diabook_close_mapquery']);
set_pconfig(local_user(), 'diabook', 'close_profiles', $_POST['diabook_close_profiles']);
set_pconfig(local_user(), 'diabook', 'close_helpers', $_POST['diabook_close_helpers']);