XFileSharing Pro - Video download count

Powerfull XFileSharing version

Moderator: admin

Message
Author
melissa
Posts: 7
Joined: Oct 21, 2012 8:19 pm

Video download count

#1 Postby melissa » Oct 21, 2012 8:23 pm

Hi, I have a player set up on my download1 page. I also have a pre-download page (download0) I am trying to figure out how to count every video view/every view of download1 page as an actual download.

Because right now the downloads only count when you actually click the download button on the download1 page.

I have been messing around with it by adding an action to the form submit on my pre-download page similar to the one on the actual download button but I am having no luck.

Does anybody know how I can achieve this?

trinsic
Posts: 149
Joined: Dec 21, 2009 9:24 am

#2 Postby trinsic » Oct 22, 2012 2:24 am

Line 452 of index_dl.pm:

Code: Select all

   DownloadTrack($file) if $file->{video_code} && $c->{video_mod_no_download};

change to:

Code: Select all

   DownloadTrack($file) if $file->{video_code}; #&& $c->{video_mod_no_download};

http://pastebin.com/raw.php?i=eXLPXZDz

melissa
Posts: 7
Joined: Oct 21, 2012 8:19 pm

#3 Postby melissa » Oct 22, 2012 3:47 am

Thank you very much trinsic! You are a saviour!

randy
Posts: 321
Joined: Mar 13, 2012 7:00 pm

#4 Postby randy » Oct 22, 2012 6:36 pm

what is the code if you don't want to count the videos? only downloads? because we're on 100% complete and all videos get counted. but we only want to have the downloads counted and not the videos too!

please help

trinsic
Posts: 149
Joined: Dec 21, 2009 9:24 am

#5 Postby trinsic » Oct 22, 2012 10:38 pm

Put a # at the start of line 452.

randy
Posts: 321
Joined: Mar 13, 2012 7:00 pm

#6 Postby randy » Oct 24, 2012 10:33 am

can you please post exact code before and after? :(

trinsic
Posts: 149
Joined: Dec 21, 2009 9:24 am

#7 Postby trinsic » Oct 24, 2012 10:41 am

Line 452:

Code: Select all

   DownloadTrack($file) if $file->{video_code} && $c->{video_mod_no_download};

change to:

Code: Select all

   #DownloadTrack($file) if $file->{video_code} && $c->{video_mod_no_download};

http://pastebin.com/raw.php?i=QqvkV85N

Basically the hash (#) means to skip the line. The DownloadTrack function is also used in download2 which is the common place however video views are counted if 1) video_code is true and 2) video_mod_no_download is true.

If either of these are false then video views are not counted until the user actually downloads the video through download2.

randy
Posts: 321
Joined: Mar 13, 2012 7:00 pm

#8 Postby randy » Oct 24, 2012 10:55 am

so when I just want to count downloads after CREATE DOWNLOAD LINK on page 2 and not views I can copy paste the 2nd code? right?

will it also work when not offering direct downloads? so dl on download1 direct?

Code: Select all

#DownloadTrack($file) if $file->{video_code} && $c->{video_mod_no_download};


WITH #

trinsic
Posts: 149
Joined: Dec 21, 2009 9:24 am

#9 Postby trinsic » Oct 24, 2012 11:05 am

Correct. Direct downloads or not doesn't matter and no downloads will be counted until after the create download link is clicked.
Last edited by trinsic on Oct 24, 2012 11:07 am, edited 1 time in total.

randy
Posts: 321
Joined: Mar 13, 2012 7:00 pm

#10 Postby randy » Oct 24, 2012 11:06 am

thank you :)

melissa
Posts: 7
Joined: Oct 21, 2012 8:19 pm

#11 Postby melissa » Oct 26, 2012 12:04 am

Ok so after I have edited the line to:

Code: Select all

DownloadTrack($file) if $file->{video_code}; #&& $c->{video_mod_no_download};


Each video view will add 1 download to the user that uploaded the video. Is it IP restricted? So only one view per IP within a certain amount of time?

trinsic
Posts: 149
Joined: Dec 21, 2009 9:24 am

#12 Postby trinsic » Oct 26, 2012 12:53 am

Yes that's correct, it should act like counting any other download which is IP based.

afdah
Posts: 147
Joined: Jan 27, 2012 2:23 pm

#13 Postby afdah » Oct 26, 2012 1:59 am

if you provide some kind of incentives for video views, let's say $5 per 1000 views, the nginx mod + 100% complete mod is a must.

the video has to be viewed/downloaded completely for the download to be counted as 1.

without the mods, anybody reaching your download1 page will be counted as 1 download without actually viewing the videos.

melissa
Posts: 7
Joined: Oct 21, 2012 8:19 pm

#14 Postby melissa » Oct 26, 2012 7:13 am

trinsic wrote:Yes that's correct, it should act like counting any other download which is IP based.

Thanks trinsic.

Yes I do provide incentives, and my fileservers are running nginx. I figured I needed the smartpoints mod I already contacted support, thank you.


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 0 guests