Реклама
 
Личные сообщения() Пользователи Новые сообщения на форуме Правила форума Поиск
  • Страница 1 из 1
  • 1
Скрипт оповещения о новом ЛС
Пост# 1
Дата: Понедельник, 05.12.2011, 21:06
Группа: Постоянный
Ранг: Сержант
Сообщений: 34
Репутация: 0 ±
Награды: 0 ±
Статус:


Когда приходит лс появляется окно в правом верхнем углу с сообщением о том что вам пришло новое сообщение!
Установка:
Ставим перед

Code
<script type="text/javascript" src="/js/jquery.ui.all.js"></script>
         <script type="text/javascript" src="/js/jquery.jgrowl.js"></script>


Сам код надо ставить после

Code
<?if($UNREAD_PM$)?><script type="text/javascript">

         (function($){

         $(document).ready(function(){
                 
         $.jGrowl.defaults.closer = false;

         if ( !$.browser.safari ) {
         $.jGrowl.defaults.animateOpen = {
         width: 'show'
         };
         $.jGrowl.defaults.animateClose = {
         width: 'hide'
         };
         }

         $.jGrowl("Привет $USERNAME$!
У тебя $UNREAD_PM$ новое сообщение!
Прочитай его обязательно!", { sticky: true });
         });
         })(jQuery);

         </script><?endif?>



И в CSS Ставим это

Code
div.jGrowl {
         z-index:    9999;
         color:     #fff;
         font-size:    12px;
}

/** Normal Style Positions **/
div.jGrowl {
         position:   absolute;
}

body > div.jGrowl {
         position:   fixed;
}

div.jGrowl.top-left {
         left:     0px;
         top:     0px;
}

div.jGrowl.top-right {
         right:     0px;
         top:     0px;
}

div.jGrowl.bottom-left {
         left:     0px;
         bottom:    0px;
}

div.jGrowl.bottom-right {
         right:     0px;
         bottom:    0px;
}

div.jGrowl.center {
         top:     0px;
         width:     50%;
         left:     25%;
}

/** Cross Browser Styling **/
div.center div.jGrowl-notification, div.center div.jGrowl-closer {
         margin-left:   auto;
         margin-right:   auto;
}

div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer {
         background-color:   #000;
         opacity:     .85;
         -ms-filter:    "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)";         
         filter:     progid:DXImageTransform.Microsoft.Alpha(Opacity=85);         
         zoom:      1;
         width:      235px;
         padding:     10px;
         margin-top:    5px;
         margin-bottom:    5px;
         font-family:    Tahoma, Arial, Helvetica, sans-serif;
         font-size:     1em;
         text-align:    left;
         display:     none;
         -moz-border-radius:  5px;
         -webkit-border-radius:    5px;
}

div.jGrowl div.jGrowl-notification {
         min-height:    40px;
}

div.jGrowl div.jGrowl-notification,
div.jGrowl div.jGrowl-closer {
         margin:     20px;
}

div.jGrowl div.jGrowl-notification div.jGrowl-header {
         font-weight:    bold;
         font-size:    .85em;
}

div.jGrowl div.jGrowl-notification div.jGrowl-close {
         z-index:    99;
         float:      right;
         font-weight:    bold;
         font-size:     1em;
         cursor:     pointer;
}

div.jGrowl div.jGrowl-closer {
         padding-top:    4px;
         padding-bottom:   4px;
         cursor:     pointer;
         font-size:    .9em;
         font-weight:    bold;
         text-align:    center;
}

/** Hide jGrowl when printing **/
@media print {
         div.jGrowl {
          display:    none;
         }
Украина
  • Страница 1 из 1
  • 1
Поиск:

Просматривать сайт рекомендуется с бразуеров Opera и FireFox.
Сайт оптимизирован под любое разрешение экрана.
  Desing by de7 and Hardr1de.
Проверить тиц и PR