Hello,
How can I use this code "<TMPL_VAR image_url> <TMPL_VAR thumb_url>"
In this template: my_files.html
It only work here: download1.html
Thanks!
XFileSharing Pro - <TMPL_VAR thumb_url>
Alright my free piece of code for the day.
The video variables are located in index_dl.pm line 609-637.
The two important lines are:
Take whatever other variables you need like vid_height, vid_width. They're optional as you don't need these and can hard set them in your template (default is 400x300).
In index.cgi go to line 2934
and replace with:
Go to line 2973:
Underneath it add:
Congratulations, you've now got template variables video_img_url and video_thumb_url available in my_files. I've tested this as working.
The video variables are located in index_dl.pm line 609-637.
The two important lines are:
Code: Select all
$file->{video_img_url}="$1/i/$dx/$file->{file_real}.jpg";
$file->{video_thumb_url}="$1/i/$dx/$file->{file_real}_t.jpg";
In index.cgi go to line 2934
Code: Select all
$files = $db->SelectARef("SELECT f.*, DATE(f.file_created) as created,
(SELECT COUNT(*) FROM Comments WHERE cmt_type=1 AND file_id=cmt_ext_id) as comments
FROM Files f
WHERE f.usr_id=?
AND f.file_fld_id=?
".&makeSortSQLcode($f,'file_created').$ses->makePagingSQLSuffix($f->{page}),$ses->getUserId,$f->{fld_id});
Code: Select all
$files = $db->SelectARef("SELECT f.*, DATE(f.file_created) as created, s.srv_htdocs_url,
(SELECT COUNT(*) FROM Comments WHERE cmt_type=1 AND file_id=cmt_ext_id) as comments
FROM Files f, Servers s
WHERE f.usr_id=?
AND f.file_fld_id=?
AND f.srv_id=s.srv_id
".&makeSortSQLcode($f,'file_created').$ses->makePagingSQLSuffix($f->{page}),$ses->getUserId,$f->{fld_id});
Go to line 2973:
Code: Select all
$_->{comments}||='';
Underneath it add:
Code: Select all
if( ($c->{m_v} && $_->{file_name}=~/\.(avi|divx|flv|mp4|wmv|mkv)$/i) )
{
my $iurl = $_->{srv_htdocs_url};
$iurl=~s/^(.+)\/.+$/$1\/i/;
my $dx = sprintf("%05d",($_->{file_real_id}||$_->{file_id})/$c->{files_per_folder});
$_->{video_img_url}="$iurl/$dx/$_->{file_real}.jpg";
$_->{video_thumb_url}="$iurl/$dx/$_->{file_real}_t.jpg";
}
Because the forum stuffed up the formatting I recommend copying the code from here: http://pastebin.com/raw.php?i=yB0Q20QC
Sorry I can't do anything about solve media till they accept me. I signed up last week and have heard nothing. Which is rather strange as I own a high rank file host with good traffic. I may give them an email/call just to see what's up with my application.afdah wrote:cool. any idea how to add solvemedia captcha?
i signed up last week too and use their php library to power up my other site. i heard nothing from them too. within 24hours after my site send them traffic, then i can see my dashboard with the statistics.trinsic wrote:Sorry I can't do anything about solve media till they accept me. I signed up last week and have heard nothing. Which is rather strange as I own a high rank file host with good traffic. I may give them an email/call just to see what's up with my application.afdah wrote:cool. any idea how to add solvemedia captcha?
-
- Posts: 25
- Joined: Dec 15, 2010 12:26 am
i purposely choose recaptcha and remove recaptcha modules.trinsic wrote:Sorry I can't do anything about solve media till they accept me. I signed up last week and have heard nothing. Which is rather strange as I own a high rank file host with good traffic. I may give them an email/call just to see what's up with my application.afdah wrote:cool. any idea how to add solvemedia captcha?
this is the error i get.
we need to edit session.pm which is encrypted. in other word, only sibsoft can add solvemedia captcha correctly.
Can't locate Captcha/reCAPTCHA.pm in @INC (@INC contains: Plugins Modules . /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at Modules/Session.pm line 749.
Looks like you're right about image mod and video mod being the same which is good.
If you only want image mod use:
If you only want video mod use:
If you want both use:
If you only want image mod use:
Code: Select all
if( ($c->{m_i} && $_->{file_name}=~/\.(jpg|jpeg|gif|png|bmp)$/i )
Code: Select all
if( ($c->{m_v} && $_->{file_name}=~/\.(avi|divx|flv|mp4|wmv|mkv)$/i) )
Code: Select all
if( ($c->{m_i} && $_->{file_name}=~/\.(jpg|jpeg|gif|png|bmp)$/i )
|| ($c->{m_v} && $_->{file_name}=~/\.(avi|divx|flv|mp4|wmv|mkv)$/i) )
News on homepage
Hey man,
I followed this thread, hoping it my provide me with some clues on how to add news on the homepage, But couldn't figure it out.
Would be highly appreciated if you've already done so - or you can assist on how to bring those variables on to homepage so I can use the TMPL tag associated with news page.
Thanks a lot in advance!
I followed this thread, hoping it my provide me with some clues on how to add news on the homepage, But couldn't figure it out.
Would be highly appreciated if you've already done so - or you can assist on how to bring those variables on to homepage so I can use the TMPL tag associated with news page.
Thanks a lot in advance!