Example #1
0
// Add the view to the list of titles
if (isset($view)) {
    addView($title, $view);
}
// Determine which type does the photo belong to
if (isset($type)) {
    $title[] = JString::ucwords(JText::_('COM_EASYSOCIAL_SH404_PHOTOS_TYPE_' . strtoupper($type)));
    if (isset($uid)) {
        if ($type == SOCIAL_TYPE_USER) {
            $alias = getUserAlias($uid);
        }
        if ($type == SOCIAL_TYPE_GROUP) {
            $alias = getGroupAlias($uid);
        }
        if ($type == SOCIAL_TYPE_EVENT) {
            $alias = getEventAlias($uid);
        }
        $title[] = $alias;
        shRemoveFromGETVarsList('uid');
    }
    shRemoveFromGETVarsList('type');
}
// For photos, we need to get the beautiful title
if (isset($id)) {
    $photo = FD::table('Photo');
    $photo->load((int) $id);
    // Remove known extensions from title
    $extensions = array('jpg', 'png', 'gif');
    $fragment = JFilterOutput::stringURLSafe(JString::str_ireplace($extensions, '', $photo->title));
    $fragment = uniqueUrl($title, $id . '-' . $fragment);
    if (isset($layout)) {
Example #2
0
* @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');
if (isset($view)) {
    addView($title, $view);
}
if (isset($layout)) {
    addLayout($title, $view, $layout);
}
if (isset($id) && isset($view) && $view == 'events' && isset($layout) && $layout == 'item') {
    $title[] = getEventAlias($id);
    shRemoveFromGETVarsList('id');
}
if (isset($categoryid)) {
    $title[] = getEventCategoryAlias($categoryid);
    shRemoveFromGETVarsList('categoryid');
}
if (isset($id) && isset($view) && $view == 'events' && isset($layout) && $layout == 'category') {
    $category = FD::table('EventCategory');
    $category->load($id);
    $alias = $category->getAlias();
    $alias = str_ireplace(':', '-', $alias);
    $title[] = $alias;
    shRemoveFromGETVarsList('id');
}
if (isset($appId) && $appId && $view == 'events' && $layout == 'item') {