Esempio n. 1
0
 /**
  * Displays the application output in the canvas.
  *
  * @since	1.0
  * @access	public
  * @param	int		The user id that is currently being viewed.
  */
 public function display($userId = null, $docType = null)
 {
     // Require user to be logged in
     FD::requireLogin();
     $id = JRequest::getVar('schedule_id');
     // Get the user that's being accessed.
     $user = FD::user($userId);
     $calendar = FD::table('Calendar');
     $calendar->load($id);
     if (!$calendar->id || !$id) {
         FD::info()->set(false, JText::_('APP_CALENDAR_CANVAS_INVALID_SCHEDULE_ID'), SOCIAL_MSG_ERROR);
         return $this->redirect(FD::profile(array('id' => $user->getAlias()), false));
     }
     $my = FD::user();
     $privacy = FD::privacy($my->id);
     $result = $privacy->validate('apps.calendar', $calendar->id, 'view', $user->id);
     if (!$result) {
         FD::info()->set(false, JText::_('APP_CALENDAR_NO_ACCESS'), SOCIAL_MSG_ERROR);
         JFactory::getApplication()->redirect(FRoute::dashboard());
     }
     FD::page()->title($calendar->title);
     // Render the comments and likes
     $likes = FD::likes();
     $likes->get($id, 'calendar', 'create', SOCIAL_APPS_GROUP_USER);
     // Apply comments on the stream
     $comments = FD::comments($id, 'calendar', 'create', SOCIAL_APPS_GROUP_USER, array('url' => FRoute::albums(array('layout' => 'item', 'id' => $id))));
     $params = $this->app->getParams();
     $this->set('params', $params);
     $this->set('likes', $likes);
     $this->set('comments', $comments);
     $this->set('calendar', $calendar);
     $this->set('user', $user);
     echo parent::display('canvas/item/default');
 }
Esempio n. 2
0
<?php

/**
* @package		EasySocial
* @copyright	Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
?>
<div data-album-likes-holder class="es-item-likes">
	<?php 
echo FD::likes($album->id, SOCIAL_TYPE_ALBUM, 'create', SOCIAL_APPS_GROUP_USER)->toString();
?>
</div>
<div data-album-comments-holder class="es-item-comments">
	<?php 
echo FD::comments($album->id, SOCIAL_TYPE_ALBUM, 'create', SOCIAL_APPS_GROUP_USER, array('url' => FRoute::albums(array('layout' => 'item', 'id' => $album->id))))->getHTML();
?>
</div>
Esempio n. 3
0
 public function getLink()
 {
     $link = FRoute::albums(array('id' => $this->item->contextId));
     return $link;
 }
Esempio n. 4
0
?>
					</div>
					<div class="popbox-item-total"><?php 
echo $user->getTotalFriends();
?>
</div>
				</a>
			</div>
		</li>
		<?php 
if ($this->config->get('photos.enabled')) {
    ?>
		<li>
			<div class="popbox-item-info">
				<a href="<?php 
    echo FRoute::albums(array('userid' => $user->getAlias()));
    ?>
">
					<div class="popbox-item-text">
						<?php 
    echo JText::_('COM_EASYSOCIAL_PROFILE_ALBUMS');
    ?>
					</div>
					<div class="popbox-item-total">
						<?php 
    echo $user->getTotalAlbums();
    ?>
					</div>
				</a>
			</div>
		</li>
Esempio n. 5
0
	<?php 
echo $pagination->getListFooter('site');
?>
</div>

<?php 
if (!$albums) {
    ?>
<div class="content-hint no-albums-hint">
	<?php 
    echo JText::_("COM_EASYSOCIAL_NO_ALBUM_AVAILABLE");
    ?>

	<div>
		<a class="btn btn-es-primary btn-large" href="<?php 
    echo FRoute::albums(array('layout' => 'form', 'uid' => $this->my->id, 'type' => SOCIAL_TYPE_USER));
    ?>
"><?php 
    echo JText::_('COM_EASYSOCIAL_ALBUMS_CREATE_ALBUM');
    ?>
</a>
	</div>
</div>
<?php 
}
?>

<i class="loading-indicator fd-small"></i>

<?php 
echo $this->render('module', 'es-albums-after-contents');
Esempio n. 6
0
 /**
  * Retrieves the permalink for the album
  *
  * @since	1.0
  * @access	public
  * @param	bool	Determines if it should be xhtml encoded
  * @param	bool	Determines if the URL should be an external url.
  * @return
  */
 public function getPermalink($xhtml = true, $external = false, $layout = 'item', $sef = true)
 {
     // Standard url options
     $options = array('id' => $this->getAlias(), 'layout' => $layout, 'uid' => $this->uid, 'type' => $this->type, 'sef' => $sef);
     if ($this->type == SOCIAL_TYPE_GROUP) {
         $options['uid'] = FD::group($this->uid)->getAlias();
     }
     if ($this->type == SOCIAL_TYPE_USER) {
         $options['uid'] = FD::user($this->uid)->getAlias();
     }
     if ($external) {
         $options['external'] = true;
     }
     return FRoute::albums($options, $xhtml);
 }
