if (trim($sections)) { $idsurf = Surfer::get_id(); $label = $item['id'] == $idsurf ? i18n::s('My sections') : i18n::s('Sections'); $panels[] = array('sections', $label, 'sections_panel', $sections); } // // the information tab // $information = ''; // if not at another follow-up page if (!$zoom_type) { // co-browsing if (Surfer::get_id() && Surfer::get_id() != $item['id']) { $visited = array(); // some page or thread has been visited recently if ($items = Visits::list_for_user($item['id'])) { foreach ($items as $url => $label) { $visited = array_merge($visited, array($url => sprintf(i18n::s('Join %s at %s'), $item['nick_name'], $label))); } // user is present if active during last 10 minutes (10*60 = 600), but not at some thread } elseif (isset($item['click_date']) && $item['click_date'] >= gmstrftime('%Y-%m-%d %H:%M:%S', time() - 600)) { // show place of last click if (isset($item['click_anchor']) && ($anchor = Anchors::get($item['click_anchor']))) { $visited = array_merge($visited, array($anchor->get_url() => sprintf(i18n::s('Join %s at %s'), $item['nick_name'], $anchor->get_title()))); } } // make a box if (count($visited)) { $information .= Skin::build_box(i18n::s('Co-browsing'), Skin::build_list($visited, 'compact'), 'folded', 'co_browsing'); } }