[VNXF] Download - Add on chờ tải file giống SVIT

Lê Tí

Corporal
Code Vnxf style Dev.xf monkey~~ tks to https://xfteam.net - Demo
View attachment 13383
VNXF_Download
Mã:
<xen:if is="{$dkem}">
<xen:title>Tải file {$dkem.filename}</xen:title>
<xen:require css="VNXF_Download.css" />
<div class="download-container">
    <div class="ad-left">{xen:raw $xenOptions.vnxf_download_adsleft}</div>
    <div class="download-box">
        <span class="filename" id="fileinfo-filename" title="{xen:raw $dkem.filename}">{xen:raw $dkem.filename}</span>
        <span class="fileinfo" id="fileinfo">Dung lượng: <span id="fileinfo-filesize">{xen:number $dkem.file_size, size}</span> - Lượt tải: <span id="fileinfo-filesize">{xen:number $dkem.view_count}</span></span>
        <span class="fileinfo" id="fileinfo"><a class="baivietgoc" target="_blank" href="{xen:link threads, $dkem}" title="{xen:raw $dkem.title}">Bài viết gốc</a></span>
        <div id="waiting-down" class="btnss btn-blue">
            <span class="text1" id="countdown-info" >File đang được xác định, vui lòng chờ</span>
            <span id="countdown-info2" class="text1" style="display:none">Đang lấy link download...</span>
            <span class="timedown" id="timevisit"><a id="time">{xen:raw $xenOptions.vnxf_download_time}</a>s</span>
            <div id="loadingdown" class="loading" style="display:none">
                <div id="fountainG">
                <div id="fountainG_1" class="fountainG"></div>
                <div id="fountainG_2" class="fountainG"></div>
                <div id="fountainG_3" class="fountainG"></div>
                <div id="fountainG_4" class="fountainG"></div>
                <div id="fountainG_5" class="fountainG"></div>
                <div id="fountainG_6" class="fountainG"></div>
                <div id="fountainG_7" class="fountainG"></div>
                <div id="fountainG_8" class="fountainG"></div>
                </div>
            </div>
        </div>
        <div class="button-download" id="download-button" style="display:none">
            <span id="but2">
                <form action="{xen:link attachments, $dkem}?sess={xen:raw $sess}" method="post">
                    <input type="submit" class="btn btn-download" value="Download" style="cursor:pointer">
                    <input type="hidden" name="sess" value="{xen:raw $sess}" />
                    <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
                </form>
            </span>
         </div>
         <input class="lin_fil" type="text" value="{xen:link full:attachments, $dkem}">
        <div class="downloading hide" id="downloading">Ðã tải xuống</div>
    </div>
    <div class="ad-right">{xen:raw $xenOptions.vnxf_download_adsright}</div>
</div> 
<xen:else/>
File này không tồn tại!
</xen:if>
<script type="text/javascript">
    var jgt = {xen:raw $xenOptions.vnxf_download_time};
    document.getElementById('time').innerHTML = jgt+1;
    function stime(){
        document.getElementById('time').innerHTML = jgt;
        jgt = jgt - 1;
        if(jgt == -1){
        document.getElementById("loadingdown").style.display="block";
        document.getElementById("time").style.display="none";
        document.getElementById("timevisit").style.display="none";
        document.getElementById("countdown-info").style.display="none";
        document.getElementById("countdown-info2").style.display="block";
        document.getElementById("download-button").style.display="none";
     
        }
        if(jgt == -8){
        clearInterval(timing);
        document.getElementById("time").style.display="none";
        document.getElementById("waiting-down").style.display="none";
        document.getElementById("download-button").style.display="block";
        document.getElementById("loadingdown").style.display="none";
     
        }
    }
    var timing = setInterval("stime();",1000);
</script>
VNXF_Download.css
Mã:
input.lin_fil {
    padding: 2px 5px;
}
.download-container {
    background: #ecf0f5 none repeat scroll 0 0;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -khtml-border-radius: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
    padding: 10px;
    margin: 0 auto;
    position: relative;
    min-height: 260px;
    width: 98%;
}

.download-container .download-box {
background: #fafafa none repeat scroll 0 0;
    border: 1px solid #ddd;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -khtml-border-radius: 10px;
    border-radius: 10px;
    float: left;
    margin-left: 20px;
    margin-right: 20px;
    padding: 5px 10px;
    text-align: center;
    width: 504px;
}

