This post can be closed because I finally found the solution
PHP Code:
global $vbulletin;
$bestphoto =$vbulletin->db->query_first("SELECT * FROM vb_ratemyphoto_photos WHERE approved=1 AND hidden=0
AND rating>0 ORDER BY rating DESC, votes DESC LIMIT 1");
$besttitle = htmlspecialchars_uni($bestphoto["title"]);
$bestphotoname = $bestphoto["logo"];
$bestvotes = $bestphoto["votes"];
$bestrating = $bestphoto["rating"];
$templater = vB_Template::create('block_photo');
$templater->register('besttitle', $besttitle);
$templater->register('bestphotoname', $bestphotoname);
$templater->register('bestvotes', $bestvotes);
$templater->register('bestrating', $bestrating);
$templater->register('bestuserid', $bestphoto[userid]);
$templater->register('bestusername', $bestphoto[username]);
$templater->register('catid', $catid);
return $templater->render();
created template called "block_photo"
PHP Code:
Member: <a href="member.php?u={vb:raw bestuserid}&tab=ratemyphoto#ratemyphoto">{vb:raw bestusername}</a><br />
Nb rate: <b>{vb:raw bestvotes}</b><br />
Best rate: <b>{vb:raw bestrating}</b>
setting:
Title : The best Photo
Description : The best photo enacted by Member ratemyphoto
Active : Yes
Content Type : php
Content : code php " Top "
Template to Use : block_html
Attachment 143157