Ejemplo n.º 1
0
 /**
  * display extra content
  *
  * @see overlays/overlay.php
  *
  * @param array the hosting record
  * @return some HTML to be inserted into the resulting page
  */
 function &get_extra_text($host = NULL)
 {
     global $context;
     // display main content, if any
     $text = '';
     if (isset($this->attributes['extra_content'])) {
         $text =& Codes::beautify_extra($this->attributes['extra_content']);
     }
     return $text;
 }
Ejemplo n.º 2
0
Archivo: view.php Proyecto: rair/yacs
 }
 //
 // generic page components --can be overwritten in view_as_XXX.php if necessary
 //
 if ($whole_rendering) {
     // the owner profile, if any, aside
     if (isset($owner['id']) && is_object($anchor)) {
         $context['components']['profile'] = $anchor->get_user_profile($owner, 'extra', Skin::build_date($item['create_date']));
     }
     // 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'));
Ejemplo n.º 3
0
 /**
  * text to be inserted aside
  *
  * To be overloaded into derived class
  *
  * @param array the hosting record, if any
  * @return some HTML to be inserted into the resulting page
  */
 function &get_extra_text($host = NULL)
 {
     $text = Codes::beautify_extra('[box.extra=' . i18n::s('Extra box') . ' (test)]' . 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' . '[/box]' . '[box.navigation=' . i18n::s('Navigation box') . ' (test)]' . 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' . '[/box]');
     return $text;
 }
Ejemplo n.º 4
0
if (Links::allow_creation($item, $anchor)) {
    Skin::define_img('LINKS_ADD_IMG', 'links/add.gif');
    $link = 'links/edit.php?anchor=' . urlencode('article:' . $item['id']);
    $invite = Skin::build_link($link, LINKS_ADD_IMG . i18n::s('Add a link'));
}
// list links by date (default) or by title (option links_by_title)
if (Articles::has_option('links_by_title', $anchor, $item)) {
    $items = Links::list_by_title_for_anchor('article:' . $item['id'], 0, 20, 'compact');
} else {
    $items = Links::list_by_date_for_anchor('article:' . $item['id'], 0, 20, 'compact');
}
// actually render the html
if (is_array($items)) {
    $items = Skin::build_list($items, 'compact');
}
// display this aside the thread
if ($items . $invite) {
    $text .= Skin::build_box(i18n::s('Links'), '<div>' . $items . '</div>' . $invite, 'boxes', 'links');
}
// add extra information from this item, if any
if (isset($item['extra']) && $item['extra']) {
    $text .= Codes::beautify_extra($item['extra']);
}
// add extra information from the overlay, if any
if (is_object($overlay)) {
    $text .= $overlay->get_text('extra', $item);
}
// update the extra panel
$context['components']['boxes'] = $text;
// render the skin
render_skin();