Ejemplo n.º 1
0
<?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 <*****@*****.**>
 * @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);
<?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 <*****@*****.**>
 * @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']);
Ejemplo n.º 3
0
<?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);
Ejemplo n.º 4
0
Archivo: list.php Proyecto: rasul/Elgg
 * 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>";
Ejemplo n.º 5
0
$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