[SVG]Снег для сайта

[SVG]Снег для сайта 1.0.2

Нет прав для скачивания

Skaiman

Проверенные
Сообщения
17,609
Решения
201
Реакции
32,930
Баллы
18,475
Пользователь Skaiman разместил новый ресурс:

[SVG]Снег для сайта - Украшаем форум падающим снегом


В преддверии праздников, продолжаем тему украшений для форума.
Сделал настраиваемое дополнение падающего снега. Настройки:
  • Количество снежинок
  • Цвет снежинок
  • Минимальный размер снежинки
  • Максимальный размер снежинки
  • Минимальная скорость снежинки
  • Максимальная скорость снежинки
  • Закругление снежинки
  • Тень для снежинки
В папке snowfall два файла js, расширенный и сжатый, по умолчанию в модификации,...

Узнать больше об этом ресурсе...
 
Я не пойму, вроде все, а снега нет.
 
Зима походу не наступила, за то в америке завалило снегом
 
Идет, там по умолчанию снежинки мелкие и мало их, мож просто не видно, щас поставил на тесте, пошел, но меленький:)
 
та я уже увеличивал и количество, и цвет менял, я ХЗ, че еще поменять((((

хм... соврал. Загрузил счас форум с гугл хрома, есть снежинки. Знач у меня трабл, спасиба)))
 
ну и хорошо
 
Последнее редактирование:
в гугле пашет, в мазиле нифига(((
 
у меня мазила, ток ей и пользуюсь

Смотри блокировщики, может скрипты блокируются
 
да нету у мет блокировщика никакого. Ладно, то я уже дальше сам буду разбираться, спасибо))) Явно проблема на локальном компе

проблема проявилась в том, что для гостя снег идет, а когда авторизуешься - не идет. В любом браузере:ninja:
 
проблема проявилась в том, что для гостя снег идет, а когда авторизуешься - не идет. В любом браузере:ninja:
А можно тогда взглянуть на содержимое PAGE_CONTAINER, или модификация какая применялась в нем с условиями для пользователей. У меня не указано ни каких условий для пользователей, я ж делал и смотрел как администратор, соответственно авторизованный.
 
А можно тогда взглянуть на содержимое PAGE_CONTAINER, или модификация какая применялась в нем с условиями для пользователей. У меня не указано ни каких условий для пользователей, я ж делал и смотрел как администратор, соответственно авторизованный.
PHP:
<!DOCTYPE html><xen:set var="$isResponsive" value="{xen:if '@enableResponsive AND !{$noResponsive}', 1, 0}" />
<html id="XenForo" lang="{$visitorLanguage.language_code}" dir="{$visitorLanguage.text_direction}" class="Public NoJs {xen:if {$visitor.user_id}, 'LoggedIn', 'LoggedOut'} {xen:if {$sidebar}, 'Sidebar', 'NoSidebar'} {xen:if $hasAutoDeferred, RunDeferred} {xen:if $isResponsive, Responsive, NoResponsive}{xen:if @uix_collapseNodes, ' hasCollapseNodes'}{xen:if {xen:property uix_navigationFixed}, ' hasHeaderFixed'}<xen:if is="@uix_navStyle==1"> hasNavAtTop</xen:if>{xen:if @uix_loginModalBox, ' hasLoginModal'}{xen:if '!@uix_removeTabLinks', ' hasTabLinks', ' not_hasTabLinks'}{xen:if '@uix_collapsibleSidebar', ' hasSidebarToggle', ' not_hasSidebarToggle'}{xen:if '@uix_beta', ' uix_betaMode'}{xen:if '{$canSearch}', ' hasSearch', ' not_hasSearch'}<xen:if is="@uix_navStyle == 2"> activeSmallLogo</xen:if> navStyle_@uix_navStyle pageStyle_@uix_pageStyle" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>

<xen:hook name="page_container_head">
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <xen:if is="{$isResponsive}">
        <meta name="viewport" content="width=device-width, initial-scale=1" />
    </xen:if>
    <xen:if is="{$requestPaths.fullBasePath}">
        <base href="{$requestPaths.fullBasePath}" />
        <script><xen:comment>/* Chrome bug and for Google cache */</xen:comment>
            var _b = document.getElementsByTagName('base')[0], _bH = "{xen:jsescape $requestPaths.fullBasePath}";
            if (_b && _b.href != _bH) _b.href = _bH;
        </script>
    </xen:if>

    <title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>
   
    <noscript><style>.JsOnly, .jsOnly { display: none !important; }</style></noscript>
    <link rel="stylesheet" href="css.php?css=xenforo,form,public&amp;style={xen:urlencode $_styleId}&amp;dir={$visitorLanguage.text_direction}&amp;d={$visitorStyle.last_modified_date}" />
    <!--XenForo_Require:CSS-->   
    {xen:helper ignoredCss, {$visitor.ignoredUsers}}
   
    <link rel="stylesheet" href="css.php?css=uix,<xen:if is="@uix_cssTemplate">@uix_cssTemplate</xen:if>&amp;style={xen:urlencode $_styleId}&amp;dir={$visitorLanguage.text_direction}&amp;d={$visitorStyle.last_modified_date}" />

    <xen:if is="@uix_adStylerOn">
        <link rel="stylesheet" href="{$javaScriptSource}/audentio/ad_styler/2.1/stylesheets/colpick.css" />
        <link rel="stylesheet" href="{$javaScriptSource}/audentio/ad_styler/2.1/stylesheets/styleit.css" />
    </xen:if>

    <xen:include template="google_analytics" />
    <xen:include template="page_container_js_head" />
   
    <link rel="apple-touch-icon" href="{xen:helper fullurl, @ogLogoPath, 1}" />
    <link rel="alternate" type="application/rss+xml" title="{xen:phrase rss_feed_for_x, 'title={$xenOptions.boardTitle}'}" href="{xen:link forums/-/index.rss}" />
    <xen:if is="{$pageDescription.content} AND !{$pageDescription.skipmeta} AND !{$head.description}"><meta name="description" content="{xen:string wordTrim, {xen:helper stripHtml, {xen:raw $pageDescription.content}}, 200}" /></xen:if>
    <xen:if is="{$head}"><xen:foreach loop="$head" value="$headElement">{xen:raw $headElement}</xen:foreach></xen:if>
</xen:hook>

<xen:if is="@uix_adStylerOn">
    <script src="{$javaScriptSource}/audentio/ad_styler/2.1/javascripts/colpick.js?_v={$xenOptions.jsVersion}"></script>
    <script src="{$javaScriptSource}/audentio/ad_styler/2.1/javascripts/bucket.js?_v={$xenOptions.jsVersion}"></script>
    <script src="{$javaScriptSource}/audentio/ad_styler/2.1/javascripts/styleit.js?_v={$xenOptions.jsVersion}"></script>
</xen:if>


</head>

<body{xen:if {$bodyClasses}, ' class="{$bodyClasses}"'}>
    <xen:if is="@uix_adStylerOn">
        <script>
            styleit_skin_name = "{xen:property 'uix_adStylerPresetGroup'}_{$visitor.style_id}";
            styleit_id = "@uix_adStyler_id";
            styleit_var = {};
           
            <xen:include template="uix_adStyler_variables" />
           
            styleit_var['boardPath'] = "{$xenOptions.boardUrl}";
            styleit_var['ImgPath'] = '{$javaScriptSource}/audentio/ad_styler/2.1/images';
            styleit_var['gFontsPath'] = "//fonts.googleapis.com";
            si_restored = false; styleit_store = _bucket('si-'+styleit_skin_name);
           
            var
                head = document.getElementsByTagName('head')[0];
                siStyleTag = document.createElement('style');
                siStyleTag.type = "text/css";
                siStyleTag.id = "si-style",
                savedStyle = styleit_store.get('style'),
                styledata = styleit_store.get('styledata');
               
            if ( savedStyle ) {
                if (siStyleTag.styleSheet) { siStyleTag.styleSheet.cssText = savedStyle }
                else { siStyleTag.appendChild(document.createTextNode(savedStyle)) }
                head.appendChild(siStyleTag);
                si_restored = true;
               
                for (var elm in styledata) {
                    for (var prop in styledata[elm]) {
                        if (prop == "_fonturl") {
                            var
                            fontTag = document.createElement('link');
                            fontTag.href = styledata[elm][prop];
                            fontTag.type = "text/css";
                            fontTag.rel = "stylesheet";
                            head.appendChild(fontTag);
                        }
                    }
                }
            }
        </script>
    </xen:if>
   
    <xen:if is="!{$visitor.user_id} && !{$hideLoginBar}" >
        <xen:include template="login_bar" />
    </xen:if>
   
    <xen:if is="@uix_offCanvasSidebar">
        <div id="uix_paneContainer" class="off-canvas-wrapper">
                <aside class="uix_sidePane left-off-canvas-content">
                    <div class="uix_sidePane_content">
                        <xen:include template="uix_offCanvasSidebar" />
                    </div>
                </aside>
            <div class="inner-wrapper">

               
                <a href="#" class="exit-off-canvas"></a>
       
    </xen:if>

    <xen:hook name="body">

    <div class="uix_wrapperFix" style="height: 1px; margin-bottom: -1px;"></div>
        <div id="uix_wrapper">

<div id="headerMover">
    <div id="headerProxy"></div>
<header>
    <xen:include template="header" />
    <xen:edithint template="navigation" />
    <xen:edithint template="search_bar" />
</header>

<div id="content" class="{$contentTemplate}">
    <div class="pageWidth">
        <div class="pageContent">
            <!-- main content area -->
           
            <xen:hook name="page_container_content_top" />
           
                <xen:include template="ad_above_top_breadcrumb" />
                       
                <xen:hook name="page_container_breadcrumb_top">
                <div class="breadBoxTop {xen:if $topctrl, withTopCtrl}">
                    <xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
                    <xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
                </div>
                </xen:hook>
                       
            <xen:include template="ad_below_top_breadcrumb" />
           
            <xen:if is="@uix_showWelcomeBlock && ( ({$contentTemplate} == 'forum_list' && !@uix_welcomeBlock_showAllTemplates) || @uix_welcomeBlock_showAllTemplates) && ( (!{$visitor.user_id} && @uix_welcomeBlock_userGroups_guests) || ({$visitor.user_id} && @uix_welcomeBlock_userGroups_members) )">
                <div id="uix_welcomeBlock" class="{xen:if @uix_showWelcomeBlock_fixed, 'uix_welcomeBlock_fixed'}">
                    <xen:if is="!@uix_welcomeBlock_custom">
                        <xen:include template="uix_welcomeBlock" />
                    <xen:else />
                        <xen:include template="uix_welcomeBlock_custom" />
                    </xen:if>
                </div>
            </xen:if>
           
            <xen:if is="{$sidebar}">
                <div class="uix_contentFix">   
                    <div class="mainContainer">
                        <div class="mainContent">
            <xen:else />
                <div class="mainContainer_noSidebar">
            </xen:if>
                   
                        <!--[if lt IE 8]>
                            <p class="importantMessage">{xen:phrase you_are_using_out_of_date_browser_upgrade}</p>
                        <![endif]-->

                        <xen:hook name="page_container_notices">
                        <xen:include template="notices" />                       
                        </xen:hook>

                        <xen:hook name="page_container_content_title_bar">
                        <xen:if is="!{$noH1}">
                            <xen:if is="!@uix_removePageTitle || (@uix_removePageTitle && {$contentTemplate} != 'forum_list')">                       
                                <!-- h1 title, description -->
                                <div class="titleBar">
                                    {xen:raw $beforeH1}
                                    <h1><xen:if
                                        is="{$h1}">{xen:raw $h1}<xen:elseif
                                        is="{$title}" />{xen:raw $title}<xen:else
                                        />{$xenOptions.boardTitle}</xen:if></h1>
                                   
                                    <xen:if is="{$pageDescription.content}"><p id="pageDescription" class="muted {$pageDescription.class}">{xen:raw $pageDescription.content}</p></xen:if>
                                </div>
                            </xen:if>
                        </xen:if>
                        </xen:hook>
                       
                        <xen:include template="ad_above_content" />
                       
                        <!-- main template -->
                        {xen:raw $contents}
                       
                        <xen:include template="ad_below_content" />
                       
                        <xen:if is="!{$visitor.user_id} && !{$hideLoginBar}">
                            <!-- login form, to be moved to the upper drop-down -->
                            <xen:include template="login_bar_form" />
                        </xen:if>
                       
            <xen:if is="{$sidebar}">
                        </div>
                    </div>
               
                    <!-- sidebar -->
                    <aside class="uix_mainSidebar {xen:if @uix_sidebarLocation, ' uix_mainSidebar_left', ' uix_mainSidebar_right'}">
                        <div class="sidebar">
                            <xen:hook name="page_container_sidebar">
                            <xen:include template="ad_sidebar_top" />
                            <xen:if is="!{$noVisitorPanel}"><xen:include template="sidebar_visitor_panel" /></xen:if>
                            {xen:raw $sidebar}
                            <xen:include template="ad_sidebar_bottom" />
                            </xen:hook>
                        </div>
                    </aside>
                </div>
            <xen:else />
                </div>
            </xen:if>
           
            <xen:hook name="page_container_breadcrumb_bottom">           
            <xen:if is="!@uix_hideBottomBreadcrumb">
                <div class="breadBoxBottom"><xen:include template="breadcrumb" /></div>
            </xen:if>
            </xen:hook>
                       
            <xen:include template="ad_below_bottom_breadcrumb" />
                       
        </div>
    </div>
</div>

</div>

<footer>
    <xen:include template="footer" />
</footer>

<xen:include template="page_container_js_body" />

<xen:if is="{$isIndexPage} AND {$canSearch}">
<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "WebSite",
    "url": "{xen:jsescape {xen:link canonical:index}}",
    "potentialAction": {
        "@type": "SearchAction",
        "target": "{xen:jsescape {xen:link canonical:search/search}}{xen:if $xenOptions.useFriendlyUrls, '?', '&'}keywords={search_keywords}",
        "query-input": "required name=search_keywords"
    }
}
</script>
</xen:if>

