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

Название: [skinbox] Warrior 3.3.x

Добавил: Respected

Добавлен: 20 Apr 2012

Категория: Стили IP.Board 3.3.x

Стиль Warrior для IP.Board 3.3.x от skinbox.net! Замечательный тёмный стиль с кучей всяких возможностей и дополнений!

  • 4 недели спустя...
  • Replies 110
  • Просмотров 19,4k
  • Created
  • Последний ответ

Лучшие авторы в теме

Most Popular Posts

  • Открываем стиль skinbox.css скина, в нём находим: #background, #background-above { position: absolute; top: 0; left: 0; z-index: -10; width: 100%; height: 100%; background-repeat: no-rep

  • А там ещё есть закомментированный параметр <h3>Or put your own</h3> <div id="putyourown"> <form> <input type="text" class="input_text" size="40" name="url"

  • Там- понятие очень растяжимое

При прокручивании списка форумов фон тоже прокручивается, хотя на более старых версиях такого не было. Как можно это поправить?

  • Author

Открываем стиль skinbox.css скина, в нём находим:


#background, #background-above {
position: absolute;
top: 0;
left: 0;
z-index: -10;
width: 100%;
height: 100%;
background-repeat: no-repeat;

}
Заменить на:

#background, #background-above {
position: fixed;
top: 0;
left: 0;
z-index: -10;
width: 100%;
height: 100%;
background-repeat: no-repeat;

}
[/code]

  • 4 недели спустя...

А там ещё есть закомментированный параметр


<h3>Or put your own</h3>

<div id="putyourown">

  <form>

   <input type="text" class="input_text" size="40" name="url" placeholder="URL of your background..." />

   <input type="submit" class="input_submit" value="Set" />

  </form>

</div>

, позволяющий вставить свое фоновое изображение. ТОлько вот дальше одной страницы оно не живёт. Как это изправить?

И как установить для маленьких размеров фона повтор по горизонтали и вертикали?

Файл skin_platform_global.php. Находится в Папке форум/cache/skin_cache/cacheid_**номер папки с кэшем темы

Эээ, вы чего делаете! Скин редактируется в Админ-Центре в разделе Внешний вид!

Откройте там шаблон globalTemplate в этом стиле и уже изменяйте, что вам надо. Напрямую файлы редактировать нельзя!

  • Author

позволяющий вставить свое фоновое изображение. ТОлько вот дальше одной страницы оно не живёт. Как это изправить?

В этом виноват кеш браузера! Нужно его удалить..

И как установить для маленьких размеров фона повтор по горизонтали и вертикали?

Примерно так:

background: url (URL до изображения);

background-repeat: repeat;

Эээ, вы чего делаете! Скин редактируется в Админ-Центре в разделе Внешний вид!

Откройте там шаблон globalTemplate в этом стиле и уже изменяйте, что вам надо. Напрямую файлы редактировать нельзя!

В globalTemplate нет того содержимого, имеющегося в файле skin_platform_global.php. Или это я не прав?

1 - В этом виноват кеш браузера! Нужно его удалить..

2 - Примерно так:

background: url (URL до изображения);

background-repeat: repeat;

1 - Там нет вины кэша браузера. Это видимо отладочная строка. Чтобы вставив ссылку на изображение можно было подогнать дизайн. Но если там дописать нужные функции, то возможно будет запоминать на сессию.

2 - У меня оно всеравно одиночное (100х100). В каком параметре CSS это нужно указать?

  • Author

В архиве стиля есть инструкция по добавлению своих бэкграундов. Закачиваешь его в папку _bgs и для повтора в skinbox.css найти:


#background, #background-above {
position: absolute;
top: 0;
left: 0;
z-index: -10;
width: 100%;
height: 100%;
background-repeat: no-repeat;
}
[/CODE]

Параметр background-repeat: no-repeat; замени на background-repeat: repeat;

Сам скрипт находится по адресу _php/Platform/Backgrounds.php

не стаёт... ну то не смертельно. Так же ещё в папке _config (форум/public/style_images/warrior/_config) есть файлик backgrounds.ini, Я его оформил так:


[bg1]

thumbnail=auto

image=bg1.jpg

[bg2]

thumbnail=auto

image=bg2.jpg

[bg3]

thumbnail=auto

image=bg3.jpg

[bg4]

thumbnail=auto

image=bg4.jpg

default=on

[bg5]

thumbnail=auto

image=bg0.jpg

[bg6]

thumbnail=auto

image=bg5.jpg

а вот повтор, то он в _php/Platform/Backgrounds.php находится. там нужно параметр
{ $background['repeat'] = false; }
заменить на
{ $background['repeat'] = true; }[/code]
. [/b]и будут повторы. У меня изображение в состоянии position: fixed. так больше нравится...

Весь код с изменённым парамеиром:


[spoiler]

