Ejemplo n.º 1
0
 public function manage()
 {
     // Is user loggedin ?
     if (!users_helper::isLoggedin()) {
         router::redirect('users/login');
     }
     // Assign user from session to variable
     $user = session::section('session');
     $user['config'] = session::section('config');
     // Get user counters
     $counters = hook::filter('users/profile/view/counters', array(), $user);
     // Merge user and counters
     if ($counters) {
         $user = array_merge($user, $counters);
     }
     // Get fields
     $fields = $this->fields_model->getFields('users', session::item('type_id'), 'view', 'in_view');
     // Delete empty sections
     $this->fields_model->deleteEmptySections($fields, $user);
     // Assign vars
     view::assign(array('user' => $user, 'fields' => $fields));
     // Set title
     view::setMetaTitle(__('my_profile', 'system_navigation'));
     // Set trail
     view::setTrail($user['slug'], __('my_profile', 'system_navigation'));
     if (config::item('user_last_visit', 'users')) {
         if (!$user['invisible']) {
             if ($user['online']) {
                 view::setTrail(false, '<span class="users online">' . __('status_online', 'users') . '</span>', array('side' => true));
             } else {
                 view::setTrail(false, '<span class="users date">' . __('status_visit_date', 'users', array('%span' => utf8::strtolower(date_helper::humanSpan($user['visit_date'])))) . '</span>', array('side' => true));
             }
         }
     }
     // Load view
     view::load('users/profile/view');
 }
Ejemplo n.º 2
0
						<div class="item-article">
							<span class="author">
								<?php 
        echo users_helper::anchor($comment['user']);
        ?>
							</span>
							<?php 
        echo $comment['comment'];
        ?>
						</div>

						<ul class="unstyled content-meta clearfix">
							<li class="date">
								<?php 
        echo date_helper::humanSpan($comment['post_date']);
        ?>
							</li>
							<?php 
        if (session::permission('comments_delete', 'comments') && ($comment['poster_id'] == session::item('user_id') || $comment['user_id'] && $comment['user_id'] == session::item('user_id'))) {
            ?>
								<li class="delete">
									<?php 
            echo html_helper::anchor('comments/browse', __('comment_delete', 'comments'), array('onclick' => "deleteComment(this.href,{'resource':'{$resource}','item_id':{$itemID},'page':" . $pagination->getCurrentPage() . ",'delete':" . $comment['comment_id'] . ",'split':" . $split . ",'post':" . ($post ? 1 : 0) . ",'info':" . ($info ? 1 : 0) . "},'" . __('comment_delete?', 'comments') . "');return false;"));
            ?>
									<span class="icon icon-system-ajax ajax hidden" id="ajax-comments-<?php 
            echo $resource;
            ?>
-<?php 
            echo $itemID;
            ?>
Ejemplo n.º 3
0
				<figure class="image users-image">
					<?php 
        view::load('users/profile/elements/picture', array_merge($action['poster'] ? $action['poster'] : $action['user'], array('picture_file_suffix' => 't')));
        ?>
				</figure>

				<?php 
        echo $action['html'];
        ?>

				<footer class="item-footer">

					<ul class="unstyled content-meta clearfix">
						<li class="date">
							<?php 
        echo date_helper::humanSpan($action['post_date']);
        ?>
						</li>
						<?php 
        if (users_helper::isLoggedin() && config::item('timeline_comments', 'timeline')) {
            ?>
							<?php 
            if ($action['comments']) {
                ?>
								<?php 
                if ($action['comments']['post']) {
                    ?>
									<li class="comments">
										<?php 
                    echo html_helper::anchor('#', __('comment_new', 'comments'), array('onclick' => "toggleCommentsPost({'resource':'" . $action['relative_resource'] . "','item_id':" . $action['item_id'] . "});return false;\$('#post-comment-timeline-" . $actionID . "').toggle();return false;"));
                    ?>