Exemple #1
0
    /**
     *  Меню пользователя + experience
     */
    $config['data']['user'] = array('list' => array('userbar' => array('text' => array('user_name' => array(), 'count_messages' => array($sTemplate = '<span class="badge badge-danger badge-mail-counter">+{{count_messages}}</span>'), '&nbsp;<span class="caret"></span>'), 'options' => array('class' => 'dropdown', 'link_class' => 'dropdown-toggle user-button', 'image_url' => array('user_avatar_url' => array('32x32crop')), 'image_title' => array('user_name'), 'image_class' => 'user', 'link_data' => array('toggle' => 'dropdown', 'role' => 'button', 'target' => '#'), 'data' => array('hidden-class' => 'btn'))), 'talk' => FALSE));
    /**
     *  Меню пользователя + experience
     */
    $config['data']['toolbar_user'] = array('init' => array('fill' => array('list' => array('*'))), 'description' => '{{menu_user_description}}', 'list' => array('userbar' => array('text' => array('user_name' => array(), 'count_messages' => array('<span class="badge badge-danger badge-mail-counter">+{{count_messages}}</span>')), 'link' => E::User()->getProfileUrl(), 'options' => array('image_url' => array('user_avatar_url' => array('32x32crop'))))));
    /**
     *  Подменю пользователя + experience
     */
    $config['data']['toolbar_userbar'] = array('init' => array('fill' => array('list' => array('*'))), 'description' => '{{menu_toolbar_userbar_description}}', 'class' => 'dropdown-menu dropdown-user-menu animated fadeIn', 'list' => array('user' => array('text' => '<span><i class="fa fa-user"></i></span><span>{{user_menu_profile}}</span>', 'link' => E::User()->getProfileUrl(), 'options' => array('class' => 'fixed-item')), 'favourites' => array('text' => '<span><i class="fa fa-star"></i></span><span>{{user_menu_profile_favourites}}</span>', 'link' => E::User()->getProfileUrl() . 'favourites/topics/', 'options' => array('class' => 'fixed-item')), 'talk' => array('text' => array('<span><i class="fa fa-envelope"></i></span><span>{{user_privat_messages}}</span>', '&nbsp;<span class="new-messages">', 'new_talk_string' => array(), '</span>'), 'link' => Router::GetPath('talk'), 'options' => array('link_id' => 'new_messages', 'class' => 'fixed-item')), 'settings' => array('text' => '<span><i class="fa fa-cog"></i></span><span>{{user_settings}}</span>', 'link' => '___path.root.url___/settings/', 'options' => array('class' => 'fixed-item')), 'toolbar_userbar_item' => '', 'logout' => array('text' => '<span><i class="fa fa-sign-out"></i></span><span>{{exit}}</span>', 'link' => Router::GetPath('login') . 'exit/?security_key=' . E::Security_GetSecurityKey(), 'options' => array('class' => 'fixed-item'))));
    /**
     *  Подменю пользователя + experience
     */
    $config['data']['userbar'] = array('class' => 'dropdown-menu dropdown-user-menu animated fadeIn', 'list' => array('pre' => array('text' => FALSE, 'link' => FALSE, 'options' => array('class' => 'user_activity_items'), 'submenu' => 'userinfo'), 'user' => array('text' => '<i class="fa fa-user"></i>&nbsp;{{user_menu_profile}}', 'link' => E::User()->getProfileUrl()), 'create' => array('text' => '<i class="fa fa-pencil"></i>&nbsp;{{block_create}}', 'link' => '#', 'options' => array('data' => array('toggle' => 'modal', 'target' => '#modal-write'))), 'talk' => array('text' => array('<i class="fa fa-envelope-o"></i>&nbsp;{{user_privat_messages}}', '&nbsp;<span class="new-messages">', 'new_talk_string' => array(), '</span>'), 'link' => Router::GetPath('talk'), 'options' => array('link_id' => 'new_messages')), 'wall' => array('text' => '<i class="fa fa-bars"></i>&nbsp;{{user_menu_profile_wall}}', 'link' => E::User()->getProfileUrl() . 'wall/'), 'publication' => array('text' => '<i class="fa fa-file-o"></i>&nbsp;{{user_menu_publication}}', 'link' => E::User()->getProfileUrl() . 'created/topics/'), 'favourites' => array('text' => '<i class="fa fa-star-o"></i>&nbsp;{{user_menu_profile_favourites}}', 'link' => E::User()->getProfileUrl() . 'favourites/topics/'), 'settings' => array('text' => '<i class="fa fa-cogs"></i>&nbsp;{{user_settings}}', 'link' => '___path.root.url___/settings/'), 'userbar_item' => '', 'logout' => array('text' => '<i class="fa fa-sign-out"></i>&nbsp;{{exit}}', 'link' => Router::GetPath('login') . 'exit/?security_key=' . E::Security_GetSecurityKey())));
}
if (E::IsUser()) {
    $config['data']['userinfo'] = array('init' => array('fill' => array('list' => array('*'))), 'description' => 'Индикаторы пользователя', 'list' => array('user_rating' => array('text' => array('user_rating' => array('<i class="fa fa-bar-chart-o"></i>', 'negative')), 'link' => E::User()->getProfileUrl(), 'options' => array('class' => 'menu-item-user-rating')), 'user_comments' => array('text' => array('count_track' => array('<i class="fa fa-bullhorn"></i>')), 'link' => Router::GetPath('feed') . 'track/', 'options' => array('class' => 'menu-item-user-comments')), 'user_mails' => array('text' => array('new_talk_string' => array('<i class="fa fa-envelope-o"></i>')), 'link' => Router::GetPath('talk'), 'options' => array('class' => 'menu-item-user-talks'))));
}
/**
 *  Меню топиков
 */
