// count if ($users_count) { $box['bar'] += array('_count' => sprintf(i18n::ns('%d participant', '%d participants', $users_count), $users_count)); } // add to the watch list -- $in_watch_list is set in sections/view.php if (Surfer::get_id() && $in_watch_list == 'N') { Skin::define_img('TOOLS_WATCH_IMG', 'tools/watch.gif'); $box['bar'] += array(Users::get_url('section:' . $item['id'], 'track') => TOOLS_WATCH_IMG . i18n::s('Watch this section')); } // invite participants, for owners if (Sections::is_owned($item, $anchor, TRUE) && isset($context['with_email']) && $context['with_email'] == 'Y') { Skin::define_img('SECTIONS_INVITE_IMG', 'sections/invite.gif'); $box['bar'] += array(Sections::get_url($item['id'], 'invite') => SECTIONS_INVITE_IMG . i18n::s('Invite participants')); } // notify participants if ($count > 1 && Sections::allow_message($item, $anchor) && isset($context['with_email']) && $context['with_email'] == 'Y') { Skin::define_img('SECTIONS_EMAIL_IMG', 'sections/email.gif'); $box['bar'] += array(Sections::get_url($item['id'], 'mail') => SECTIONS_EMAIL_IMG . i18n::s('Notify participants')); } // manage editors, for owners if (Sections::is_owned($item, $anchor, TRUE) || Surfer::is_associate()) { Skin::define_img('SECTIONS_ASSIGN_IMG', 'sections/assign.gif'); $box['bar'] += array(Users::get_url('section:' . $item['id'], 'select') => SECTIONS_ASSIGN_IMG . i18n::s('Manage participants')); // leave this section, for editors } elseif (Sections::is_assigned($item['id'])) { Skin::define_img('SECTIONS_ASSIGN_IMG', 'sections/assign.gif'); $box['bar'] += array(Users::get_url('section:' . $item['id'], 'leave') => SECTIONS_ASSIGN_IMG . i18n::s('Leave this section')); } // headers $headers = array(i18n::s('Person'), i18n::s('Watcher'), i18n::s('Editor'), i18n::s('Owner')); // layout columns
$id = $context['arguments'][0]; } $id = strip_tags($id); // get the item from the database $item = Sections::get($id); // get the related anchor, if any $anchor = NULL; if (isset($item['anchor'])) { $anchor = Anchors::get($item['anchor']); } $overlay = NULL; if (isset($item['overlay'])) { $overlay = Overlay::load($item, 'section:' . $item['id']); } // check surfer capability if (Sections::allow_message($item, $anchor)) { $permitted = TRUE; } else { $permitted = FALSE; } // load the skin, maybe with a variant load_skin('sections', $anchor, isset($item['options']) ? $item['options'] : ''); // clear the tab we are in, if any if (is_object($anchor)) { $context['current_focus'] = $anchor->get_focus(); } // path to this page if (is_object($anchor)) { $context['path_bar'] = $anchor->get_path_bar(); } else { $context['path_bar'] = array('sections/' => i18n::s('Site map'));