Location: PHPKode > projects > phlyMail Lite > phlymail/handlers/bookmarks/topbuttonbar.php
<?php
/**
 * Topbuttonbar
 * @package phlyMail Nahariya 4.0+, Branch MessageCenter
 * @subpackage Handler Bookmarks
 * @copyright 2009-2010 phlyLabs, Berlin (http://phlylabs.de)
 * @version 0.0.4 2010-02-08
 */
// Only valid within phlyMail
if (!defined('_IN_PHM_')) die();

if (file_exists($_PM_['path']['handler'].'/bookmarks/lang.'.$WP_msg['language'].'.php')) {
    require($_PM_['path']['handler'].'/bookmarks/lang.'.$WP_msg['language'].'.php');
} else {
    require($_PM_['path']['handler'].'/bookmarks/lang.en.php');
}

class topbuttonbar_bookmarks
{
    public function __construct(&$_PM_)
    {
        global $WP_msg;
        // Helper assignment. Saves huge API for just having a nice translation of the root node everywhere necessary
        if (!isset($_SESSION['phM_uniqe_handlers']['bookmarks']['i18n'])) {
            $_SESSION['phM_uniqe_handlers']['bookmarks']['i18n'] = $WP_msg['MainFoldername'];
        }
        $this->tpl = new fxl_cached_template($_PM_['path']['frontend'].'/templates/topbuttonbar.bookmarks.tpl', $_PM_['path']['tplcache'].'topbuttonbar.bookmarks.tpl');
        if (isset($_PM_['customsize']['bookmarks_previewheight']) && $_PM_['customsize']['bookmarks_previewheight']
                && (!isset($_PM_['core']['resize_mainwindows']) || $_PM_['core']['resize_mainwindows'])) {
            $this->tpl->fill_block('customheight', 'height', $_PM_['customsize']['bookmarks_previewheight']);
        }
        // Permissions
        if ($_SESSION['phM_privs']['all'] || $_SESSION['phM_privs']['bookmarks_add_bookmark']) {
            $this->tpl->assign_block('has_new_bookmark');
        }
        if ($_SESSION['phM_privs']['all'] || $_SESSION['phM_privs']['bookmarks_export_bookmarks'] || $_SESSION['phM_privs']['bookmarks_import_bookmarks']) {
            $this->tpl->assign_block('has_exchange');
        }
        $this->tpl->assign(array
                ('handler' => $_PM_['handler']['name']
                ,'msg_setup_bookmarks' => $WP_msg['MainFoldername']
                ,'msg_newbookmark' => $WP_msg['NewBookmark']
                ,'msg_groupsmanager' => $WP_msg['GroupManager']
                ));
        return true;
    }

    public function get()
    {
        return $this->tpl;
    }
}
?>
Return current item: phlyMail Lite