当前位置: 首页>>代码示例>>PHP>>正文


PHP Codes::beautify_extra方法代码示例

本文整理汇总了PHP中Codes::beautify_extra方法的典型用法代码示例。如果您正苦于以下问题:PHP Codes::beautify_extra方法的具体用法?PHP Codes::beautify_extra怎么用?PHP Codes::beautify_extra使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Codes的用法示例。


在下文中一共展示了Codes::beautify_extra方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

 /**
  * 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;
 }
开发者ID:rair,项目名称:yacs,代码行数:18,代码来源:mutable.php

示例2: array

 }
 //
 // 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'));
开发者ID:rair,项目名称:yacs,代码行数:31,代码来源:view.php

示例3:

 /**
  * 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;
 }
开发者ID:rair,项目名称:yacs,代码行数:13,代码来源:overlay_test.php

示例4: urlencode

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();
开发者ID:rair,项目名称:yacs,代码行数:31,代码来源:view_as_chat.php


注:本文中的Codes::beautify_extra方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。