Fork me on GitHub

Rapport de message :*
 

Re: modification de Xstreamer

Titre du sujet : Re: modification de Xstreamer
par laloutre sur 21/10/2006 16:20:20

donc les raccourcis que tu done ne fonctionne pas plus que les miens... j'ai essayer sur un site de test, et c'est pareil... je n'arrive pas a comprendre son systeme de path... il compare ca a linux, mais ca na aucun rapport. tout le monde n'a pas un serveur

j'ai regarder un peu le template pour voir comment faire, mais je ne pense pas que ca soit la seule chose a modifier, en effet cela fait référence a <{$xstreamer_video.filepath}> qui doit etre utiliser dans un autre fichier que des template non?

je vais rechercher toutes ses occurences pour voir...

je me serais bien rapprocher de la version payante, mais leur site est indisponible

edit

<td class="head">File Path<br><small>Full path the the FLV video file.</small></td>
<
td class="even">
<
input name="filepath" id="filepath" size="60" maxlength="255" value="<{$xstreamer_video.filepath}>">
        </
td></tr>



filepath est cité peu de fois

function filePath() {
    return 
$this->getVar('filepath');
  }



function videoFileSize() {
    return 
filesize($this->getVar('filepath'));
  }


//more checks
    
if ($this->name() == '')
      
$this->setErrors('name','Video name is required.');
    if (!
file_exists($this->filePath()))
      
$this->setErrors('filepath','File not found at this location. Check file path and file permissions.');
    if (!(
$this->categoryID() > 0))
      
$this->setErrors('category_id','Category is required');
  }


function streamVideo($position=null) {
    require_once(
XSTREAMER_CLASS_PATH.'/video/video.php');
    
//
    
$hCommon =& getPSPModuleHandler('common');
    
//
    
if (!($position 0)) {
      
$hThis   =& getPSPModuleHandler('video');
      
$hThis->incrementPlayed($this);
    }
    
//
    
$bandwidth  $hCommon->getModuleOption('bandwidthThrottleValue');
    
//
    
$video =& new Video();
    
$video->setFile($this->filePath()); 
    
$video->setBitrate($bandwidth*1024);
    
$video->enableThrottle($hCommon->getModuleOption('bandwidthThrottle') == 1);  
    
$video->streamVideo($position);  
  }
  
}


class xStreamerVideo extends PSPBaseObject {

  function 
xStreamerVideo($id null) {
    
$this->initVar('id'XOBJ_DTYPE_INTnullfalse);
    
$this->initVar('category_id'XOBJ_DTYPE_INTnullfalse);
    
$this->initVar('name'XOBJ_DTYPE_TXTBOXnulltrue255'''Video Name');
    
$this->initVar('width'XOBJ_DTYPE_INTnullfalse);
    
$this->initVar('height'XOBJ_DTYPE_INTnullfalse);
    
$this->initVar('filepath'XOBJ_DTYPE_TXTBOXnulltrue255'''FLV File Path');
    
$this->initVar('description'XOBJ_DTYPE_TXTBOXnullfalse64000);
    
$this->initVar('date_added'XOBJ_DTYPE_INTnulltrue);
    
$this->initVar('rating'XOBJ_PSP_DTYPE_FLOAT0false);
    
$this->initVar('views'XOBJ_DTYPE_INT0false);
    
$this->initVar('votes'XOBJ_DTYPE_INT0false);
    
$this->initVar('comments'XOBJ_DTYPE_INT0false);
    
$this->initVar('visible'XOBJ_DTYPE_INT1false);
    
//
    
if (isset($id)) {
      if (
is_array($id)) {
        
$this->assignVars($id);
      }
    } else {
      
$this->setNew();
    }


et dans le fichier sql

`filepathvarchar(255NOT NULL default '',


donc je remplace dans le template

<td class="even">
<
input name="filepath" id="filepath" size="60" maxlength="255" [b]value="http://"[/b]>



mais pour les autres bout de code, je vois pas trop ce qu'il faire...
Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

75 Personne(s) en ligne (59 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 75 | Plus ...