Новости Joomla

0 Пользователей и 1 Гость просматривают эту тему.
  • 3 Ответов
  • 3144 Просмотров
*

co11ter

  • Захожу иногда
  • 151
  • 8 / 0
JW Player Plugin
« : 27.04.2011, 17:40:59 »
После установки плагина по всему сайту появилась надпись:

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/c/cl46839/public_html/plugins/content/jw_player.php on line 41
Warning: implode() [function.implode]: Invalid arguments passed in /home/c/cl46839/public_html/plugins/content/jw_player.php on line 41


Что это за ошибка и как ее устранить?
*

dblanes07

  • Новичок
  • 3
  • 0 / 0
Re: JW Player Plugin
« Ответ #1 : 04.06.2011, 16:41:00 »
Такая же проблема
*

co11ter

  • Захожу иногда
  • 151
  • 8 / 0
Re: JW Player Plugin
« Ответ #2 : 05.06.2011, 14:54:24 »
dblanes07 мой пост висит уже два месяца и никто не ответил, так что проще найти себе другое расширение.
Я пользуюсь AllVideos Reloaded
*

katerina

  • Осваиваюсь на форуме
  • 20
  • 0 / 0
Re: JW Player Plugin
« Ответ #3 : 22.12.2011, 05:32:54 »
Такая же проблема недавно появилась. Кто знает как исправить? Вот ссылка на сайт с ошибкой: http://kandadzia.ru/news.html
Код jw_player.php
Код
<?php
/*
 * JW Player for Joomla! 1.5
 * Author: Max
 * Version: 1.1
 * Last Update: 26/02/2010
 *
 * JW Player
 * Author: Jeroen Wijering
 * ULR: http://www.longtailvideo.com/players/jw-flv-player/
 * Version: 4.7.811
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.plugin.plugin' );

class plgContentJw_player extends JPlugin {

   function plgContentJw_player( &$subject, $params ) {
      parent::__construct( $subject, $params );
   }

   function onPrepareContent( &$article, &$params ) {

      // API
      $mainframe= &JFactory::getApplication();

      // Assign paths
      $sitePath = JPATH_SITE;
      $siteUrl  = substr(JURI::root(), 0, -1);

      // Check if plugin is enabled
      if(JPluginHelper::isEnabled('content','jw_player')==false) return;

      // ------------------------------------ Prepare elements -------------------------------------
      // Includes
      require_once($sitePath.DS.'plugins'.DS.'content'.DS.'jw_player'.DS.'sources.php');
      // Simple performance check to determine whether plugin should process further
      $grabTags = str_replace("(","",str_replace(")","",implode(array_keys($tagReplace),"|")));
      if(preg_match("#{(".$grabTags.")}#s",$article->text)==false) return;


      // ---------------------------------- Get plugin parameters ----------------------------------
      // Outside Parameters
      if(!$params) $params = new JParameter(null);

      $plugin = & JPluginHelper::getPlugin('content','jw_player');
      $pluginParams = new JParameter( $plugin->params );

      /* Video */
      $videofolder             = ($params->get('videofolder'))? $params->get('videofolder') : $pluginParams->get('videofolder','media/videos');
      $videowidth              = ($params->get('videowidth'))? $params->get('videowidth') : $pluginParams->get('videowidth',400);
      $videoheight             = ($params->get('videoheight'))? $params->get('videoheight') : $pluginParams->get('videoheight',300);
      $transparency            = $pluginParams->get('transparency','transparent');
      $background              = $pluginParams->get('background','#010101');
      /* Audio */
      $audiofolder             = $pluginParams->get('audiofolder','media/audio');
      $audiowidth              = $pluginParams->get('audiowidth',300);
      $audioheight             = $pluginParams->get('audioheight',20);
      /* Playlist */
      $playlistsize            = $pluginParams->get('playlistsize',350);
      $shuffle                 = $pluginParams->get('shuffle',0);
      /* General */
      $fullscreen              = ($pluginParams->get('fullscreen',0))? 'true' : 'false';
      $autoplay                = ($pluginParams->get('autoplay',0))? 'true' : 'false';
      $downloadLink            = ($params->get('downloadLink'))? $params->get('downloadLink') : $pluginParams->get('downloadLink',1);
      $skin                    = $pluginParams->get('skin','');
      $logo                    = $pluginParams->get('logo','');
      /* Advanced */
      $debugMode               = $pluginParams->get('debugMode',0);
      if($debugMode==0) error_reporting(0); // Turn off all error reporting

      if($shuffle==1) {
         $shuffle="&shuffle=true";
      }
      else {
         $shuffle="";
      }
      if($skin!="") {
         $skin="&skin=".$siteUrl."/plugins/content/jw_player/skins/".$skin;
      }
      if($logo!="") {
         $logo="&logo=".$siteUrl."/".$logo;
      }

      $document = & JFactory::getDocument();
      $document->addStyleSheet('plugins/content/jw_player/style.css');

      // ------------------------------------ Render the output ------------------------------------
      foreach($tagReplace as $plg_tag => $value) {
         // expression to search for
         $regex = "#{".$plg_tag."}(.*?){/".$plg_tag."}#s";
         // process tags
         if(preg_match_all($regex, $article->text, $matches, PREG_PATTERN_ORDER) > 0) {
            // start the replace loop
            foreach ($matches[0] as $key => $match) {
               $tagcontent = preg_replace("/{.+?}/", "", $match);
               $tagparams  = explode('|',$tagcontent);
               $tagsource  = trim(strip_tags($tagparams[0]));

               // source elements
               $findAVparams = array(
                  "{SOURCE}",
                  "{FOLDER}",
                  "{WIDTH}",
                  "{HEIGHT}",
                  "{TRANSPARENCY}",
                  "{BACKGROUND}",
                  "{FULLSCREEN}",
                  "{AUTOPLAY}",
                  "{PLAYLISTSIZE}",
                  "{SHUFFLE}",
                  "{SKIN}",
                  "{LOGO}",
                  "{SITEURL}",
               );

               // Prepare the HTML
               $output = new JObject;

               // replacement elements
               if(in_array($plg_tag, array("mp3","mp3remote","mp3playlist"))) {

                  $final_width    = (@$tagparams[1])? $tagparams[1] : $audiowidth;
                  $final_height   = (@$tagparams[2])? $tagparams[2] : $audioheight;
                  $final_autoplay = (@$tagparams[3])? $tagparams[3] : $autoplay;
                  $final_folder   = $audiofolder;

                  if($plg_tag=="mp3playlist") {
                     $final_height=$final_height+$playlistsize;
                  }
                 
                  $output->playerWidth  = $audiowidth;
                  $output->playerHeight = $audioheight;

               } else {

                  $final_width    = (@$tagparams[1])? $tagparams[1] : $videowidth;
                  $final_height   = (@$tagparams[2])? $tagparams[2] : $videoheight;
                  $final_autoplay = (@$tagparams[3])? $tagparams[3] : $autoplay;
                  $final_folder   = $videofolder;

                  if($plg_tag=="videoplaylist") {
                     $final_height=$final_height+$playlistsize;
                  }
                 
                  $output->playerWidth  = $final_width;
                  $output->playerHeight = $final_height;

               }

               $replaceAVparams = array(
                  $tagsource,
                  $final_folder,
                  $final_width,
                  $final_height,
                  $transparency,
                  $background,
                  $fullscreen,
                  $final_autoplay,
                  $playlistsize,
                  $shuffle,
                  $skin,
                  $logo,
                  $siteUrl,
               );

               $output->player = JFilterOutput::ampReplace(str_replace($findAVparams, $replaceAVparams, $tagReplace[$plg_tag]));

               if($downloadLink && (in_array($plg_tag, array("flv","mp3","mp4"))) ) {

                  $filesize = filesize($sitePath.'/'.$final_folder.'/'.$tagsource.'.'.$plg_tag);
                  $units       = array('B', 'kB', 'MB', 'GB', 'TB', 'PB');
                  $i           = 0;
                  while($filesize>=1024) {
                     $filesize = $filesize/1024;
                     $i++;
                  }
                  $filesize = round($filesize, 2)."".$units[$i];
                  $output->downloadLink = '<a href="'.$siteUrl.'/'.$final_folder.'/'.$tagsource.'.'.$plg_tag.'" title="Download">Click</a> to download in '.strtoupper($plg_tag).' format ('.$filesize.')';

               } else {
                  $output->downloadLink = '';
               }

               $getTemplate = '
<!-- JW Player Plugin (start) -->
<div class="player">
<div class="player-box">'.$output->player.'</div>
<div class="player-text">
'.$output->downloadLink.'
</div>
</div>
<!-- JW Player Plugin (end) -->
';

               // Do the replace
               $article->text = preg_replace("#{".$plg_tag."}".preg_quote($tagcontent)."{/".$plg_tag."}#s", $getTemplate , $article->text);

            } // end foreach
         } // end if
      }
   }

}
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Фатальная ошибка после включения плагина MP3 Browser Plugin

Автор tinka

Ответов: 7
Просмотров: 2181
Последний ответ 04.03.2020, 20:00:10
от glushilka
[РЕШЕНО]smooth scroll plugin

Автор lexxbry

Ответов: 5
Просмотров: 2318
Последний ответ 19.06.2018, 11:39:48
от dmitry_stas
Extra News Plugin не корректно работает в Joomla 3.7.5

Автор kosopuzik

Ответов: 0
Просмотров: 1116
Последний ответ 15.09.2017, 23:13:13
от kosopuzik
JW Player

Автор FloRes

Ответов: 2
Просмотров: 1326
Последний ответ 17.01.2015, 21:27:33
от mr.shusty
Very Simple Image Gallery Plugin

Автор JDV

Ответов: 1
Просмотров: 1240
Последний ответ 19.02.2014, 16:31:53
от JDV