<xen:if is="@uix_adStylerOn">
    <script>
      $(document).ready(function(){
            $(document).styleit({
              default_preset:             '@uix_adStylerDefaultPreset',
              easing:                 true,
              min_width:             @uix_adStylerMinWidth,
              template_caching:         false,
              <xen:if is="@uix_adStylerPresets">presets: "@uix_adStylerPresets",</xen:if>
              disable_presets:             {xen:if @uix_adStylerDisablePresets, 'true', 'false'},
              si_folder_path:             '{$javaScriptSource}/audentio/ad_styler/2.1/styles/@uix_adStylerPresetGroup'
        });
      });
    </script>
</xen:if>

</xen:hook>
</div> <xen:comment>END #wrapper</xen:comment>
<div class="uix_wrapperFix" style="height: 1px; margin-top: -1px;"></div>


<xen:if is="@uix_offCanvasSidebar">
        </div> <xen:comment> END .inner_wrapper </xen:comment>
    </div> <xen:comment> END .off-canvas-wrapper </xen:comment>
</xen:if>

<xen:include template="uix_quickScripts_footer" />

<!-- UI.X Version: @uix_version //-->

</body>
</html>
 
даже не знаю, почему :-), стили UI, вечно проблемы с ними, а на дефолтном стиле как, работает или тоже самое?
 