Esempio n. 7
0
    ?>
			<li>
				<div class="fd-small empty">
					<?php 
    echo JText::_('APP_PHOTOS_PROFILE_WIDGET_NO_PHOTOS_UPLOADED_YET');
    ?>
				</div>
			</li>
			<?php 
}
?>
		</ul>

		<?php 
if (!empty($photos)) {
    ?>
		<div>
			<a class="fd-small" href="<?php 
    echo FRoute::albums(array('uid' => $user->getAlias(), 'type' => SOCIAL_TYPE_USER));
    ?>
"><?php 
    echo JText::_('APP_PHOTOS_PROFILE_WIDGET_VIEW_ALL');
    ?>
</a>
		</div>
		<?php 
}
?>
	</div>
</div>
Esempio n. 8
0
                <li>
                    <span>
                        <a href="<?php 
echo FRoute::events(array('layout' => 'category', 'id' => $event->getCategory()->getAlias()));
?>
">
                            <i class="ies-database"></i> <?php 
echo $event->getCategory()->get('title');
?>
                        </a>
                    </span>
                </li>
                <li>
                    <span>
                        <a href="<?php 
echo FRoute::albums(array('uid' => $event->id, 'type' => SOCIAL_TYPE_EVENT));
?>
">
                            <i class="ies-picture"></i> <?php 
echo JText::sprintf(FD::string()->computeNoun('COM_EASYSOCIAL_EVENTS_TOTAL_ALBUMS', $event->getTotalAlbums()), $event->getTotalAlbums());
?>
                        </a>
                    </span>
                </li>
                <li>
                    <span>
                        <i class="ies-users"></i> <?php 
echo JText::sprintf(FD::string()->computeNoun('COM_EASYSOCIAL_EVENTS_TOTAL_GUESTS', $event->getTotalGoing()), $event->getTotalGoing());
?>
                    </span>
                </li>
Esempio n. 9
0
?>

	<?php 
if (!$data) {
    ?>
	<div class="content-hint no-albums-hint">
		<?php 
    echo JText::_("COM_EASYSOCIAL_NO_ALBUM_AVAILABLE");
    ?>

		<?php 
    if ($lib->canCreateAlbums()) {
        ?>
		<div>
			<a class="btn btn-es-primary btn-large" href="<?php 
        echo FRoute::albums(array('layout' => 'form', 'uid' => $lib->uid, 'type' => $lib->type));
        ?>
"><?php 
        echo JText::_('COM_EASYSOCIAL_ALBUMS_CREATE_ALBUM');
        ?>
</a>
		</div>
		<?php 
    }
    ?>
	</div>
	<?php 
}
?>

</div>
Esempio n. 10
0
 /**
  * Allows use to download a photo from the site.
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function download()
 {
     // Check if photos is enabled
     $this->checkFeature();
     // Load up info object
     $info = FD::info();
     // Get the id of the photo
     $id = JRequest::getInt('id');
     $photo = FD::table('Photo');
     $photo->load($id);
     // Id provided must be valid
     if (!$id || !$photo->id) {
         $this->setMessage(JText::_('COM_EASYSOCIAL_PHOTOS_INVALID_PHOTO_ID_PROVIDED'), SOCIAL_MSG_ERROR);
         $info->set($this->getMessage());
         return $this->redirect(FRoute::albums(array(), false));
     }
     // Load up photo library
     $lib = FD::photo($photo->uid, $photo->type, $photo);
     if (!$lib->downloadable()) {
         return $this->restricted($lib);
     }
     // Let's try to download the file now
     $photo->download();
 }
Esempio n. 11
0
 public function getAlbumLink()
 {
     $url = FRoute::albums(array('layout' => 'item', 'id' => $this->album->getAlias(), 'uid' => $this->user->getAlias(), 'type' => SOCIAL_TYPE_USER));
     return $url;
 }
Esempio n. 12
0
 /**
  * Post process after an album is deleted
  *
  * @since	1.0
  * @access	public
  * @param	int		The state
  */
 public function delete($state)
 {
     $ajax = FD::ajax();
     if (!$state) {
         return $ajax->reject($this->getMessage());
     }
     $redirect = JRequest::getBool('redirect', 1);
     if ($redirect) {
         $url = FRoute::albums();
         return $ajax->redirect($url);
     } else {
         return $ajax->resolve();
     }
 }
Esempio n. 13
0
						<i class="ies-bars ies-small"></i>
					</a>
					<a class="btn btn-es trending<?php 
