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


PHP elgg_view_listing函数代码示例

本文整理汇总了PHP中elgg_view_listing函数的典型用法代码示例。如果您正苦于以下问题:PHP elgg_view_listing函数的具体用法?PHP elgg_view_listing怎么用?PHP elgg_view_listing使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: friendly_time

<?php

/**
 * Elgg blog listing
 * 
 * @package ElggBlog
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd <info@elgg.com>
 * @copyright Curverider Ltd 2008-2009
 * @link http://elgg.com/
 */
$owner = $vars['entity']->getOwnerEntity();
$friendlytime = friendly_time($vars['entity']->time_created);
$icon = elgg_view("profile/icon", array('entity' => $owner, 'size' => 'small'));
$info = "<p>" . elgg_echo('blog') . ": <a href=\"{$vars['entity']->getURL()}\">{$vars['entity']->title}</a></p>";
$info .= "<p class=\"owner_timestamp\"><a href=\"{$owner->getURL()}\">{$owner->name}</a> {$friendlytime}</p>";
echo elgg_view_listing($icon, $info);
开发者ID:eokyere,项目名称:elgg,代码行数:17,代码来源:listing.php

示例2: friendly_time

<?php

/**
 * Default form data listing
 * 
 * @package form
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Kevin Jardine <kevin@radagast.biz>
 * @copyright Radagast Solutions 2009
 * @link http://radagast.biz/
 */
$owner = $vars['entity']->getOwnerEntity();
$friendlytime = friendly_time($vars['entity']->time_created);
$icon = elgg_view("profile/icon", array('entity' => $owner, 'size' => 'small'));
$info = '<p><a href="' . $vars['entity']->getURL() . '">' . elgg_echo('form:submission_to') . '</a> "' . get_entity($vars['entity']->form_id)->title . '"</p>';
$info .= "<p class=\"owner_timestamp\"><a href=\"{$owner->getURL()}\">{$owner->name}</a> {$friendlytime}</p>";
echo elgg_view_listing($icon, $info . $vars['annotations']);
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:17,代码来源:default_form_data_listing.php

示例3: friendly_time

<?php

// @todo where is this view used?
$registration = $vars["entity"];
$owner = $registration->getOwnerEntity();
$output = "";
$icon = "";
$output .= '<div class="event_manager_registration_info">';
$output .= '<a class="user" href="' . $owner->getURL() . '">' . $owner->name . '</a> - ' . friendly_time($registration->time_created) . '<br />';
$output .= elgg_view("output/url", array("href" => $registration->getURL(), "text" => elgg_echo('event_manager:event:viewregistration')));
$output .= '</div>';
$output .= '<div class="event_manager_registration_links">';
if ($registration->approved) {
    $output .= elgg_view("output/url", array("href" => "action/event_manager/registration/approve?guid=" . $registration->getGUID() . "&approve=0", "text" => elgg_echo('disapprove'), "is_action" => true));
} else {
    $output .= elgg_view("output/url", array("href" => "action/event_manager/registration/approve?guid=" . $registration->getGUID() . "&approve=1", "text" => elgg_echo('approve'), "is_action" => true));
}
$output .= '</div>';
$icon .= '<div class="event_manager_registration_icon">';
$icon .= '<img src="' . elgg_get_site_url() . 'mod/event_manager/_graphics/icons/register_icon.png">';
$icon .= '</div>';
echo elgg_view_listing($icon, $output);
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:22,代码来源:viewsmall.php

示例4: isset

 * the icon / title.
 *
 * @uses object $vars['item'] The item to display
 * @return string A formatted item
 */
$item = $vars['item'];
$section = $vars['section'];
$target = $vars['target'];
$ecml_keyword = isset($vars['ecml_enabled']) && isset($vars['ecml_keyword']) ? $vars['ecml_keyword'] : NULL;
$icon_size = $vars['icon_size'];
// @todo add entity checking.
// different entity types have different title attribute names.
$title = isset($item->name) ? $item->name : $item->title;
// don't let it be too long
$title = elgg_get_excerpt($title);
// @todo you can disable plugins that are required by other plugins
// (embed requires ecml) so fallback to a hard-coded check to see if ecml is enabled.
// #grumble
if ($ecml_keyword) {
    $embed_code = "[{$ecml_keyword} guid={$item->getGUID()}]";
} else {
    // fallback to inserting a hard link to the object with its icon
    $icon = "<img src=\"{$item->getIcon($icon_size)}\" />" . htmlentities($title, ENT_QUOTES, 'UTF-8');
    $embed_code = elgg_view('output/url', array('href' => $item->getURL(), 'title' => $title, 'text' => $title, 'encode_text' => FALSE));
}
$icon = "<img src=\"{$item->getIcon($icon_size)}\" />";
$info = "<p class='entity-title'>" . htmlentities($title, ENT_QUOTES, 'UTF-8') . "</p>";
$info .= "<p class='entity-subtext'>" . elgg_view_friendly_time($vars['item']->time_created) . "</p>";
// @todo JS 1.8: is this approach better than inline js?
echo "<div class=\"embed_data\" id=\"embed_{$item->getGUID()}\">" . elgg_view_listing($icon, $info) . '</div>';
echo "<script type=\"text/javascript\">\n\t\$('#embed_{$item->getGUID()}').data('embed_code', " . json_encode($embed_code) . ");\n</script>";
开发者ID:rasul,项目名称:Elgg,代码行数:31,代码来源:list.php

示例5: friendly_time

$desc = $project->description;
$summary = $project->summary;
$license = $project->license;
$friendlytime = friendly_time($project->time_created);
$downloads = $project->getDownloadCount();
$usericon = elgg_view("profile/icon", array('entity' => $project_owner, 'size' => 'small'));
switch (get_context()) {
    case 'search':
        $info = "<span class='downloadsnumber'>{$downloads}</span>";
        $info .= "<p class='pluginName'> <a href=\"{$project->getURL()}\">{$title} </a></p>";
        if ($summary) {
            $info .= "<p class='description'>" . $summary . "</p>";
        }
        $user_url = "{$vars['url']}pg/plugins/developer/{$project_owner->username}";
        $info .= "<p class=\"owner_timestamp\"><a href=\"{$user_url}\">{$project_owner->name}</a> {$friendlytime}</p>";
        echo elgg_view_listing($usericon, $info);
        break;
    case 'plugin_project':
        echo elgg_view("profile/icon", array('entity' => $project_owner, 'size' => 'tiny', 'override' => true));
        echo "<p><a href=\"{$project->getURL()}\">{$title}</a><br />";
        echo "Uploaded {$friendlytime} ({$downloads})</p>";
        break;
    case 'widget':
        ?>
		<div class="pluginsrepo_widget_singleitem">
			<div class="pluginsrepo_listview_icon">
				<a href="<?php 
        echo $project->getURL();
        ?>
">
					<img src="<?php 
开发者ID:nohup,项目名称:community_plugins,代码行数:31,代码来源:plugin_project.php


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