Allvideo Plugin by JW

Locked
tuning4u
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Oct 20, 2007 9:28 am

Allvideo Plugin by JW

Post by tuning4u » Sat Oct 20, 2007 9:44 am

Hi there, i am trying to install the jw allvideos plugin in my Joomla website. I have joomla 1.5 RC3.
When i install the plugin everything is ok. it is installed properly with all the files and directories. The problem is that i can't see the content i am trying to input. For example: it uses a $text variable for example {[youtube]}AjHSu4wNTyw{/[youtube]} and it fails to work...

I have read some articles and tried to change some configs in the plugin_jw_allvideos.php.

Code: Select all

<?php

defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');

$_MAMBOTS->registerFunction( 'onPrepareContent', 'AllVideos_group_one' );

function AllVideos_group_one( $published, &$row, &$params, $page=0 ) {

global $mosConfig_absolute_path, $mosConfig_live_site, $mosConfig_session_type, $mainframe, $database;
  $query = "SELECT id FROM #__mambots WHERE element = 'plugin_jw_allvideos' AND folder = 'content'";
  $database->setQuery( $query );
  $id = $database->loadResult();
  $mambot = new mosMambot( $database );
  $mambot->load( $id );
  $param =& new mosParameters( $mambot->params );  
  $allvideos_css = $param->get('allvideos_css', 'allvideos');
  $width = 'width:'.$param->get('width', 400).'px;';
  $height = 'height:'.$param->get('height', 323).'px;';
  $top_margin = 'margin-top:'.$param->get('top_margin', 8).'px;';
  $bottom_margin = 'margin-bottom:'.$param->get('bottom_margin', 8).'px;';
  $video_align = 'text-align:'.$param->get('video_align', 'center').';';
  $video_folder = $param->get('video_folder', 'images/stories/videos/');
  $video_transparency = $param->get('video_transparency', 'transparent');
  $video_bg = $param->get('video_bg', '');
  $autostart = '&'.$param->get('autostart', 'autostart=false');
  $audio_folder = $param->get('audio_folder', 'images/stories/audio/');
  $ifilmwidth = 'width:'.$param->get('ifilmwidth', 400).'px;';
  $ifilmheight = 'height:'.$param->get('ifilmheight', 323).'px;';
  $metacafewidth = 'width:'.$param->get('metacafewidth', 400).'px;';
  $metacafeheight = 'height:'.$param->get('metacafeheight', 323).'px;'; 
  $cwidth = $param->get('width', 400);
  $cheight = $param->get('height', 323);  
  $awidth = 'width:'.$param->get('awidth', 300).'px;';
  $aheight = 'height:'.$param->get('aheight', 20).'px;';

(....)
	  
// prepend and append code
$startcode = "\n\n<!-- JW AllVideos Plugin (v2.4) starts here -->\n<div style=\"clear:both;".$video_align.$top_margin.$bottom_margin."\" class=\"".$allvideos_css."\">\n";
$endcode = "\n</div>\n<!-- JW AllVideos Plugin (v2.4) ends here -->\n\n";
	    if ( !$published ) {		
		    foreach ($regex as $key => $value) {
		      $row->text = preg_replace( $regex[$key][1], '', $row->text );
		    }
		    return;
	    }		
	    foreach ($regex as $key => $value) {  // searching for marks     	    		    	
	    	if (preg_match_all($regex[$key][1], $row->text, $matches, PREG_PATTERN_ORDER) > 0) {      			 
	    		foreach ($matches[0] as $match) {	
				$match = preg_replace("/{.+?}/", "", $match); 
				$code = str_replace("***code***", $match, $regex[$key][0] );

				//$row->text = preg_replace( "#{".$key."}".$match."{/".$key."}#s", $startcode.$code.$endcode , $row->text );
				$row->text = preg_replace("#{".preg_quote($key)."}".preg_quote($match)."{/".preg_quote($key)."}#s", $startcode.$code.$endcode , $row->text );
	    		}
	    	}	    	
	    }  
}

The Changes i made:

From:

Code: Select all

defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
To:

Code: Select all

defined('_JEXEC' ) or die( 'Restricted access' );
From:

Code: Select all

$_MAMBOTS->registerFunction( 'onPrepareContent', 'AllVideos_group_one' );
To:

Code: Select all

$mainframe->registerEvent( 'onPrepareContent', 'AllVideos_group_one' );
but now i am lost... can anyone help me continuing this work.?

cavijayan
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Nov 22, 2007 3:59 pm

Re: Allvideo Plugin by JW

Post by cavijayan » Thu Nov 22, 2007 7:40 pm

Hi

Check your email.

I've sent it u the file to ur email.

Its 1.5 native version. But i havent check it fully. But so far its working properly for me.

Pls Check it.

User avatar
tfuller
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 218
Joined: Tue Sep 20, 2005 11:30 pm
Location: Oregon
Contact:

Re: Allvideo Plugin by JW

Post by tfuller » Thu Nov 29, 2007 5:26 pm

I'd love to get that file to test too cavijayan!
Author of component Joomla Bible Study:
http://www.JoomlaBibleStudy.org

j2chulo
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Sat Feb 16, 2008 3:56 am

Re: Allvideo Plugin by JW

Post by j2chulo » Fri Mar 21, 2008 7:58 pm

anybody have problem when playing avi? i have problem when i try to play avi from my local server. the if i scroll the page the video gets out of place and the player stay black while the movies its floating down or up depending what direction i scroll the page.. Any fix for this?

noway277
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Sun Feb 17, 2008 11:53 am

Re: Allvideo Plugin by JW

Post by noway277 » Tue Apr 15, 2008 5:30 pm

Hi All...Please help me.

When i installed Allvideo Plugin 2.4 in localhost everything went smooth.
but after i online nothing show up, even the play button

i inserted code {mp3}mysong{/mp3}
i already tried too this long code {mp3}mysong.mp3{/mp3}
and {mp3}http://www.myweb.com/directory/images/s ... ysong{/mp3} is same not work!!! :'(

HELP PLEASE ANY IDEA???
WAITING FOR YOUR HELP SOON

EnEf


Locked

Return to “Third Party Testing for Joomla! 1.5”