]> git.mxchange.org Git - friendica.git/commitdiff
group/community/celebrity pages
authorMike Macgirvin <mike@macgirvin.com>
Mon, 18 Oct 2010 07:43:49 +0000 (00:43 -0700)
committerMike Macgirvin <mike@macgirvin.com>
Mon, 18 Oct 2010 07:43:49 +0000 (00:43 -0700)
13 files changed:
boot.php
mod/contacts.php
mod/dfrn_poll.php
mod/display.php
mod/group.php
mod/network.php
mod/photos.php
mod/profile.php
mod/redir.php
mod/settings.php
view/acl_selectors.php
view/settings.tpl
view/theme/default/style.css

index 3bc8d2983da619baf071aaf94ba1ef8e5e0a9ebf..786ebdee68a0595215b5189863c632fd98e4ecd2 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -567,7 +567,7 @@ function xml_status($st, $message = '') {
 if(! function_exists('local_user')) {
 function local_user() {
        if((x($_SESSION,'authenticated')) && (x($_SESSION,'uid')))
-               return $_SESSION['uid'];
+               return intval($_SESSION['uid']);
        return false;
 }}
 
@@ -576,7 +576,7 @@ function local_user() {
 if(! function_exists('remote_user')) {
 function remote_user() {
        if((x($_SESSION,'authenticated')) && (x($_SESSION,'visitor_id')))
-               return $_SESSION['visitor_id'];
+               return intval($_SESSION['visitor_id']);
        return false;
 }}
 
index dfd98961be7fcd07747473b67917a10b68e4efe3..dbad2a15867b9904d10841bdc27fb64fd2ace7ae 100644 (file)
@@ -172,7 +172,7 @@ function contacts_content(&$a) {
                                break;
                }
 
-               if($r[0]['rel'] != REL_FAN) {
+               if(($r[0]['network'] === 'dfrn') && ($r[0]['rel'])) {
                        $url = "redir/{$r[0]['id']}";
                        $sparkle = ' class="sparkle" ';
                }
@@ -272,7 +272,7 @@ function contacts_content(&$a) {
                                        break;
                        }
 
-                       if($rr['rel'] != REL_FAN) {
+                       if(($rr['network'] === 'dfrn') && ($rr['rel'])) {
                                $url = "redir/{$rr['id']}";
                                $sparkle = ' class="sparkle" ';
                        }
index fc663f797709d2009fca50785056060ef5dbbadc..84c249a58ddfc42a72441de009bc18829475ced6 100644 (file)
@@ -38,7 +38,7 @@ function dfrn_poll_init(&$a) {
                $sql_extra = '';
                switch($direction) {
                        case (-1):
-                               $sql_extra = sprintf(" AND `dfrn-id` = '%s' ", dbesc($dfrn_id));
+                               $sql_extra = sprintf(" AND ( `dfrn-id` = '%s' OR `issued-id` = '%s' ) ", dbesc($dfrn_id),dbesc($dfrn_id));
                                $my_id = $dfrn_id;
                                break;
                        case 0:
@@ -56,7 +56,10 @@ function dfrn_poll_init(&$a) {
 
                $r = q("SELECT `contact`.*, `user`.`nickname` 
                        FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
-                       WHERE `contact`.`blocked` = 0 AND `contact`.`pending` = 0 $sql_extra LIMIT 1");
+                       WHERE `contact`.`blocked` = 0 AND `contact`.`pending` = 0 
+                       AND `user`.`nickname` = '%s' $sql_extra LIMIT 1",
+                       dbesc($a->argv[1])
+               );
                
                if(count($r)) {
 
index d8aca43e4d90dc6bfc576d07398bd8980e6edaa3..2b721aef8ad944221f6b7fce203039417b73ceae 100644 (file)
@@ -86,7 +86,7 @@ function display_content(&$a) {
 
        $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, 
                `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
-               `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, 
+               `contact`.`network`, `contact`.`thumb`, `contact`.`self`, 
                `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
                FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
                WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
@@ -116,7 +116,7 @@ function display_content(&$a) {
                        $sparkle = '';
                        if(($item['verb'] == ACTIVITY_LIKE) && ($item['id'] != $item['parent'])) {
                                $url = $item['url'];
-                               if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) {
+                               if(($item['network'] === 'dfrn') && (! $item['self'])) {
                                        $url = $a->get_baseurl() . '/redir/' . $item['contact-id'];
                                        $sparkle = ' class="sparkle"';
                                }
@@ -127,7 +127,7 @@ function display_content(&$a) {
                        }
                        if(($item['verb'] == ACTIVITY_DISLIKE) && ($item['id'] != $item['parent'])) {
                                $url = $item['url'];
-                               if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) { 
+                               if(($item['network'] === 'dfrn') && (! $item['self'])) { 
                                        $url = $a->get_baseurl() . '/redir/' . $item['contact-id'];
                                        $sparkle = ' class="sparkle"';
                                }
@@ -180,7 +180,7 @@ function display_content(&$a) {
 
                        $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
 
-                       if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'] )) {
+                       if(($item['network'] === 'dfrn') && (! $item['self'] )) {
                                $profile_url = $redirect_url;
                                $sparkle = ' sparkle';
                        }
@@ -209,7 +209,7 @@ function display_content(&$a) {
                                        $template = $wallwall;
                                        $commentww = 'ww';
                                        // If it is our contact, use a friendly redirect link
-                                       if(($item['owner-link'] == $item['url']) && ($item['rel'] == REL_VIP || $item['rel'] == REL_BUD)) {
+                                       if(($item['owner-link'] == $item['url']) && ($item['network'] === 'dfrn')) {
                                                $owner_url = $redirect_url;
                                                $osparkle = ' sparkle';
                                        }
index dc5dd3c71264d1a0ac59c3fd8adf66f60d43a4d1..56c3e21d1e0ae372598a9cfeb849a194c3423b27 100644 (file)
@@ -136,12 +136,14 @@ function group_content(&$a) {
                        '$delete' => t('Delete')
                ));
 
+               $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
+
                $tpl = load_view_file('view/group_edit.tpl');
                $o .= replace_macros($tpl, array(
                        '$gid' => $group['id'],
                        '$name' => $group['name'],
                        '$drop' => $drop_txt,
-                       '$selector' => contact_select('group_members_select','group_members_select',$preselected,25)
+                       '$selector' => contact_select('group_members_select','group_members_select',$preselected,25,false,$celeb)
                ));
 
        }
index 9d12d4346d7c4f9ca3ae064f1c163acd7ae0e363..347b7817faaf8566060611653978cb3431f4df4d 100644 (file)
@@ -41,13 +41,15 @@ function network_content(&$a, $update = 0) {
                        else
                                $lockstate = 'unlock';
 
+               $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
+
                $o .= replace_macros($tpl,array(
                        '$return_path' => $a->cmd,
                        '$baseurl' => $a->get_baseurl(),
                        '$defloc' => $a->user['default-location'],
                        '$visitor' => 'block',
                        '$lockstate' => $lockstate,
-                       '$acl' => populate_acl(($group) ? $group_acl : $a->user),
+                       '$acl' => populate_acl((($group) ? $group_acl : $a->user), $celeb),
                        '$bang' => (($group) ? '!' : ''),
                        '$profile_uid' => $_SESSION['uid']
                ));
@@ -111,7 +113,7 @@ function network_content(&$a, $update = 0) {
 
        $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, 
                `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
-               `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, 
+               `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, 
                `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
                FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
                WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
@@ -139,7 +141,7 @@ function network_content(&$a, $update = 0) {
 
                        if(($item['verb'] == ACTIVITY_LIKE) && ($item['id'] != $item['parent'])) {
                                $url = $item['url'];
-                               if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) { 
+                               if(($item['network'] === 'dfrn') && (! $item['self'])) { 
                                        $url = $a->get_baseurl() . '/redir/' . $item['contact-id'];
                                        $sparkle = ' class="sparkle"';
                                }
@@ -150,7 +152,7 @@ function network_content(&$a, $update = 0) {
                        }
                        if(($item['verb'] == ACTIVITY_DISLIKE) && ($item['id'] != $item['parent'])) {
                                $url = $item['url'];
-                               if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) { 
+                               if(($item['network'] === 'dfrn') && (! $item['self'])) { 
                                        $url = $a->get_baseurl() . '/redir/' . $item['contact-id'];
                                        $sparkle = ' class="sparkle"';
                                }
@@ -202,7 +204,7 @@ function network_content(&$a, $update = 0) {
                                        $commentww = 'ww';
                                        // If it is our contact, use a friendly redirect link
                                        if(($item['owner-link'] == $item['url']) 
-                                               && ($item['rel'] == REL_VIP || $item['rel'] == REL_BUD)) {
+                                               && ($item['network'] === 'dfrn')) {
                                                $owner_url = $redirect_url;
                                                $osparkle = ' sparkle';
                                        }
@@ -238,7 +240,7 @@ function network_content(&$a, $update = 0) {
 
 
        
-                       if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'] )) {
+                       if(($item['network'] === 'dfrn') && (! $item['self'] )) {
                                $profile_url = $redirect_url;
                                $sparkle = ' sparkle';
                        }
index 35b03845d7703ef18b8600f366f4b879eb0c6c50..767c02543fb3b79dd608762235b4ca89ab94c90e 100644 (file)
@@ -480,6 +480,9 @@ function photos_content(&$a) {
                                $albumselect .= '<option value="' . $album['album'] . '">' . $album['album'] . '</option>';
                        }
                }
+
+               $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
+
                $albumselect .= '</select>';
                $tpl = load_view_file('view/photos_upload.tpl');
                $o .= replace_macros($tpl,array(
@@ -490,7 +493,7 @@ function photos_content(&$a) {
                        '$filestext' => t('Select files to upload: '),
                        '$albumselect' => $albumselect,
                        '$permissions' => t('Permissions'),
-                       '$aclselect' => populate_acl($a->user),
+                       '$aclselect' => populate_acl($a->user, $celeb),
                        '$archive' => $a->get_baseurl() . '/jumploader_z.jar',
                        '$nojava' => t('Use the following controls only if the Java uploader [above] fails to launch.'),
                        '$uploadurl' => $a->get_baseurl() . '/photos',
@@ -633,8 +636,8 @@ function photos_content(&$a) {
 
 
                        $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, 
-                               `contact`.`name`, `contact`.`photo`, `contact`.`url`, 
-                               `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, 
+                               `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`network`, 
+                               `contact`.`rel`, `contact`.`thumb`, `contact`.`self`, 
                                `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
                                FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
                                WHERE `parent-uri` = '%s' AND `uri` != '%s' AND `item`.`deleted` = 0
@@ -724,7 +727,7 @@ function photos_content(&$a) {
 
 
                                        if(local_user() && ($item['contact-uid'] == get_uid()) 
-                                               && ($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'] )) {
+                                               && ($item['network'] == 'dfrn') && (! $item['self'] )) {
                                                $profile_url = $redirect_url;
                                                $sparkle = ' sparkle';
                                        }
index de0ae5745a3b31c73327c113c6af41fff3ae90b4..b72c279e2f9716bcd96b4fcda3cab7ab787d3e2b 100644 (file)
@@ -138,6 +138,7 @@ function profile_content(&$a, $update = 0) {
                        return $o;
                }
 
+               $celeb = ((($a->profile['page-flags'] == PAGE_SOAPBOX) || ($a->profile['page-flags'] == PAGE_COMMUNITY)) ? true : false);
                if(can_write_wall($a,$a->profile['profile_uid'])) {
                        $tpl = load_view_file('view/jot-header.tpl');
        
@@ -156,7 +157,7 @@ function profile_content(&$a, $update = 0) {
                                '$visitor' => (($_SESSION['uid'] == $a->profile['profile_uid']) ? 'block' : 'none'),
                                '$lockstate' => $lockstate,
                                '$bang' => '',
-                               '$acl' => (($_SESSION['uid'] == $a->profile['profile_uid']) ? populate_acl($a->user) : ''),
+                               '$acl' => (($_SESSION['uid'] == $a->profile['profile_uid']) ? populate_acl($a->user, $celeb) : ''),
                                '$profile_uid' => $a->profile['profile_uid']
                        ));
                }
@@ -231,8 +232,8 @@ function profile_content(&$a, $update = 0) {
                $a->set_pager_total($r[0]['total']);
 
        $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, 
-               `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, 
-               `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, 
+               `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`network`, `contact`.`rel`, 
+               `contact`.`thumb`, `contact`.`self`, 
                `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
                FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
                WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
@@ -272,7 +273,7 @@ function profile_content(&$a, $update = 0) {
                        
                        if(($item['verb'] == ACTIVITY_LIKE) && ($item['id'] != $item['parent'])) {
                                $url = $item['url'];
-                               if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) {
+                               if(($item['network'] === 'dfrn') && (! $item['self'])) {
                                        $url = $a->get_baseurl() . '/redir/' . $item['contact-id'];
                                        $sparkle = ' class="sparkle" ';
                                }
@@ -283,7 +284,7 @@ function profile_content(&$a, $update = 0) {
                        }
                        if(($item['verb'] == ACTIVITY_DISLIKE) && ($item['id'] != $item['parent'])) {
                                $url = $item['url'];
-                               if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) { 
+                               if(($item['network'] === 'dfrn') && (! $item['self'])) { 
                                        $url = $a->get_baseurl() . '/redir/' . $item['contact-id'];
                                        $sparkle = ' class="sparkle" ';
                                }
@@ -338,7 +339,7 @@ function profile_content(&$a, $update = 0) {
                        // I can go directly to their profile as an authenticated guest.
 
                        if(local_user() && ($item['contact-uid'] == $_SESSION['uid']) 
-                               && ($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'] )) {
+                               && ($item['network'] === 'dfrn') && (! $item['self'] )) {
                                $profile_url = $redirect_url;
                                $sparkle = ' sparkle';
                        }
index c9b284ddd2a67659cd76fa1ca617433e1228a317..e743d003e53d0c18d287c95f28cfbe9cf8142cf2 100644 (file)
@@ -4,14 +4,15 @@ function redir_init(&$a) {
 
        if((! local_user()) || (! ($a->argc == 2)) || (! intval($a->argv[1])))
                goaway($a->get_baseurl());
-       $r = q("SELECT `issued-id`, `dfrn-id`, `duplex`, `poll` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+       $r = q("SELECT `network`, `issued-id`, `dfrn-id`, `duplex`, `poll` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                intval($a->argv[1]),
-               intval($_SESSION['uid']));
-       if(! count($r))
+               intval(get_uid())
+       );
+       if((! count($r)) || ($r[0]['network'] !== 'dfrn'))
                goaway($a->get_baseurl());
 
+       $dfrn_id = $orig_id = (($r[0]['issued-id']) ? $r[0]['issued-id'] : $r[0]['dfrn-id']);
 
-       $dfrn_id = $orig_id = $r[0]['issued-id'];
        if($r[0]['duplex'] && $r[0]['issued-id']) {
                $orig_id = $r[0]['issued-id'];
                $dfrn_id = '1:' . $orig_id;
index 5caf08b04b2865d06bd8329a4171b0485df31586..7adc5e6de35a30fc448a1909b5502e69292bde0c 100644 (file)
@@ -57,6 +57,7 @@ function settings_post(&$a) {
        $publish          = (($_POST['profile_in_directory'] == 1) ? 1: 0);
        $net_publish      = (($_POST['profile_in_netdirectory'] == 1) ? 1: 0);
        $old_visibility   = ((intval($_POST['visibility']) == 1) ? 1 : 0);
+       $page_flags       = ((intval($_POST['page-flags'])) ? intval($_POST['page-flags']) : 0);
 
        $notify = 0;
 
@@ -103,7 +104,7 @@ function settings_post(&$a) {
        $str_group_deny    = perms2str($_POST['group_deny']);
        $str_contact_deny  = perms2str($_POST['contact_deny']);
 
-       $r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `timezone` = '%s',  `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `default-location` = '%s', `theme` = '%s'  WHERE `uid` = %d LIMIT 1",
+       $r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `timezone` = '%s',  `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `theme` = '%s'  WHERE `uid` = %d LIMIT 1",
                        dbesc($username),
                        dbesc($email),
                        dbesc($timezone),
@@ -112,6 +113,7 @@ function settings_post(&$a) {
                        dbesc($str_contact_deny),
                        dbesc($str_group_deny),
                        intval($notify),
+                       intval($page_flags),
                        dbesc($defloc),
                        dbesc($theme),
                        intval(get_uid())
@@ -176,6 +178,18 @@ function settings_content(&$a) {
        if(! strlen($a->user['timezone']))
                $timezone = date_default_timezone_get();
 
+       $pageset_tpl = load_view_file('view/pagetypes.tpl');
+       $pagetype = replace_macros($pageset_tpl,array(
+               '$normal'         => (($profile['page-flags'] == PAGE_NORMAL)      ? " checked=\"checked\" " : ""),
+               '$soapbox'        => (($profile['page-flags'] == PAGE_SOAPBOX)     ? " checked=\"checked\" " : ""),
+               '$community'      => (($profile['page-flags'] == PAGE_COMMUNITY)   ? " checked=\"checked\" " : ""),
+               '$freelove'       => (($profile['page-flags'] == PAGE_FREELOVE)    ? " checked=\"checked\" " : ""),
+               '$page_normal'    => PAGE_NORMAL,
+               '$page_soapbox'   => PAGE_SOAPBOX,
+               '$page_community' => PAGE_COMMUNITY,
+               '$page_freelove'  => PAGE_FREELOVE
+       ));
+
 
        $opt_tpl = load_view_file("view/profile-in-directory.tpl");
        $profile_in_dir = replace_macros($opt_tpl,array(
@@ -234,6 +248,8 @@ function settings_content(&$a) {
 
        $stpl = load_view_file('view/settings.tpl');
 
+       $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
+
        $o .= replace_macros($stpl,array(
                '$baseurl' => $a->get_baseurl(),
                '$uid' => $_SESSION['uid'],
@@ -247,13 +263,14 @@ function settings_content(&$a) {
                '$profile_in_net_dir' => $profile_in_net_dir,
                '$permissions' => t('Default Post Permissions'),
                '$visibility' => $profile['net-publish'],
-               '$aclselect' => populate_acl($a->user),
+               '$aclselect' => populate_acl($a->user,$celeb),
                '$sel_notify1' => (($notify & NOTIFY_INTRO)   ? ' checked="checked" ' : ''),
                '$sel_notify2' => (($notify & NOTIFY_CONFIRM) ? ' checked="checked" ' : ''),
                '$sel_notify3' => (($notify & NOTIFY_WALL)    ? ' checked="checked" ' : ''),
                '$sel_notify4' => (($notify & NOTIFY_COMMENT) ? ' checked="checked" ' : ''),
                '$sel_notify5' => (($notify & NOTIFY_MAIL)    ? ' checked="checked" ' : ''),
-               '$theme' => $theme_selector
+               '$theme' => $theme_selector,
+               '$pagetype' => $pagetype
        ));
 
        return $o;
index 388b75ebb46894d2e841e43297a56a96d2c46d17..7ad97dfd2c8eb7376fa9f94a4dda70254080dadc 100644 (file)
@@ -30,21 +30,24 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
 
 
 
-function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false) {
+function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false) {
 
        $o = '';
 
        // When used for private messages, we limit correspondence to mutual friends and the selector
        // to one recipient. By default our selector allows multiple selects amongst all contacts.
 
-       if($privmail) {
+       $sql_extra = '';
+
+       if($privmail || $celeb) {
                $sql_extra = sprintf(" AND `rel` = %d ", intval(REL_BUD));
-               $o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" >\r\n";
        }
-       else {
-               $sql_extra = '';
+
+       if($privmail)
+               $o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" >\r\n";
+       else 
                $o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" >\r\n";
-       }
+
 
        $r = q("SELECT `id`, `name`, `url` FROM `contact` 
                WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 
@@ -73,7 +76,7 @@ function fixacl(&$item) {
        $item = intval(str_replace(array('<','>'),array('',''),$item));
 }
 
-function populate_acl($user = null) {
+function populate_acl($user = null,$celeb = false) {
 
        $allow_cid = $allow_gid = $deny_cid = $deny_gid = false;
 
@@ -104,7 +107,7 @@ function populate_acl($user = null) {
        $o .= '</div>';
        $o .= '<div id="contact_allow_wrapper">';
        $o .= '<label id="acl-allow-contact-label" for="contact_allow" >' . t('Contacts') . '</label>';
-       $o .= contact_select('contact_allow','contact_allow',$allow_cid);
+       $o .= contact_select('contact_allow','contact_allow',$allow_cid,4,false,$celeb);
        $o .= '</div>';
        $o .= '</div>' . "\r\n";
        $o .= '<div id="acl-allow-end"></div>' . "\r\n";
@@ -119,7 +122,7 @@ function populate_acl($user = null) {
        $o .= '</div>';
        $o .= '<div id="contact_deny_wrapper" >';
        $o .= '<label id="acl-deny-contact-label" for="contact_deny" >' . t('Contacts') . '</label>';
-       $o .= contact_select('contact_deny','contact_deny', $deny_cid);
+       $o .= contact_select('contact_deny','contact_deny', $deny_cid,4,false, $celeb);
        $o .= '</div>';
        $o .= '</div>' . "\r\n";
        $o .= '<div id="acl-deny-end"></div>' . "\r\n";
index da330bcd18717b839ddd1ccd73ba55fb92effeae..e06671d371b8e9541cb36e74b9688c6625df1fec 100644 (file)
@@ -5,8 +5,11 @@ $nickname_block
 
 <form action="settings" id="settings-form" method="post" >
 
+
+<h3 class="settings-heading">Basic Settings</h3>
+
 <div id="settings-username-wrapper" >
-<label id="settings-username-label" for="settings-username" >Username: </label>
+<label id="settings-username-label" for="settings-username" >Full Name: </label>
 <input type="text" name="username" id="settings-username" value="$username" />
 </div>
 <div id="settings-username-end" ></div>
@@ -38,6 +41,14 @@ $theme
 </div>
 <div id="settings-theme-end"></div>
 
+<div id="settings-submit-wrapper" >
+<input type="submit" name="submit" id="settings-submit" value="Submit" />
+</div>
+
+
+<h3 class="settings-heading">Privacy Settings</h3>
+
+
 <input type="hidden" name="visibility" value="$visibility" />
 
 $profile_in_dir
@@ -56,26 +67,43 @@ $profile_in_net_dir
 </div>
 <div id="settings-default-perms-end"></div>
 
+<div id="settings-submit-wrapper" >
+<input type="submit" name="submit" id="settings-submit" value="Submit" />
+</div>
+
+
+
+<h3 class="settings-heading">Notification Settings</h3>
+
+
 <div id="settings-notify-wrapper">
-<div id="settings-notify-desc">Send me a notification email when: </div>
-<label for="notify1" id="settings-label-notify1">I receive an introduction</label>
+<div id="settings-notify-desc">Send a notification email when: </div>
+<label for="notify1" id="settings-label-notify1">You receive an introduction</label>
 <input id="notify1" type="checkbox" $sel_notify1 name="notify1" value="1" />
 <div id="notify1-end"></div>
-<label for="notify2" id="settings-label-notify2">My introductions are confirmed</label>
+<label for="notify2" id="settings-label-notify2">Your introductions are confirmed</label>
 <input id="notify2" type="checkbox" $sel_notify2 name="notify2" value="2" />
 <div id="notify2-end"></div>
-<label for="notify3" id="settings-label-notify3">Someone writes on my profile wall</label>
+<label for="notify3" id="settings-label-notify3">Someone writes on your profile wall</label>
 <input id="notify3" type="checkbox" $sel_notify3 name="notify3" value="4" />
 <div id="notify3-end"></div>
 <label for="notify4" id="settings-label-notify4">Someone writes a followup comment</label>
 <input id="notify4" type="checkbox" $sel_notify4 name="notify4" value="8" />
 <div id="notify4-end"></div>
-<label for="notify5" id="settings-label-notify5">I receive a private message</label>
+<label for="notify5" id="settings-label-notify5">You receive a private message</label>
 <input id="notify5" type="checkbox" $sel_notify5 name="notify5" value="16" />
 <div id="notify5-end"></div>
 </div>
 <div id="settings=notify-end"></div>
 
+<div id="settings-submit-wrapper" >
+<input type="submit" name="submit" id="settings-submit" value="Submit" />
+</div>
+
+
+<h3 class="settings-heading">Password Settings</h3>
+
+
 <div id="settings-password-wrapper" >
 <p id="settings-password-desc" >
 Leave password fields blank unless changing
@@ -92,14 +120,20 @@ Leave password fields blank unless changing
 <div id="settings-confirm-end" ></div>
 
 
+<div id="settings-submit-wrapper" >
+<input type="submit" name="submit" id="settings-submit" value="Submit" />
+</div>
 
 
+<h3 class="settings-heading">Advanced Page Settings</h3>
 
+$pagetype
 
 <div id="settings-submit-wrapper" >
 <input type="submit" name="submit" id="settings-submit" value="Submit" />
 </div>
 
+
 </form>
 
 
index af84e06fa0d7a16ef7a7c3ad6dd2923b07b1dfc4..237264df492e63ef669435f7fa011a93961283a4 100644 (file)
@@ -666,7 +666,11 @@ input#dfrn-url {
 #profile-in-netdir-yes,
 #profile-in-netdir-no,
 #hide-friends-yes,
-#hide-friends-no {
+#hide-friends-no,
+#settings-normal,
+#settings-soapbox,
+#settings-community,
+#settings-freelove {
        float: left;
        margin-bottom: 20px;
 }
@@ -686,6 +690,20 @@ input#dfrn-url {
        float: left;
        margin-bottom: 35px;
 }
+#settings-normal-label,
+#settings-soapbox-label,
+#settings-community-label,
+#settings-freelove-label {
+       float: left;
+       width: 200px;
+}
+#settings-normal-desc,
+#settings-soapbox-desc,
+#settings-community-desc,
+#settings-freelove-desc {
+       float: left;
+       margin-left: 75px;
+}
 
 #profile-edit-profile-name-end,
 #profile-edit-name-end,
@@ -706,7 +724,11 @@ input#dfrn-url {
 #profile-in-netdir-break,
 #profile-in-netdir-end,
 #hide-friends-break,
-#hide-friends-end {
+#hide-friends-end,
+#settings-normal-break,
+#settings-soapbox-break,
+#settings-community-break,
+#settings-freelove-break {
        clear: both;
 }