jplayer темизация

Главные вкладки

Аватар пользователя Aectann Aectann 19 января 2014 в 15:35

Пытаюсь темизировать jplayer.

Зашел в папка_модуля/theme/ там файл THEMING.txt

в нем следующее
«- THEMING -
If you want to override jpalyer.css or jplayer.js place your files under
'your_theme_directory/jplayer/'.

! IMPORTANT !
jplayer.css and jplayer.jpg have to be in the same folder, so if you want to
override one of them copy also the other one. »

Хорошо. Копирую всю папку "theme" к себе в тему и обзываю "jplayer"
Меняю немного css и чищу кэш.

Результат нулевой.

Смотрю в коде там css подхватывается из /sites/all/modules/jplayer/theme/jplayer.css

Работает ли этот метод темизации плеера вообще? Или я что-то не правильно делаю?

Update: и еще в журнале полно вот таких предупреждений.

Notice: Undefined index: type в функции jplayer_sort_files() (строка 170 в файле /sites/all/modules/jplayer/includes/jplayer.theme.inc).
Notice: Undefined index: type в функции jplayer_sort_files() (строка 176 в файле /sites/all/modules/jplayer/includes/jplayer.theme.inc).

Как исправить?

Вот эти строчки

<?php
    
if (isset($file) && $file['type'] == 'audio') {
      
$files[][$file['ext']] = $file['url'];
      
$extensions[] = $file['ext'];
      
$playlist[] = l($file['label'], $file['url'], array('attributes' => array('id' => $player_id '_item_' $num'tabindex' => 1)));
      
$num++;
    }
    elseif (isset(
$file) && $file['type'] == 'video') {
      
$files[][$file['ext']] = $file['url'];
      if (
$poster != NULL) {
        
$files[]['poster'] = $poster;
      }
      
$extensions[] = $file['ext'];
      
$playlist[] = l($file['label'], $file['url'], array('attributes' => array('id' => $player_id '_item_' $num'tabindex' => 1)));
      
$num++;
    }
?>

Комментарии

Аватар пользователя PVasili PVasili 2 августа 2020 в 21:02

Похоже вы не до конца дочитали README.txt.
Там ясно написано, что в своей теме в template.php необходимо (стандартно для тем) прописать путь к css и js:

stylesheets[all][] = css/jplayer.css
scripts[] = jplayer.js

ну и сбросить кеш.