C::Set('menu.data.topics.discussed.text', array('{{blog_menu_all_discussed}}', '&nbsp;<i class="caret"></i>'));
$config['data']['topics'] = array('class' => 'menu-topics', 'list' => array('good' => array('active' => array('topic_kind' => array('good')), 'options' => array('class' => 'menu-topics-good')), 'new' => array('text' => array('{{blog_menu_all_new}}', 'new_topics_count' => array('red')), 'options' => array('class' => 'menu-topics-new', 'link_title' => '{{blog_menu_top_period_24h}}')), 'newall' => array('options' => array('class' => 'menu-topics-all', 'link_title' => '{{blog_menu_top_period_24h}}')), 'feed' => array('options' => array('class' => 'menu-topics-feed role-guest-hide')), 'discussed' => array('text' => array('{{blog_menu_all_discussed}}', '&nbsp;<i class="caret"></i>'), 'submenu' => 'discussed', 'options' => array('class' => 'dropdown menu-topics-discussed', 'link_data' => array('toggle' => 'dropdown')))));
if (C::Get('rating.enabled')) {
    $config['data']['topics']['list']['top'] = array('text' => array('{{blog_menu_all_top}}', '&nbsp;<i class="caret"></i>'), 'submenu' => 'top', 'options' => array('class' => 'dropdown menu-topics-top', 'link_data' => array('toggle' => 'dropdown')));
}
/**
 *  Подменю обсуждаемых
 */
Exemple #2
0
 * Главное меню сайта
 * Настройки берутся из главного конфига меню common/config/menu.php
 */
/**
 *  Вход и регистрация
 */
$config['menu']['data']['login'] = array('list' => array('login' => array('options' => array('link_class' => 'js-modal-auth-login')), 'registration' => array('options' => array('class' => 'hidden-sm', 'link_class' => 'js-modal-auth-registration'))));
if (E::IsUser()) {
    /**
     *  Меню пользователя
     */
    $config['menu']['data']['user'] = array('list' => array('talk' => array('text' => array('<span class="glyphicon glyphicon-envelope"></span>&nbsp;+', 'new_talk' => array()), 'options' => array('link_class' => 'new-messages')), 'userbar' => array('text' => array('user_name' => array(), '<b class="caret"></b>'), 'options' => array('class' => 'dropdown nav-userbar', 'link_class' => 'dropdown-toggle username', 'image_url' => array('user_avatar_url' => array('32')), 'image_title' => array('user_name'), 'image_class' => 'avatar', 'link_data' => array('toggle' => 'dropdown', 'target' => '#')))));
    /**
     *  Подменю пользователя
     */
    $config['menu']['data']['userbar'] = array('class' => 'dropdown-menu', 'list' => array('user' => array('link' => E::User()->getProfileUrl()), 'talk' => array('text' => array('{{user_privat_messages}}', '<span class="new-messages">', 'new_talk_string' => array(), '</span>'), 'options' => array('link_id' => 'new_messages', 'link_title' => array('new_talk' => array()))), 'wall' => array('link' => E::User()->getProfileUrl() . 'wall/'), 'publication' => array('link' => E::User()->getProfileUrl() . 'created/topics/'), 'favourites' => array('link' => E::User()->getProfileUrl() . 'favourites/topics/'), 'userbar_item' => '', 'logout' => array('link' => Router::GetPath('login') . 'exit/?security_key=' . E::Security_GetSecurityKey())));
}
/**
 *  Меню топиков
 */
$config['menu']['data']['topics'] = array('list' => array('good' => array('options' => array('class' => 'bordered')), 'new' => array('text' => array('{{blog_menu_all_new}} + ', 'new_topics_count' => array()), 'options' => array('class' => 'bordered', 'link_title' => '{{blog_menu_top_period_24h}}')), 'newall' => array('options' => array('class' => 'bordered', 'link_title' => '{{blog_menu_top_period_24h}}')), 'feed' => array('options' => array('class' => 'bordered')), 'empty' => array('text' => false, 'options' => array('class' => 'divider')), 'discussed' => array('text' => array('{{blog_menu_all_discussed}}', '<b class="caret"></b>'), 'submenu' => 'discussed', 'options' => array('class' => 'dropdown', 'link_class' => 'dropdown-toggle', 'link_data' => array('toggle' => 'dropdown')))));
if (C::Get('rating.enabled')) {
    $config['menu']['data']['topics']['list']['top'] = array('text' => array('{{blog_menu_all_top}}', '<b class="caret"></b>'), 'submenu' => 'top', 'options' => array('class' => 'dropdown', 'link_class' => 'dropdown-toggle', 'link_data' => array('toggle' => 'dropdown')));
}
/**
 *  Подменю обсуждаемых
 */
$config['menu']['data']['discussed'] = array('class' => 'dropdown-menu');
if (C::Get('rating.enabled')) {
    /**
     *  Подменю топовых