// add extra information from the overlay, if any if (is_object($overlay)) { $context['components']['overlay'] = $overlay->get_text('extra', $item); } // add extra information from this item, if any if (isset($item['extra']) && $item['extra']) { $context['components']['boxes'] = Codes::beautify_extra($item['extra']); } // 'Share' box // $lines = array(); // facebook, twitter, linkedin if ($item['active'] == 'Y' && (!isset($context['without_internet_visibility']) || $context['without_internet_visibility'] != 'Y')) { // the best suited link to use if ($context['with_friendly_urls'] == 'R') { $url = $context['url_to_home'] . $context['url_to_root'] . Articles::get_short_url($item); } else { $url = Articles::get_permalink($item); } // facebook Skin::define_img('PAGERS_FACEBOOK_IMG', 'pagers/facebook.gif'); $lines[] = Skin::build_link('http://www.facebook.com/share.php?u=' . urlencode($url) . '&t=' . urlencode($item['title']), PAGERS_FACEBOOK_IMG . i18n::s('Post to Facebook'), 'basic', i18n::s('Spread the word')); // twitter Skin::define_img('PAGERS_TWITTER_IMG', 'pagers/twitter.gif'); $lines[] = Skin::build_link('http://twitter.com/home?status=' . urlencode($item['title'] . ' ' . $url), PAGERS_TWITTER_IMG . i18n::s('Tweet about this'), 'basic', i18n::s('Spread the word')); // linked in Skin::define_img('PAGERS_LINKEDIN_IMG', 'pagers/linkedin.gif'); $lines[] = Skin::build_link('http://www.linkedin.com/shareArticle?mini=true&url=' . $url . '&title=' . urlencode($item['title']) . '&summary=' . urlencode($item['introduction']) . '&source=' . urlencode($anchor->get_title()), PAGERS_LINKEDIN_IMG . i18n::s('Share at LinkedIn'), 'basic', i18n::s('Spread the word')); } // invite participants if (($cur_article->is_owned() || $item['active'] == 'Y') && isset($context['with_email']) && $context['with_email'] == 'Y') {
$details[] = LOCKED_FLAG . ' ' . i18n::s('page is locked.'); } // in-line details if (count($details)) { $text .= ucfirst(implode(', ', $details)); } // reference this item if (Surfer::is_member()) { $text .= BR . sprintf(i18n::s('Code to reference this page: %s'), '[article=' . $item['id'] . ']'); // the nick name if ($item['nick_name'] && ($link = normalize_shortcut($item['nick_name'], TRUE))) { $text .= BR . sprintf(i18n::s('Name: %s'), $link); } // short link if ($context['with_friendly_urls'] == 'R') { $text .= BR . sprintf(i18n::s('Shortcut: %s'), $context['url_to_home'] . $context['url_to_root'] . Articles::get_short_url($item)); } } // no more details $text .= "</p>\n"; // update page details $context['page_details'] = $text; } // // compute main panel -- $context['text'] // // insert anchor prefix if (is_object($anchor)) { $context['text'] .= $anchor->get_prefix(); } // links to previous and next pages, if any