.filename {
    color: #34495e;
    display: block;
    font-family: "Segoe UI","Segoe","Segoe WP","Tahoma","Verdana","Arial","sans-serif";
    font-size: 20px;
    overflow: hidden;
    padding: 5px;
    text-overflow: ellipsis;
}

.fileinfo {
    color: #34495e;
    display: block;
    font-family: "Segoe UI","Segoe","Segoe WP","Tahoma","Verdana","Arial","sans-serif";
    font-size: 14px;
    padding: 5px;
}

#fileinfo > a.baivietgoc {
    color: #033a77;
    font-size: 14px;
    font-weight: bold;
}

.download-container .ad-right {
    background: #ccc none repeat scroll 0 0;
    float: right;
    height: 250px;
    overflow: hidden;
    width: 300px;
}

.download-container .ad-left {
    background: #ccc none repeat scroll 0 0;
    float: left;
    height: 250px;
    overflow: hidden;
    width: 300px;
}

.download-box input {
    width: 250px;
}

.download-container .download-box .time-down .time {
    color: #777;
    font-size: 50px;
}
.file-link {
    margin-top: 15px;
}
.file-link-input {
    padding: 5px;
    width: 300px;
}
.file-save {
    float: left;
    margin-top: 18px;
}
.waiting-down {
    cursor: default !important;
    opacity: 0.4;
}
.btn-download {
   color: #ffffff;
    background: #1abc9c url("http://congngheaz.com/styles/default/img/cloud-download.png") no-repeat scroll 65px 27px;
    margin: 10px auto;
    border: 0;
    font-size: 17.5px;
    background-position: 50px 20px;
    padding: 30px 30px 30px 60px;
}
.btn-download:hover, .btn-download:focus, .btn-download:active, .btn-download.active, .btn-download.disabled, .btn-download[disabled] {
    background-color: #51a351;
    color: #ffffff;
}
.hide {display:none;}


#waiting-down {
    margin: 20px auto;
    width: 275px;
}
.btnss.btn-blue {
    background-color: #3498db;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    -khtml-border-radius: 6px;
    border-radius: 6px;
    cursor: pointer;
    font-family: "Tahoma","Verdana","Arial","sans-serif";
    font-size: 15.5px;
    padding: 11px 19px;
}
.btnss {
    color: #fff !important;
    font-size: 16.5px;
    text-shadow: none;
}
.timedown {
    display: block;
    font-size: 36px;
}
.loading {
    margin: 10px;
}
#fountainG{
    position:relative;
    width:234px;
    height:28px;
    margin:auto;
}

.fountainG{
    position:absolute;
    top:0;
    background-color:rgb(255,255,255);
    width:28px;
    height:28px;
    animation-name:bounce_fountainG;
        -o-animation-name:bounce_fountainG;
        -ms-animation-name:bounce_fountainG;
        -webkit-animation-name:bounce_fountainG;
        -moz-animation-name:bounce_fountainG;
    animation-duration:1.5s;
        -o-animation-duration:1.5s;
        -ms-animation-duration:1.5s;
        -webkit-animation-duration:1.5s;
        -moz-animation-duration:1.5s;
    animation-iteration-count:infinite;
        -o-animation-iteration-count:infinite;
        -ms-animation-iteration-count:infinite;
        -webkit-animation-iteration-count:infinite;
        -moz-animation-iteration-count:infinite;
    animation-direction:normal;
        -o-animation-direction:normal;
        -ms-animation-direction:normal;
        -webkit-animation-direction:normal;
        -moz-animation-direction:normal;
    transform:scale(.3);
        -o-transform:scale(.3);
        -ms-transform:scale(.3);
        -webkit-transform:scale(.3);
        -moz-transform:scale(.3);
    border-radius:19px;
        -o-border-radius:19px;
        -ms-border-radius:19px;
        -webkit-border-radius:19px;
        -moz-border-radius:19px;
}

#fountainG_1{
    left:0;
    animation-delay:0.6s;
        -o-animation-delay:0.6s;
        -ms-animation-delay:0.6s;
        -webkit-animation-delay:0.6s;
        -moz-animation-delay:0.6s;
}

