2012-05-05 14:41:49 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* widget callback function to display user box..
|
|
|
|
*/
|
|
|
|
|
|
|
|
function displayUserBox($widget)
|
|
|
|
{
|
|
|
|
return Fetch('widgets/user-box.html');
|
|
|
|
}
|
|
|
|
|
|
|
|
function displayUserBoxAdmin($widget)
|
|
|
|
{
|
|
|
|
return Fetch('/layout/widgets/user-box-admin.html',FRONT_TEMPLATEDIR);
|
|
|
|
}
|
2012-05-18 13:47:20 +00:00
|
|
|
|
2012-05-19 13:42:45 +00:00
|
|
|
function cbv3_rating($video,$type='perc')
|
|
|
|
{
|
|
|
|
if($type=='perc')
|
|
|
|
{
|
|
|
|
$rating = $video['rating'];
|
|
|
|
|
|
|
|
if($rating>5)
|
|
|
|
{
|
|
|
|
$rating_output = '<span class="rating-text rating-green">';
|
|
|
|
}elseif($rating<5 && $rating)
|
|
|
|
{
|
|
|
|
$rating_output = '<span class="rating-text rating-red">';
|
|
|
|
}else
|
|
|
|
{
|
|
|
|
$rating_output = '<span class="rating-text">';
|
|
|
|
}
|
|
|
|
|
|
|
|
$rating_output .= round($rating*10+0.49,0);
|
|
|
|
$rating_output .= '%</span>';
|
|
|
|
|
|
|
|
return $rating_output;
|
|
|
|
}
|
|
|
|
}
|
2012-05-05 14:41:49 +00:00
|
|
|
?>
|