Hello,
Is it possible to have 2 different download pages and displaying these download pages depending on the file extension ?
So if it's a video being uploaded it will show a video with ads and a choice to download it 
and
If it's a rar being uploaded it will display a page where it will ask the user to buy premium / continue in 60 seconds.
Would it be possible to do this ?
			
									
									
						XFileSharing Pro - Different download pages
- 
				Belgin Fish
- Posts: 101
- Joined: Aug 09, 2010 6:30 pm
- 
				johntrader
- Posts: 17
- Joined: May 17, 2011 3:04 am
Would this also be possible with mp3 files ?Belgin Fish wrote:I believe the easiest way to do this would be to simply add the
<TMPL_IF video_code>
code to check if it's a video, and then do the video page stuff, and have an else and then the regular download page stuff.
You'd do this in cgi-bin/templates/download2.html
- 
				Belgin Fish
- Posts: 101
- Joined: Aug 09, 2010 6:30 pm
- 
				Belgin Fish
- Posts: 101
- Joined: Aug 09, 2010 6:30 pm
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
Here goes special free quick hack:
in index_dl.pm find line
and replace it with
then create download1_video.html template. It will be used for files with avi|divx|mkv|flv|mp4|wmv extensions.
Don't forget to backup current index_dl.pm!
			
									
									
						in index_dl.pm find line
Code: Select all
   return $ses->PrintTemplate("download1.html",Code: Select all
my $tmpl1="download1_video.html"
 if $file->{file_name}=~/\.(avi|divx|mkv|flv|mp4|wmv)$/i;
$tmpl1||="download1.html";
   return $ses->PrintTemplate($tmpl1,Don't forget to backup current index_dl.pm!
- 
				johntrader
- Posts: 17
- Joined: May 17, 2011 3:04 am
- 
				PowerChaos
- Posts: 521
- Joined: Dec 19, 2009 5:12 pm
you can edit the code here on this place
not sure what code you need to place but if you mess a little around then you can get it to work
find this line in index.pm
hopely this can help a bit
Greetings From PowerChaos
			
									
									
						not sure what code you need to place but if you mess a little around then you can get it to work
Code: Select all
   &Download2('no_checks') if  $premium &&
                               !$c->{captcha} &&
                               !$c->{download_countdown} &&
                               !$file->{file_password} &&
                               $ses->getUser->{usr_direct_downloads};
   $file = &DownloadChecks($file);
   my %secure = $ses->SecSave( $file->{file_id}, $c->{download_countdown} );
hopely this can help a bit
Greetings From PowerChaos



 Facebook
 Facebook Twitter
 Twitter