echo $sorting == 'popular' ? ' active' : '';
?>
"
						data-albums-sort
						data-albums-sort-type="trending"
						data-es-provide="tooltip"
						data-placement="bottom"
						data-original-title="<?php 
echo JText::_('COM_EASYSOCIAL_ALBUMS_SORT_POPULAR', true);
?>
"
						href="<?php 
echo FRoute::albums(array('layout' => 'all', 'sort' => 'popular'));
?>
"
						title="<?php 
echo JText::_('COM_EASYSOCIAL_ALBUMS_SORT_POPULAR', true);
?>
"
					>
						<i class="ies-fire ies-small"></i>
					</a>
				</div>
			</div>
		</div>

		<hr />
Esempio n. 14
0
					</li>

					<?php 
if ($album->editable() || $album->deleteable()) {
    ?>
					<li class="divider"></li>
					<?php 
}
?>

					<?php 
if ($album->editable()) {
    ?>
					<li data-album-report-button>
						<a href="<?php 
    echo FRoute::albums(array('id' => $album->getAlias(), 'layout' => 'form'));
    ?>
"><?php 
    echo JText::_('COM_EASYSOCIAL_EDIT_ALBUM');
    ?>
</a>
					</li>
					<?php 
}
?>

					<?php 
if ($album->deleteable()) {
    ?>
					<li data-album-delete-button>
						<a href="javascript:void(0);"><?php 
Esempio n. 15
0
 /**
  * Retrieves the creation link
  *
  * @since	1.3
  * @access	public
  * @param	string
  * @return
  */
 public function getCreateLink()
 {
     $url = FRoute::albums(array('layout' => 'form', 'uid' => $this->event->getAlias(), 'type' => SOCIAL_TYPE_EVENT));
     return $url;
 }
Esempio n. 16
0
 /**
  * Post processing when creating a new album
  *
  * @since	1.0
  * @access	public
  */
 public function store($album = null)
 {
     // Require user to be logged in
     FD::requireLogin();
     FD::info()->set($this->getMessage());
     if ($this->hasErrors()) {
         return $this->form();
     }
     return $this->redirect(FRoute::albums(array('id' => $album->getAlias(), 'layout' => 'item')));
 }
Esempio n. 17
0
<?php

/**
* @package		EasySocial
* @copyright	Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
?>
<li>
	<a href="<?php 
echo FRoute::albums(array('uid' => $group->getAlias(), 'type' => SOCIAL_TYPE_GROUP, 'layout' => 'form'));
?>
"><?php 
echo JText::_('APP_GROUP_PHOTOS_WIDGET_CREATE_ALBUM');
?>
</a>
</li>
Esempio n. 18
0
				<li>
					<span>
						<a href="<?php 
echo FRoute::groups(array('layout' => 'category', 'id' => $group->getCategory()->getAlias()));
?>
">
							<i class="ies-database"></i> <?php 
echo $group->getCategory()->get('title');
?>
						</a>
					</span>
				</li>
				<li>
					<span>
						<a href="<?php 
echo FRoute::albums(array('uid' => $group->id, 'type' => SOCIAL_TYPE_GROUP));
?>
">
							<i class="ies-picture"></i> <?php 
echo JText::sprintf(FD::string()->computeNoun('COM_EASYSOCIAL_GROUPS_ALBUMS', $group->getTotalAlbums()), $group->getTotalAlbums());
?>
						</a>
					</span>
				</li>
				<li>
					<span>
						<i class="ies-users"></i> <?php 
echo JText::sprintf(FD::string()->computeNoun('COM_EASYSOCIAL_GROUPS_MEMBERS', $group->getTotalMembers()), $group->getTotalMembers());
?>
					</span>
				</li>
Esempio n. 19
0
<?php

/**
* @package      EasySocial
* @copyright    Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license      GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
?>
<li>
    <a href="<?php 
echo FRoute::albums(array('uid' => $event->getAlias(), 'type' => SOCIAL_TYPE_EVENT, 'layout' => 'form'));
?>
"><?php 
echo JText::_('APP_EVENT_PHOTOS_WIDGET_CREATE_ALBUM');
?>
</a>
</li>
Esempio n. 20
0
 public function getCreateLink()
 {
     $options = array('layout' => 'form', 'uid' => $this->user->getAlias(), 'type' => SOCIAL_TYPE_USER);
     return FRoute::albums($options);
 }
Esempio n. 21
0
<?php

/**
* @package		EasySocial
* @copyright	Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
?>
<div data-album-create-button class="es-album es-album-create-button">
	<div class="es-album-header"></div>
	<div class="es-album-content">
		<a data-album-cover class="es-album-cover" href="<?php 
echo FRoute::albums(array('layout' => 'form'));
?>
">
			<span class="es-album-create-hint"><?php 
echo JText::_("COM_EASYSOCIAL_CREATE_NEW_ALBUM");
?>
</span>
		</a>
	</div>
</div>