#fountainG_2{
    left:29px;
    animation-delay:0.75s;
        -o-animation-delay:0.75s;
        -ms-animation-delay:0.75s;
        -webkit-animation-delay:0.75s;
        -moz-animation-delay:0.75s;
}

#fountainG_3{
    left:58px;
    animation-delay:0.9s;
        -o-animation-delay:0.9s;
        -ms-animation-delay:0.9s;
        -webkit-animation-delay:0.9s;
        -moz-animation-delay:0.9s;
}

#fountainG_4{
    left:88px;
    animation-delay:1.05s;
        -o-animation-delay:1.05s;
        -ms-animation-delay:1.05s;
        -webkit-animation-delay:1.05s;
        -moz-animation-delay:1.05s;
}

#fountainG_5{
    left:117px;
    animation-delay:1.2s;
        -o-animation-delay:1.2s;
        -ms-animation-delay:1.2s;
        -webkit-animation-delay:1.2s;
        -moz-animation-delay:1.2s;
}

#fountainG_6{
    left:146px;
    animation-delay:1.35s;
        -o-animation-delay:1.35s;
        -ms-animation-delay:1.35s;
        -webkit-animation-delay:1.35s;
        -moz-animation-delay:1.35s;
}

#fountainG_7{
    left:175px;
    animation-delay:1.5s;
        -o-animation-delay:1.5s;
        -ms-animation-delay:1.5s;
        -webkit-animation-delay:1.5s;
        -moz-animation-delay:1.5s;
}

#fountainG_8{
    left:205px;
    animation-delay:1.64s;
        -o-animation-delay:1.64s;
        -ms-animation-delay:1.64s;
        -webkit-animation-delay:1.64s;
        -moz-animation-delay:1.64s;
}



@keyframes bounce_fountainG{
    0%{
    transform:scale(1);
        background-color:rgb(255,255,255);
    }

    100%{
    transform:scale(.3);
        background-color:rgb(255,255,255);
    }
}

@-o-keyframes bounce_fountainG{
    0%{
    -o-transform:scale(1);
        background-color:rgb(255,255,255);
    }

    100%{
    -o-transform:scale(.3);
        background-color:rgb(255,255,255);
    }
}

@-ms-keyframes bounce_fountainG{
    0%{
    -ms-transform:scale(1);
        background-color:rgb(255,255,255);
    }

    100%{
    -ms-transform:scale(.3);
        background-color:rgb(255,255,255);
    }
}

@-webkit-keyframes bounce_fountainG{
    0%{
    -webkit-transform:scale(1);
        background-color:rgb(255,255,255);
    }

    100%{
    -webkit-transform:scale(.3);
        background-color:rgb(255,255,255);
    }
}

@-moz-keyframes bounce_fountainG{
    0%{
    -moz-transform:scale(1);
        background-color:rgb(255,255,255);
    }

    100%{
    -moz-transform:scale(.3);
        background-color:rgb(255,255,255);
    }
}

.text2 {
    color: #fff !important;
    display: block;
    margin-left: 54px;
    padding: 23px 20px;
}


respon chưa e? :D
 
  • Like
Reactions: THB

lenanghai

Private
1. em muốn lấy 1 đoạn content đầu trong topic của attach để hiển thị trên trang download thì phải làm thế nào
2. Bộ đếm download bị treo, em tải nhiều lượt nhưng nó ko chịu đếm

1.png

2.png
 
Sửa lần cuối:

huynhngoclan

Private
cho mình hỏi. sau khi cài addon nhấn download thì bị thoát về trang chủ mà không download được gì
vậy là sao? có thể giúp mình không?
 

phankt

Corporal
làm xong ok rồi.. mà test bấm vào file dowload không ra cái gì vậy anh oi.
trắng trơn..
mà phần này điền gì vào đây anh @Blue
option_vnxf_download_forumkah
 

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Hỗ trợ trực tuyến

Support Quảng cáo
Mr. San (PVS)

Skype chat, instant message

Mr. Tuấn (Blue)

Skype chat, instant message

Mr. Tuấn
0988 488 096
Mr. Trọng
0906 081 284
kinhdoanh@vnxf.vn

Nhà Tài Trợ

Mút Xốp Không Gian
pallet Thịnh Phát
Điện Lạnh Thịnh Phát
Top