本文整理汇总了PHP中Skin::build_content方法的典型用法代码示例。如果您正苦于以下问题:PHP Skin::build_content方法的具体用法?PHP Skin::build_content怎么用?PHP Skin::build_content使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Skin
的用法示例。
在下文中一共展示了Skin::build_content方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: md5
Safe::closedir($dir);
}
if ($text) {
$context['text'] .= Skin::build_content(NULL, i18n::s('Use the library'), $text);
}
// display the current gravatar, if any
if (isset($item['email']) && $item['email']) {
$text = '';
// the gravatar url
$url = 'http://www.gravatar.com/avatar.php?gravatar_id=' . md5($item['email']);
// it is already in use
if (isset($item['avatar_url']) && $url == $item['avatar_url']) {
$text .= '<p>' . sprintf(i18n::s('Your are using your %s as current picture.'), Skin::build_link('http://www.gravatar.com/', i18n::s('gravatar'), 'external')) . '</p>' . "\n";
} else {
$text .= '<p>' . sprintf(i18n::s('I have a %s and %s'), Skin::build_link('http://www.gravatar.com/', i18n::s('gravatar'), 'external'), '<a href="' . $context['url_to_root'] . 'users/select_avatar.php?id=' . $id . '&avatar=' . urlencode($url) . '">' . i18n::s('would like to use it') . '</a>') . '</p>' . "\n";
}
$context['text'] .= Skin::build_content(NULL, i18n::s('Use a gravatar'), $text);
}
//
// bottom commands
//
$menu = array();
global $render_overlaid;
if (!$render_overlaid) {
$menu[] = Skin::build_link(Users::get_permalink($item), i18n::s('Cancel'), 'span');
}
//$menu[] = Skin::build_link(Users::get_permalink($item), i18n::s('Cancel'), 'button');
$context['text'] .= Skin::finalize_list($menu, 'assistant_bar');
}
// render the skin
render_skin();
示例2: array
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
if ($rows) {
$box['text'] .= Skin::table($headers, $rows, 'grid');
}
// actually render the html
$users .= Skin::build_content(NULL, NULL, $box['text'], $box['bar']);
}
// display in a separate panel
if ($users) {
$label = i18n::s('Persons');
if ($users_count) {
$label .= ' (' . $users_count . ')';
}
$panels[] = array('users', $label, 'users_panel', $users);
}
//
// assemble all tabs
//
$context['text'] .= Skin::build_tabs($panels);
// buttons to display previous and next pages, if any
if (isset($neighbours) && $neighbours) {
示例3: layout
//.........这里部分代码省略.........
}
// list files by date (default) or by title (option files_by_title)
$offset = ($zoom_index - 1) * FILES_PER_PAGE;
if (Articles::has_option('files_by', $anchor, $item) == 'title') {
$items = Files::list_by_title_for_anchor('article:' . $item['id'], 0, 300, 'article:' . $item['id'], $embedded);
} else {
$items = Files::list_by_date_for_anchor('article:' . $item['id'], 0, 300, 'article:' . $item['id'], $embedded);
}
// actually render the html
if (is_array($items)) {
$box['text'] .= Skin::build_list($items, 'decorated');
} elseif (is_string($items)) {
$box['text'] .= $items;
}
// the command to post a new file
if (Files::allow_creation($item, $anchor, 'article')) {
Skin::define_img('FILES_UPLOAD_IMG', 'files/upload.gif');
$box['bar'] += array('files/edit.php?anchor=' . urlencode('article:' . $item['id']) => FILES_UPLOAD_IMG . i18n::s('Add a file'));
}
}
// some files have been attached to this page
if ($page == 1 && $count > 1) {
// the command to download all files
$link = 'files/fetch_all.php?anchor=' . urlencode('article:' . $item['id']);
if ($count > 20) {
$label = i18n::s('Zip 20 first files');
} else {
$label = i18n::s('Zip all files');
}
$box['bar'] += array($link => $label);
}
// there is some box content
if ($box['text']) {
$text .= Skin::build_content('files', i18n::s('Files'), $box['text'], $box['bar']);
}
// list of comments
$title_label = '';
if (is_object($anchor)) {
$title_label = ucfirst($overlay->get_label('list_title', 'comments'));
}
if (!$title_label) {
$title_label = i18n::s('Comments');
}
// no layout yet
$layout = NULL;
// label to create a comment
$add_label = '';
if (is_object($overlay)) {
$add_label = $overlay->get_label('new_command', 'comments');
}
if (!$add_label) {
$add_label = i18n::s('Post a comment');
}
// get a layout from anchor
$layout =& Comments::get_layout($anchor, $item);
// provide author information to layout
if (is_object($layout) && isset($item['create_id']) && $item['create_id']) {
$layout->set_focus('user:' . $item['create_id']);
}
// the maximum number of comments per page
if (is_object($layout)) {
$items_per_page = $layout->items_per_page();
} else {
$items_per_page = COMMENTS_PER_PAGE;
}
// the first comment to list
示例4: elseif
} elseif (is_string($items)) {
$box['text'] .= $items;
}
// navigation commands for links
$home = Articles::get_permalink($item);
$prefix = Articles::get_url($item['id'], 'navigate', 'links');
$box['bar'] += Skin::navigate($home, $prefix, $count, LINKS_PER_PAGE, $zoom_index);
// new links are allowed
if ($cur_article->allows('creation', 'link')) {
Skin::define_img('LINKS_ADD_IMG', 'links/add.gif');
$box['bar'] += array('links/edit.php?anchor=' . urlencode('article:' . $item['id']) => LINKS_ADD_IMG . i18n::s('Add a link'));
}
}
// there is some box content
if ($box['text']) {
$canvas['links'] = Skin::build_content('links', i18n::s('Links'), $box['text'], $box['bar']);
}
$canvas['links_count'] = $count;
}
//
// trailer information
//
// add trailer information from the overlay, if any
if (is_object($overlay)) {
$canvas['trailer'] .= $overlay->get_text('trailer', $item);
}
// add trailer information from this item, if any
if (isset($item['trailer']) && trim($item['trailer'])) {
$canvas['trailer'] .= Codes::beautify($item['trailer']);
}
// buttons to display previous and next pages, if any
示例5: array
$discussion_count = $count;
$box['bottom'] += array('_count' => sprintf(i18n::ns('%d comment', '%d comments', $count), $count));
// list comments by date
$items = Comments::list_by_date_for_anchor('article:' . $item['id'], $offset, $items_per_page, $layout, TRUE);
// actually render the html
if (is_array($items)) {
$box['text'] .= Skin::build_list($items, 'rows');
} elseif (is_string($items)) {
$box['text'] .= $items;
}
// navigation commands for comments
$prefix = Comments::get_url('article:' . $item['id'], 'navigate');
$box['bottom'] += Skin::navigate(NULL, $prefix, $count, $items_per_page, $zoom_index, FALSE, TRUE);
}
// build a box
$discussion .= Skin::build_content('comments', '', $box['text'], $box['top'], $box['bottom']);
}
// display in a separate panel
if ($discussion) {
$label = i18n::s('Discussion');
if ($discussion_count) {
$label .= ' (' . $discussion_count . ')';
}
$panels[] = array('discussion', $label, 'discussion_panel', $discussion);
}
// let YACS do the hard job
$context['text'] .= Skin::build_tabs($panels);
//
// extra panel -- most content is cached, except commands specific to current surfer
//
// the owner profile, if any, aside