• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] How to code user statistics

Started by fourdeltaOne,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fourdeltaOneTopic starter

Can be done in the user's profile, which displays all the videos he has uploaded to the site as on YouTube?

and  do statistics:
the total amount of rollers
number of sum views  on all rollers
number of sum   likes

I ask you dear help!
Skype: epic.mediauz
  •  

PHPVibe A.

rollers = videos?

$hisvids = $cachedb->get_row("SELECT count(*) as nr FROM ".DB_PREFIX."videos where user_id= '".$profile->id."'");


$hisvids->nr now holds the number of videos that user has.

$hisviews = $cachedb->get_row("SELECT SUM( views ) as nr FROM ".DB_PREFIX."videos where user_id= '".$profile->id."'");


$hisviews->nr now holds the total number of video views that user has.


$hislikes = $cachedb->get_row("SELECT SUM( liked ) as nr FROM ".DB_PREFIX."videos where user_id= '".$profile->id."'");


$hislikes->nr now holds the total number of video likes that user has.

If you want the queries to be real time replace $cachedb with $db (this is more resource expensive)


fourdeltaOneTopic starter

Alex,
Quoterollers = videos
yes


thank you very much


remains to be done to display all downloaded videos (like on YouTube)


Skype: epic.mediauz
  •  

fourdeltaOneTopic starter

please help

we can conclude uploaded all the videos user in a private office how on YouTube?
Skype: epic.mediauz
  •  

fourdeltaOneTopic starter

how to  increase the size cover image upload ?

standard now: 1170px/315px

I would like to: 1540px/245px

tried to change the file com.profile.php
$uploader -> resizeImage(1540, 245, 'crop');

nothing helps..




Skype: epic.mediauz
  •  

fourdeltaOneTopic starter

Skype: epic.mediauz
  •  

PHPVibe A.

Hi, you need to modify the css as well.
vibe.style.css line 500
#profile-cover {
height: 315px !important;
overflow: hidden;
clear: both;
margin-top: 5px;
background-color: #eb6a5a;
}


and hardcoded in the cover:

background-repeat: no-repeat; background-size: 100% 315px;


The width is responsive.


fourdeltaOneTopic starter

No you do not understand, I have  downloaded the image above 1170px/315px nothing is loaded.
Skype: epic.mediauz
  •  

PHPVibe A.

I've just told you the width itself is responsive, depends strictly on the device's width.

background-size: 100% 315px;

fourdeltaOneTopic starter

I'm sorry I do not understand you, even with the aid of an interpreter.  :'(
Skype: epic.mediauz
  •  

PHPVibe A.

The cover stretches to 100% of the cover's width.
The cover is responsive, it adapts to the size of the display/browser.

fourdeltaOneTopic starter

I do not need to align the width, I had to download the cover is even higher than 1170px/315px


when charging a cover with a size greater than 1170px/315px example:
1280x780, 1920x1280, etc.  error
Skype: epic.mediauz
  •  

PHPVibe A.


fourdeltaOneTopic starter

Skype: epic.mediauz
  •  

fourdeltaOneTopic starter

sorry, all turned out, the image format was not the
Skype: epic.mediauz
  •  

fourdeltaOneTopic starter

ask if help is not difficult to display all of uploaded videos like on YouTube.
see above!
Skype: epic.mediauz
  •  

PHPVibe A.

I can help with small changes and script support, not with custom modifications.

fourdeltaOneTopic starter

can write what is necessary to make a request to the database?

Thanks in advance!  :) :)
Skype: epic.mediauz
  •  

PHPVibe A.

You can look into every video page for structure and queries (ex com/com_videolist.php, use video-loop.php for design.

The query itself should look like this.

$options = DB_PREFIX."videos.id,".DB_PREFIX."videos.title,".DB_PREFIX."videos.user_id,".DB_PREFIX."videos.thumb,".DB_PREFIX."videos.views,".DB_PREFIX."videos.liked,".DB_PREFIX."videos.duration,".DB_PREFIX."videos.nsfw";

     
  $vq = "select ".$options.", ".DB_PREFIX."users.name as owner FROM ".DB_PREFIX."videos LEFT JOIN ".DB_PREFIX."users ON ".DB_PREFIX."videos.user_id = ".DB_PREFIX."users.id WHERE ".DB_PREFIX."videos.pub > 0 and user_id = ' ".$profile->id." ' ORDER BY ".DB_PREFIX."videos.id DESC ".this_limit();


fourdeltaOneTopic starter

Skype: epic.mediauz
  •  

Similar topics (7)