WHEN DEVELOPING A DATALIFE ENGINE SITE I REALIZED THERE WAS NOT A SHORTCODE FOR DISPLAYING THE LOGGED IN USERS AVAILABLE DOWNLOADS OUTSIDE OF THE MY ACCOUNT PAGE. SO I DEVELOPED THIS SIMPLE PLUGIN WHICH ADDS THE SHORT CODE. IT IS SIMPLE AND EFFECTIVE. IT DISPLAYS THE NEWS AND THE FILE NAME IN AN UNORDERED LIST.
Add in our theme
<head>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
body
<script>
$(document).ready(function () {
$("#savefile").submit(function (event) {
event.preventDefault();
$.ajax({
type: $(this).attr('method'),
url: $(this).attr('action'),
dะฐta: new FormData(this),
contentType: false,
cache: false,
processdะฐta: false,
success: function (result) {
//alert(result);
json = jQuery.parseJSON(result);
if (json.url) setTimeout(redirect, 2000, json.url);
Swal.fire({
title: json.header,
text: json.message,
icon: json.status,
showConfirmButton: false,
footer: '<a href="/mydownloads.html">Browse downloaded files</a>',
});
}
});
});
});
function redirect(url) {
window.location.href = url;
}
</script>
Info
Our design is customized by getbootstrap don't forget to change it โค๏ธ
Our design is customized by getbootstrap don't forget to change it โค๏ธ
Changelog
Version 2.0 โ 20 Oct, 2023
- Optimized:Datalife Engine 15.1 And Up
- Added:Realised New method to save file
- Added:Full AJAX
- Added:Delete files
- Added:Don't save Duplicate files
- Added:Pagination
- Update:mydownloads.php
- Update:MyDownload Page
- Update:Data Table
- Update:Sweetalert2 v11.7.32
In Template โ downloads.tpl
- {downpage}:Direct link to the file
- {name}:File name
- {page}:File News irect link
- {title}:News title
- {size}:File size
- {md5}:File Md5
- {id}:File ID
Info
Please login to view information Auth!
Please login to view information Auth!
Tags:
12 Comments
Information
Users of Guests are not allowed to comment this publication.
Users of Guests are not allowed to comment this publication.