Чувствую что сдесь (в hwdvideoshare.class.php)нужно что то подправить но не знаю что именно !
* Generates the Download Video Button
*
* @param array $row the video sql data
* @param int $original link to original video or converted flv video (0/1)
* @return $code
*/
function generateDownloadVideoLink( $row, $original=0 ) {
global $Itemid, $database, $mosConfig_absolute_path;
$c = hwd_vs_Config::get_instance();
$db = & JFactory::getDBO();
$my = & JFactory::getUser();
$acl= & JFactory::getACL();
$usersConfig = &JComponentHelper::getParams( 'com_users' );
// check component access settings and deny those without privileges
if ($c->access_method == 0) {
if (!hwd_vs_access::allowAccess( $c->gtree_dnld, $c->gtree_dnld_child, hwd_vs_access::userGID( $my->id ))) {
if ( ($my->id < 1) && (!$usersConfig->get( 'allowUserRegistration' ) == '0' && hwd_vs_access::allowAccess( $c->gtree_upld, 'RECURSE', $acl->get_group_id('Registered','ARO') ) ) ) {
return;
} else {
return;
}
}
} else if ($c->access_method == 1) {
if (!hwd_vs_access::allowLevelAccess( $c->accesslevel_dnld, hwd_vs_access::userGID( $my->id ))) {
return;
}
}
// setup antileech system expiration
$dlink = hwd_vs_tools::generateAntileechExpiration($row->id, 'local', 'download');
$code =null;
if ($original == 0) {
$code =null;
$code.= "<form name=\"downloadoriginal\" action=\"".$dlink."\" method=\"post\">
<input type=\"image\" src=\"".JURI::root( true )."/components/com_hwdvideoshare/images/icons/download.png\" alt=\"Download FLV Video\" id=\"downloadoriginalbutton\" />
<input type=\"submit\" value=\"Cкачати відео у FLA фоÑ?маті\" class=\"interactbutton\" />
</form>";
} else {
$directory = HWDVIDSPATH."/../../hwdvideos/uploads/originals/"; //trailing slash
$wtlf = $row->video_id; //what to look for
$flag = false;
$ext = array( '.mpg' , '.mpeg' , '.avi' , '.divx' , '.mp4' , '.flv' , '.wmv' , '.rm' , '.mov' , '.moov' , '.asf' , '.swf' , '.vob' );
for( $i = 0; count( $ext ) > $i; $i++ )
{
if( file_exists( $directory . $wtlf . $ext[$i] ) )
{
$flag = true;
$name = $wtlf . $ext[$i];
}
}
if (!empty($name) && file_exists(HWDVIDSPATH."/../../hwdvideos/uploads/originals/".$name)) {
$code.= "<form name=\"downloadoriginal\" action=\"".JURI::root( true )."/hwdvideos/uploads/originals/".$name."\" method=\"post\">
<input type=\"image\" src=\"".JURI::root( true )."/components/com_hwdvideoshare/images/icons/download.png\" alt=\"Download Original Video\" id=\"downloadoriginalbutton\" />
<input type=\"submit\" value=\"Download Original Video\" class=\"interactbutton\" />
</form>";
}
}
return $code;
}
/**
* Generates the View Original Video Button
*
* @param array $row the video sql data
* @return $code
*/
function generateViewOriginalLink( $row ) {
global $Itemid, $database, $mosConfig_absolute_path;
$c = hwd_vs_Config::get_instance();
$db = & JFactory::getDBO();
$code =null;
$plugin = hwd_vs_tools::getPluginDetails($row->video_type);
if (!$plugin) {
$code.= "";
} else {
// print third party thumbnail
$prepareurl = preg_replace("/[^a-zA-Z0-9s_-]/", "", $row->video_type)."PrepareVideoURL";
if ($url = $prepareurl($row->video_id)) {
$code.= "<form name=\"vieworiginal\" action=\"".$url."\" method=\"post\">
<input type=\"image\" src=\"".JURI::root( true )."/components/com_hwdvideoshare/images/icons/view.png\" alt=\""._HWDVIDS_VOV."\" id=\"vieworiginalbutton\" />
<input type=\"submit\" value=\""._HWDVIDS_VOV."\" class=\"interactbutton\" />
</form>";
} else {
$code.= "";
}
}
return $code;
}