точно так же))) Ладно, есть и другие способы снег сделать)))))

спасибо за попытку помочь))
 
тоже снег не пошел.проверил на пяти браузерах,и под гостем в том числе
 
тоже снег не пошел.проверил на пяти браузерах,и под гостем в том числе
Всё прекрасно работает, правда в ручную добавил шаблон falling_snow_js и внёс изменения в Extra.css
Что сделал (с)
Создал новый шаблон с названием falling_snow_js в него :
Код:
<!--Simply copy and paste into <BODY> Just above the </BODY> tag. -->
<SCRIPT type="text/javascript">
/*
Snow Fall 1 - no images - Java Script
Visit http://rainbow.arch.scriptmania.com/scripts/
  for this script and many more
*/
// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=40
// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#aaaacc","#ddddff","#ccccdd","#f3f3f3","#f0ffff")
// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Times","Arial","Times","Verdana")
// Set the letter that creates your snowflake (recommended: * )
var snowletter="*"
// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=0.6
// Set the maximum-size of your snowflakes
var snowmaxsize=30
// Set the minimal-size of your snowflakes
var snowminsize=8
// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=1
///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////
// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)
var browserok=ie5||ns6||opera
function randommaker(range) {
        rand=Math.floor(range*Math.random())
    return rand
}
function initsnow() {
        if (ie5 || opera) {
                marginbottom = document.body.scrollHeight
                marginright = document.body.clientWidth-15
        }
        else if (ns6) {
                marginbottom = document.body.scrollHeight
                marginright = window.innerWidth-15
        }
        var snowsizerange=snowmaxsize-snowminsize
        for (i=0;i<=snowmax;i++) {
                crds[i] = 0;
            lftrght[i] = Math.random()*15;
            x_mv[i] = 0.03 + Math.random()/10;
                snow[i]=document.getElementById("s"+i)
                snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)]
                snow[i].size=randommaker(snowsizerange)+snowminsize
                snow[i].style.fontSize=snow[i].size+'px';
                snow[i].style.color=snowcolor[randommaker(snowcolor.length)]
                snow[i].style.zIndex=1000
                snow[i].sink=sinkspeed*snow[i].size/5
                if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
                if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
                if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
                if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
                snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size)
                snow[i].style.left=snow[i].posx+'px';
                snow[i].style.top=snow[i].posy+'px';
        }
        movesnow()
}
function movesnow() {
        for (i=0;i<=snowmax;i++) {
                crds[i] += x_mv[i];
                snow[i].posy+=snow[i].sink
                snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i])+'px';
                snow[i].style.top=snow[i].posy+'px';
                if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
                        if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
                        if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
                        if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
                        if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
                        snow[i].posy=0
                }
        }
        var timer=setTimeout("movesnow()",50)
}
for (i=0;i<=snowmax;i++) {
        document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
        window.onload=initsnow
}
</SCRIPT>

