Это мне не понравилось (хоть и 10 КиБ, но каждый раз же!) и решил сделать стили статическими,
а за одно и пожать файл yuicompressor'ом.
Решил выложить, вдруг кому пригодится.
/includes/functions.php
Код: Выделить всё
FIND:
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
ADD BEFORE:
$t_stylesheet_link = "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme/pack/stylesheet-' . $user->data['user_lang'] . '.css';
FIND:
'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : "{$phpbb_root_path}style.$phpEx?sid=$user->session_id&id=" . $user->theme['style_id'] . '&lang=' . $user->data['user_lang'],
REPLACE:
'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : ( (file_exists($t_stylesheet_link)) ? $t_stylesheet_link : "{$phpbb_root_path}style.$phpEx?sid=$user->session_id&id=" . $user->theme['style_id'] . '&lang=' . $user->data['user_lang'] ),
/styles/prosilver/imageset/imageset.cfg
Код: Выделить всё
FIND:
# General Information about this style
ADD BEFORE:
[general]
FIND:
# Images
ADD BEFORE:
[images]
Код: Выделить всё
FIND:
# Images
ADD BEFORE:
[images]
Правим конфиг ./maintenance/update-prosilver.conf
И запускаем:
./maintenance/update-style.sh prosilver
Зависимости:
- bash
- Python (2.4—2.6)
- yuicompressor http://developer.yahoo.com/yui/compressor/
для пользователей ArchLinux: есть в AUR;
для остальных: нужен скрипт-обертка запускающий yuicompressor-x.y.z.jar и передающий параметры командной строки.


