• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Ultima tube statistics

Started by mihai,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mihaiTopic starter

Hi!I want to add this to the normal ultimatube theme





But how?
  •  

Marius P.


Profile.php

<?php 
$vd = $cachedb->get_row("SELECT count(*) as nr FROM ".DB_PREFIX."videos where user_id='".$profile->id."'");
$vvd = $cachedb->get_row("SELECT sum(views) as nr FROM ".DB_PREFIX."videos where user_id='".$profile->id."'");
$ad = $cachedb->get_row("SELECT count(*) as nr FROM ".DB_PREFIX."activity where user='".$profile->id."'");
?>
<ul class="user-stats">
<li><a class="tipS" href="<?php echo $canonical;?>" title="<?php echo _lang("See all video shared"); ?>"><i class="icon-youtube-play"> <?php echo u_k($vd->nr);?> <?php echo _lang("Videos"); ?>[/url]  </li>
<li> <a class="tipS" href="<?php echo $canonical.'&sk=activity';?>" title="<?php echo _lang("See all activity"); ?>"><i class="icon-bell"> <?php echo u_k($ad->nr);?> <?php echo _lang("Activities"); ?>[/url]  </li>
<li> <i class="icon-eye-open"> <?php echo u_k($vvd->nr);?> <?php echo _lang("Video views"); ?> </li>
<li> <i class="icon-eye-open"> <?php echo u_k($profile->views);?> <?php echo _lang("profile views"); ?></li>
</ul>



function (for tpl.globals.php)


function u_k($nr){
if ($nr > 999 && $nr <= 999999) {
    $result = round($nr / 1000, 1). _lang('k');
} elseif ($nr > 999999) {
    $result = round($nr / 1000000, 1). _lang('m');
} else {
    $result = $nr;
}
return $result;
}



css for vibe.style.css:


.user-stats {display:block; list-style:none; margin:0 5px;}
.user-stats ul {display:block; list-style:none; clear:both;}
.user-stats, .user-stats a{font-family: 'Lato', Calibri, Arial, sans-serif;font-size: 16px;}
.user-stats a:hover {border-bottom: 1px solid #f74e4d;}
.user-stats i {font-size: 18px;}
.user-stats li {display:inline-block; float:left; padding:2px 5px; border-left: 1px solid #ededed;}
.user-stats li:first-child {border-left: none;}
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

mihaiTopic starter

  •  

Marius P.

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Similar topics (7)