В шаблоне PAGE_CONTAINER после <head> добавил
<xen:include template="falling_snow_js" />
и в extra.css
Код:
/*Новый год на сайте*/
#header
{
    background-image: url('styles/xmas_dec/snow_nav/shelley_snow_bg.png');
}
#navigation .helper {
    background: url('styles/xmas_dec/snow_nav/shelley_snow_l.png') no-repeat 0% 0%, url('styles/xmas_dec/snow_nav/shelley_snow_c.png') no-repeat 50% 0%, url('styles/xmas_dec/snow_nav/shelley_snow_r.png') no-repeat 100% 0%;
    display: block;
    height: 30px;
    left: -5px;
    padding: 0px 5px;
    position: absolute;
    top: -17px;
    width: 100%;
}
/* santa_hat=================================================================================== */

.message .helper {
background: transparent url('styles/xmas_dec/santa_hat/santa_hat.png') no-repeat;
    display: block;
    height: 50px;
    position: absolute;
    right: -4px;
    top: -8px;
    width: 44px;
    z-index: 99;
}
    <xen:if is="@enableResponsive">
    @media (max-width:@maxResponsiveMediumWidth)
    {
    .message .helper {
    display: none; !important;
    }
    }
    </xen:if>
/*Новый год на сайте*/

Правда скрипт снега использую другой так как из темы некорректно работает с адаптивным дизайном, внешний вид можно посмотреть по ссылке выше на тестовом сайте. Если что могу описать его установку.
 
Последнее редактирование:
Всё хорошо работает и на Дефолтном и на U.IX !
 
Современный облачный хостинг провайдер | Aéza
Назад
Сверху Снизу