Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

В преддверии Нового Года.

Featured Replies

Posted

Родилась у меня идея, но поскольку я ни разу не программист в нынешней моей ипостаси, спрошу у народа.

Есть стиль Nature от Фисаны. Там есть подложка, внимание вопрос, как сделать и что написать, для того, чтобы с 20 декабря по 15 января подложка автоматически подменялась новогодней? Так же можно сделать, что бы под большие праздники подложки менялись на поздравительные. Насколько я понимаю, это сделать не так уж сложно. Гуру, подумайте, может сделаете?

Ну или как сделать задачу в кроне, в определенные дни переименовывать названия файлов подложек?

  • Author

Абсолютно то что надо, спасиба! :good: _Dark_ Ау! I need help! :2:

Если бы я знал грамматику языка, то поправить код можно на раз...

Заменить это:

if(theHour>=9&&theHour<=17)
На вот это:
if (theMount=12&&theDay>=20) or??? (theMount=1&&theDay<=15) 
Надоть взять месяц и день вместо час и минута как?
theMount = theDate.getMount();

theDay = theDate.getDay();

Правильно?

Все понимаю, но не зная толком орфографии сложно не ошибиться, а еще труднее найти ошибку.

  • Author

Прошу проверить.

<script type="text/javascript">


theDate = new Date();


theMount = theDate.getMon();


theDay = theDate.getMday();


if(theMount=12&&theDay>=20){document.body.style.cssText = "background: #59b0ee url('Mysite/public/style_images/nature/_backgrounds/body2newyear.jpg') top center repeat-x";}


else if(theMount=1&&theDay<=15){document.body.style.cssText = "background: #26abf6 url('Mysite/public/style_images/nature/_backgrounds/body2newyear.jpg') top center repeat-x";}


else if(theMount=5&&theDay=9){document.body.style.cssText = "background: #26abf6 url('Mysite/public/style_images/nature/_backgrounds/body2denpobedy.jpg') top center repeat-x";}


else{document.body.style.cssText = "background: #155e87 url('Mysite/public/style_images/nature/_backgrounds/body2.jpg') top center repeat-x";}


</script>


<script type="text/javascript">
theDate = new Date();
month = theDate.getMonth();
day = theDate.getDay();
if(month == 12 && day >= 20 || month == 1 && day <=15) { // С 20 декабря по 15 января
document.body.style.cssText = "background: #59b0ee url('Mysite/public/style_images/nature/_backgrounds/body2newyear.jpg') top center repeat-x";
}
else if(month == 5 && day == 9) { // 9 мая
document.body.style.cssText = "background: #26abf6 url('Mysite/public/style_images/nature/_backgrounds/body2denpobedy.jpg') top center repeat-x";
}
else { // любое другое
document.body.style.cssText = "background: #155e87 url('Mysite/public/style_images/nature/_backgrounds/body2.jpg') top center repeat-x";
}
</script>
[/CODE]

Guest
This topic is now closed to further replies.

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.