Example #1
0
function bookmark_sort($bookmarks, $default_order = "chron")
{
    $order = acl_value_get("bookmarks_order");
    if (isset($order) && $order != '' && $order != $default_order) {
        array_reverse($bookmarks);
    }
    return $bookmarks;
}
Example #2
0
/**
 * Defines user's preferences on how bookmarks should be ordered in the web interface
 * @global type $input
 * @global type $repository_path
 * @global type $user_files_path
 */
function bookmarks_sort()
{
    global $input;
    global $repository_path;
    global $user_files_path;
    $album = $_SESSION["album"];
    $panel = $input['panel'];
    $new_order = $input["order"];
    // init paths
    ezmam_repository_path($repository_path);
    user_prefs_repository_path($user_files_path);
    if (acl_value_get("{$panel}_order") != $new_order) {
        if (acl_user_is_logged()) {
            user_prefs_settings_edit($_SESSION['user_login'], "{$panel}_order", $new_order);
            acl_update_settings();
        } else {
            $_SESSION["acl_user_settings"]["{$panel}_order"] = $new_order;
        }
    }
    // lvl, action, album, panel (official|personal), new_order (chron|reverse_chron)
    trace_append(array($input['source'] == 'assets' ? '2' : '3', 'bookmarks_sort', $album, $panel, $new_order));
    // determines the page to display
    if ($input['source'] == 'assets') {
        // the token is needed to display the album assets
        $input['token'] = ezmam_album_token_get($album);
        view_album_assets(false);
    } else {
        view_asset_details(false);
    }
}
Example #3
0
                <li><a href="javascript:bookmarks_popup('<?php 
echo $_SESSION['album'];
?>
', '<?php 
echo $_SESSION['asset'];
?>
', 'custom', 'details', 'delete')" title="®Delete_asset_bookmarks®">®Delete_bookmarks®</a></li>                    
            </ul>
        </div>
        <div class="settings toc">
            <a class="menu-button" title="®Toc_actions®" onclick="$(this).toggleClass('active')" href="javascript:toggle('#tocs_actions');"></a>
            <a class="sort-button <?php 
echo acl_value_get("toc_order");
?>
" title="®Reverse_bookmarks_order®" href="javascript:sort_bookmarks('toc', '<?php 
echo acl_value_get("toc_order") == "chron" ? "reverse_chron" : "chron";
?>
', 'details');"></a>
            <ul id="tocs_actions">            
                <li><a href="javascript:bookmarks_popup('<?php 
echo $_SESSION['album'];
?>
', '<?php 
echo $_SESSION['asset'];
?>
', 'official', 'details', 'export')" title="®Export_asset_bookmarks®">®Export_bookmarks®</a></li>  
<?php 
if (acl_user_is_logged() && acl_has_album_moderation($album)) {
    ?>
                    <li><a href="#" data-reveal-id="popup_import_bookmarks" onclick="makeRequest('index.php', '?action=view_import', 'popup_import_bookmarks');" title="®Import_asset_bookmarks®">®Import_bookmarks®</a></li>
                    <li><a href="javascript:bookmarks_popup('<?php 
Example #4
0
/**
 * Checks if the user wants the threads to be displayed during video playback.
 * @return boolean
 */
function acl_display_thread_notification()
{
    if (!acl_user_is_logged()) {
        return false;
    }
    global $default_display_thread_notif;
    $display_thread_notif = acl_value_get('display_thread_notification');
    return isset($display_thread_notif) ? $display_thread_notif : $default_display_thread_notif;
}