[code] <?php class Platform_Backgrounds { public $selector = '#background'; public $put_your_own = false; public $put_your_own_icon = true; protected $_container_type; protected $_trigger_type; protected $_thumbnails = 100; protected $_output; protected $_css; public function __construct() { $this->_thumbnails = Platform::general()->background_picker_thumb_width(); } public function load_backgrounds() { if( $this->_css !== null || $this->_output !== null ) { return; } $settings = Platform::general()->get_background_elements(); $this->selector = $settings['element']; $backgrounds = Platform::settings('backgrounds'); $selected_bg = Platform::client_preference('background'); $this->_output = array(); if( in_array(substr($selected_bg, 0, 7), array('__', 'https:/')) ) { if( $this->put_your_own === false || !Platform::feature('background_put_your_own') ) { $selected_bg = null; } else { if( !IPSText::xssCheckUrl($selected_bg) ) { $selected_bg = null; } else { $this->_css = $this->selector . ' { background-attachment: fixed; background-image: url(' . $selected_bg . '); }'; } } } foreach( $backgrounds as $id => $background ) { if( isset($background['enabled']) && $background['enabled'] == false ) { continue; } if( in_array(substr($background['image'], 0, 7), array('__', 'https:/')) ) { $url = $background['image']; if( $background['thumbnail'] == 'auto' ) { $path = $background['image']; } } else { $url = '{style_images_url}/_bgs/' . $background['image']; if( $background['thumbnail'] == 'auto' ) { $path = Platform::root() . '../_bgs/' . $background['image']; } } if( !isset($background['repeat']) ) { $background['repeat'] = true; } if( $background['repeat'] ) { $background['repeat'] = 'repeat'; } else { $background['repeat'] = 'no-repeat'; } if( !isset($background['fixed']) ) { $background['fixed'] = false; } if( $background['fixed'] ) { $attachment = 'background-attachment: fixed;'; $background['fixed'] = 'fixed'; } else { $attachment = ''; $background['fixed'] = 'scroll'; } if( (isset($background['default']) && $background['default'] && $selected_bg === null) || (('bg-' . $id) == $selected_bg) ) { $this->_css = $this->selector . ' { background-image: url(' . $url . '); ' . $attachment . ' background-repeat: ' . $background['repeat'] . '; }'; } if( $background['thumbnail'] == 'auto' ) { $thumburl = $this->_thumbnail($path); } else if( in_array(substr($background['thumbnail'], 0, 7), array('__', 'https:/')) ) { $thumburl = $background['thumbnail']; } else { $thumburl = '{style_images_url}/_bgs/' . $background['thumbnail']; } if( $thumburl !== null ) { $thumb = '<img src="' . $thumburl . '" />'; } else { $thumb = ''; } if( isset($background['tip']) ) { $background['tip'] = ' data-tip="' . $background['tip'] . '"'; } else { $background['tip'] = ''; } $this->_output[] = '<a id="bg-' . $id . '" href="' . $url . '" class="select_background" data-background data-background-repeat="' . $background['repeat'] . '" data-background-attachment="' . $background['fixed'] . '"' . $background['tip'] . '>' . $thumb . $background['description'] . '</a>'; } if( $this->put_your_own === true && $this->put_your_own_icon === true && Platform::feature('background_put_your_own') ) { $this->_output[] = '<a id="put-your-own" href="#" class="select_background" data-target-layer="putyourown" data-background data-background-attachment="fixed"><img src="{style_images_url}/_bgs/put_your_own.png" alt="Put your own" /></a>'; } if( !Platform::feature('background_picker') ) { $this->_output = array(); } } public function container_start($trigger_type = 'list-item', $label = 'Backgrounds') { if( $this->_container_type === null ) { $this->_container_type = 'dropdown'; if( Platform::feature('backgrounds_in_dropdown', true) ) { $this->_container_type = 'dropdown'; } else if( Platform::feature('backgrounds_in_balloon', true) ) { $this->_container_type = 'balloon'; } else if( Platform::feature('backgrounds_in_overlay', true) ) { $this->_container_type = 'overlay'; } } $this->_trigger_type = $trigger_type; $output = ''; if( $this->_trigger_type === 'list-item' ) { $output .= '<li id="nav_backgrounds" class="right"'; } else if( $this->_trigger_type === 'anchor' ) { $output .= '<a href="#"'; } if( $this->_container_type === 'dropdown' ) { $output .= ' data-dropdown="right"><span><a href="#">' . $label . '</a></span><ul><li id="ptBackgroundPicker">'; } else if( $this->_container_type === 'balloon' ) { $output .= ' data-target-domballoon="bgpicker"><a href="#">' . $label . '</a>' . ($this->_trigger_type === 'anchor' ? '' : '</li>'); $output .= '<div id="ptBackgroundPicker" data-domballoon="bgpicker"><div>'; } else if( $this->_container_type === 'overlay' ) { $output .= ' data-target-layer="bgpicker"><a href="#">' . $label . '</a>' . ($this->_trigger_type === 'anchor' ? '</a>' : '</li>'); $output .= '<div id="ptBackgroundPicker" data-layer="bgpicker"><div>'; } return $output; } public function container_end() { if( $this->_container_type === 'dropdown' ) { return '</li></ul>' . ($this->_trigger_type === 'anchor' ? '</a>' : '</li>'); } else { return '</div></div>'; } } public function backgrounds() { $this->load_backgrounds(); return $this->_output; } public function css() { $this->load_backgrounds(); return $this->_css; } public function js() { $settings = Platform::general()->get_background_elements(); return 'Platform.getCore().setOption('backgrounds', 'element', '' . $settings['element'] . '' );'; } protected function _thumbnail($path) { if( !file_exists($path) ) { return null; } $cacheKey = md5($path); $cachePath = Platform::root() . '../_cache/switcher.' . md5($path) . '.jpg'; if( file_exists($cachePath) ) { if( substr($path, 0, 4) == 'http' ) { if( (filemtime($cachePath) + (24*3600)) > time() ) { return '{style_images_url}/_cache/switcher.' . $cacheKey . '.jpg'; } } else { if( filemtime($cachePath) >= filemtime($path) ) { return '{style_images_url}/_cache/switcher.' . $cacheKey . '.jpg'; } } } $size = getimagesize($path); if( $size[2] == IMAGETYPE_PNG ) { $image = imagecreatefrompng($path); } else if( $size[2] == IMAGETYPE_GIF ) { $image = imagecreatefromgif($path); } else if( $size[2] == IMAGETYPE_JPEG ) { $image = imagecreatefromjpeg($path); } else { return null; } if( $size[0] < $size[1] ) { $coord = 0; } else { $coord = 1; } $thb = array(); $thb[0] = $this->_thumbnails; $thb[1] = $this->_thumbnails; $k = $size[abs($coord-1)] / $size[$coord]; $new = array(); $new[$coord] = $this->_thumbnails; $new[abs($coord-1)] = $this->_thumbnails * $k; $canvas = imagecreatetruecolor($new[0], $new[1]); imagecopyresampled($canvas, $image, 0, 0, 0, 0, $new[0], $new[1], $size[0], $size[1]); $ratio[0] = ($thb[0] / $new[0]); $ratio[1] = ($thb[1] / $new[1]); $canvas2 = imagecreatetruecolor($thb[0], $thb[1]); if( $new[0] > $new[1] ) { $crop[0] = round($new[0] * $ratio[1]); $crop[1] = $thb[1]; $src[0] = ceil(($new[0] / 2) - ($thb[0] / 2)); $src[1] = 0; } else if( $new[0] < $new[1] ) { $crop[1] = round($new[1] * $ratio[0]); $crop[0] = $thb[0]; $src[0] = 0; $src[1] = ceil(($new[1] / 2) - ($thb[1] / 2)); } else { $crop[0] = $thb[0]; $crop[1] = $thb[1]; $src[0] = 0; $src[1] = 0; } imagecopyresampled($canvas2, $canvas, 0 , 0 , $src[0], $src[1], $crop[0], $crop[1], $new[0], $new[1]); imagejpeg($canvas2, $cachePath); return '{style_images_url}/_cache/switcher.' . $cacheKey . '.jpg'; } } [/code]

