Bonjour,
Dans le module x_movie et la page video_view.html, je voudrais afficher l'url du posteur "membre" si il en a un
je crois que ça se passe du coté de ce fichier mais je trouve pas comment faire
<?php
include "header.php";
$myts =& MyTextSanitizer::getInstance();// MyTextSanitizer object
include_once XOOPS_ROOT_PATH."/class/xoopstree.php";
include_once XOOPS_ROOT_PATH."/include/xoopscodes.php";
$mytree = new XoopsTree($xoopsDB->prefix("x_movie_cat"),"cid","pid");
$lid = intval($_GET['lid']);
$cid = intval($_GET['cid']);
$xoopsOption['template_main'] = 'x_movie_view.html';
include XOOPS_ROOT_PATH."/header.php";
ob_start();
xoopsCodeTarea("com_text",50,8);
$xoopsTpl->assign('xoops_codes', ob_get_contents());
ob_end_clean();
ob_start();
xoopsSmilies("com_text");
$xoopsTpl->assign('xoops_smilies', ob_get_contents());
ob_end_clean();
$sql = sprintf("UPDATE %s SET hits = hits+1 WHERE lid =$lid AND status > 0", $xoopsDB->prefix("x_movie"), $lid);
$xoopsDB->queryF($sql);
$result = $xoopsDB->query("select l.lid, l.cid, l.title, l.url, l.size, l.logourl, l.submitter, l.status, l.date, l.hits, l.rating, l.votes, l.comments, l.sizelog, l.source, l.url_source, l.siteinternet, l.infosup, l.auteur, t.description from ".$xoopsDB->prefix("x_movie")." l, ".$xoopsDB->prefix("x_movie_text")." t where l.lid=$lid and l.lid=t.lid and status>0");
list($lid, $cid, $ltitle, $url, $size, $logourl, $uid, $status, $time, $hits, $rating, $votes, $comments, $sizelog, $source, $url_source, $siteinternet, $infosup, $auteur, $message) = $xoopsDB->fetchRow($result);
$pathstring = "<a href='index.php'>"._MD_X_MOVIE_MAIN."</a> : ";
$pathstring .= $mytree->getNicePathFromId($cid, "title", "viewcat.php?op=");
$xoopsTpl->assign('category_path', $pathstring);
if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) {
$adminlink = '<a href="'.XOOPS_URL.'/modules/x_movie/admin/index.php?op=modMovie&lid='.$lid.'"><img src="'.XOOPS_URL.'/modules/x_movie/images/editicon.gif" border="0" alt="'._MD_X_MOVIE_EDITTHISLINK.'" /></a>';
} else {
$adminlink = '';
}
if ($votes == 1) {
$votestring = _MD_X_MOVIE_ONEVOTE;
} else {
$votestring = sprintf(_MD_X_MOVIE_NUMVOTES,$votes);
}
$edit_user = !empty($xoopsUser) ? $xoopsUser->getVar('uid') : 0;
if ($edit_user == $uid) {
$edit_user = '| <a href="'.XOOPS_URL.'/modules/x_movie/modmovie.php?cid='.$cid.'&lid='.$lid.'">'._MD_X_MOVIE_MODIFY.'</a></b>';
} else {
$edit_user = '';
}
if ($xoopsModuleConfig['useshots'] == 1) {
$xoopsTpl->assign('shotwidth', $xoopsModuleConfig['shotwidth']);
$xoopsTpl->assign('tablewidth', $xoopsModuleConfig['shotwidth'] + 10);
$xoopsTpl->assign('show_screenshot', true);
$xoopsTpl->assign('lang_noscreenshot', _MD_X_MOVIE_NOSHOTS);
}
//$pathinfo_url = pathinfo($myts->makeTboxData4Show($url));
//$movietype = $pathinfo_url['extension'];
if($xoopsModuleConfig['topshow'] == 1){
$topbanner = $xoopsModuleConfig['topbanner'];
}
if($xoopsModuleConfig['bottomshow'] == 1){
$bottombanner = $xoopsModuleConfig['bottombanner'];
}
//ƒvƒŒƒCƒ„[‚Ì“Ç‚Ýž‚Ý
include "tpl_player.php";
//EMBED‚Ì“Ç‚Ýž‚Ý
if ($xoopsModuleConfig['embedshow'] == 1) {
if ( $xoopsUser ) {
include "tpl_embedcode.php";
}else {
$embed = "<small>"._MD_X_MOVIE_EMBEDHIDE."</small>";
}
}else{
$embed = "";
}
//x_movieGETƒGƒ“ƒWƒ“‚Ì“Ç‚Ýž‚Ý
if ($xoopsModuleConfig['x_movieget'] == 1) {
include "tpl_get_engine.php";
}else{
$x_movieget = "";
}
//ƒ€[ƒr[ƒ^ƒCƒv‚Ì“Ç‚Ýž‚Ý
include "tpl_movietype.php";
//---------------------------------
if ($xoopsModuleConfig['viewselect'] == 1) {
$view = true;
}elseif($xoopsModuleConfig['viewselect'] == 0){
$xoopsTpl->assign('subwinwidth', $xoopsModuleConfig['subwinwidth']);
$xoopsTpl->assign('subwinheight', $xoopsModuleConfig['subwinheight']);
$view = false;
}
$uname = XoopsUser::getUnameFromId($uid);
if ( $xoopsUser ) {
$submitter = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$uid.'" target="_blank">'.$uname.'</a>';
}else{
$submitter = $uname;
}
//---------------------------------
$path = $mytree->getPathFromId($cid, "title");
$path = substr($path, 1);
$path = str_replace("/"," <img src='".XOOPS_URL."/modules/x_movie/images/arrow.gif' board='0' alt='' /> ",$path);
$new = newmoviegraphic($time, $status);
$pop = popgraphic($hits);
$xoopsTpl->assign('link', array(
'topbanner' => $topbanner,
'player' => $player,
'bottombanner' => $bottombanner,
'embed' => $embed,
'x_movieget' => $x_movieget,
'id' => $lid,
'cid' => $cid,
'rating' => number_format($rating, 2),
'rate' => round( $rating ) ,
'title' => $myts->makeTboxData4Show($ltitle).$new.$pop,
'category' => $path,
'logourl' => $myts->makeTboxData4Show($logourl),
'updated' => formatTimestamp($time,"m"),
'description' => $myts->makeTareaData4Show($message,0),
'adminlink' => $adminlink,
'submitter' => $submitter,
'size' => $size,
'edit_user' => $edit_user,
'movietype' => $movietype,
'view' => $view,
'hits' => $hits,
'votes' => $votestring,
'comments' => $comments,
'sizelog' => $sizelog,
'source' => $source,
'url_source' => $url_source,
'siteinternet' => $siteinternet,
'infosup' => $infosup,
'auteur' => $auteur,
'mail_subject' => rawurlencode(sprintf(_MD_X_MOVIE_INTRESTLINK,$xoopsConfig['sitename'])),
'mail_body' => rawurlencode(sprintf(_MD_X_MOVIE_INTLINKFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/x_movie/singlemovie.php?cid='.$cid.'&lid='.$lid)
));
//added by avelo
$xoopsTpl->assign('lang_mostrate', _MD_X_MOVIE_MOSTRATE);
$xoopsTpl->assign('lang_mostview', _MD_X_MOVIE_MOSTVIEW);
$xoopsTpl->assign('lang_main', _MD_X_MOVIE_MAIN);
$xoopsTpl->assign('lang_sendx_movie', _MD_X_MOVIE_SENDx_movie);
$xoopsTpl->assign('lang_gallery', _MD_X_MOVIE_GALLERY);
$xoopsTpl->assign('lang_infobulle', _MD_X_MOVIE_INFOBULLE);
//end avelosign('lang_submitter', _MD_X_MOVIE_SUBMITTER);
$xoopsTpl->assign('lang_description', _MD_X_MOVIE_DESCRIPTIONC);
$xoopsTpl->assign('lang_lastupdate', _MD_X_MOVIE_LASTUPDATEC);
$xoopsTpl->assign('lang_hits', _MD_X_MOVIE_HITSC);
$xoopsTpl->assign('lang_rating', _MD_X_MOVIE_RATINGC);
$xoopsTpl->assign('lang_movietype', _MD_X_MOVIE_TYPE);
$xoopsTpl->assign('lang_ratethissite', _MD_X_MOVIE_RATETHISSITE);
$xoopsTpl->assign('lang_reportbroken', _MD_X_MOVIE_REPORTBROKEN);
$xoopsTpl->assign('lang_tellafriend', _MD_X_MOVIE_TELLAFRIEND);
$xoopsTpl->assign('lang_modify', _MD_X_MOVIE_MODIFY);
$xoopsTpl->assign('lang_latestlistings' , _MD_X_MOVIE_LATESTLIST);
$xoopsTpl->assign('lang_category' , _MD_X_MOVIE_CATEGORYC);
$xoopsTpl->assign('lang_visit' , _MD_X_MOVIE_VISIT);
$xoopsTpl->assign('lang_comments' , _COMMENTS);
$xoopsTpl->assign('lang_x_movie_title' , _MD_X_MOVIE_TITLE);
$xoopsTpl->assign('lang_size' , _MD_X_MOVIE_TIMES);
$xoopsTpl->assign('lang_source' , _MD_X_MOVIE_SOURCE);
$xoopsTpl->assign('lang_urlsource' , _MD_X_MOVIE_URLSOURCE);
$xoopsTpl->assign('lang_toprank' , _MD_MOVIERANK_TOPHITS);
$xoopsTpl->assign('lang_tophits' ,_MD_MOVIERANK_TOPRATE);
$xoopsTpl->assign('lang_movieregist' , _MD_MOVIE_REGIST);
$xoopsTpl->assign('lang_version', _MD_X_MOVIE_VERSION);
$xoopsTpl->assign('xoops_pagetitle', 'Vidéo-Formation gratuite' . " : " . $ltitle);
include XOOPS_ROOT_PATH.'/include/comment_view.php';
include XOOPS_ROOT_PATH.'/footer.php';
?>
Merci