[/spoiler]

  • 3 недели спустя...

Заменил картинки на свои(Расширение оставил такое же(2000х1091). Но почему отображаются до сих пор старые картинки?

Название картинки должно быть bgX.jpg, где X - порядковый номер.

Затем в _config/backgrounds.ini добавьте новую секцию.

Вот мой backgrounds.ini:


[bg1]
thumbnail=auto
image=bg1.jpg
default=on
[bg2]
thumbnail=auto
image=bg2.jpg
[bg3]
thumbnail=auto
image=bg3.jpg
[/CODE]

Специально ради интереса, удалил все картинки и обновил страницу в своем браузере, результат: все картинки опять же остались хоть я полностью очистил папку _bgs

SiNTaKsIs, значит Ccleaner-ом очистить куки в браузере и после очистки обновить страницу.

А вообще, то шаги там простые...

0ede8df0ba6c.jpg- папка с данными скина. IPB332 - это корень твоего форума.

719fa0394a81.jpg-Папка с фонами. Фон может иметь любое имя. Лишь бы не кириллица и без пробелов.

5516e69c269d.jpgпапка, где нахоится файл backgrounds.ini. Тебе тока он и нужен, чтобы в него прописывать свои картинки.

Вот пример файла у меня:


[bg1]

thumbnail=auto

image=bg1.jpg

[bg2]

thumbnail=auto

image=bg2.jpg

default=on

[bg3]

thumbnail=auto

image=bg3.jpg

[bg4]

thumbnail=auto

image=bg4.jpg

[bg5]

thumbnail=auto

image=bg0.jpg

[bg6]

thumbnail=auto

image=bg5.jpg

[bg7]

thumbnail=auto

image=kamen-stena.jpg

Где фон bg2.jpg с параметром default=on задан по умолчанию. так жеэтот параметр можно применить к любому другому изображению, методом вырезки и вставки строки в текстовом редакторе.

cb50f9912814.jpg

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 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.