mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-27 00:01:06 +00:00
Add concept of Supporter-only plug-ins (premium with price = 0)
This commit is contained in:
parent
de9d2a3afd
commit
96d6767689
@ -39,20 +39,23 @@
|
|||||||
</p>
|
</p>
|
||||||
<p id="regInfo">
|
<p id="regInfo">
|
||||||
</p>
|
</p>
|
||||||
<p id="regPrice">
|
<div class="premiumHasPrice" style="display: none">
|
||||||
</p>
|
<p id="regPrice">
|
||||||
<input type="hidden" name="cmd" value="_xclick">
|
</p>
|
||||||
<input type="hidden" id="payPalEmail" name="business" value="mb_1358534950_biz@reedsplace.com">
|
<input type="hidden" name="cmd" value="_xclick">
|
||||||
<input type="hidden" name="currency_code" value="USD">
|
<input type="hidden" id="payPalEmail" name="business" value="mb_1358534950_biz@reedsplace.com">
|
||||||
<input type="hidden" id="featureName" name="item_name" value="MBSupporter">
|
<input type="hidden" name="currency_code" value="USD">
|
||||||
<input type="hidden" id="amount" name="amount" value="10">
|
<input type="hidden" id="featureName" name="item_name" value="MBSupporter">
|
||||||
<input type="hidden" id="featureId" name="item_number" value="MBSupporter">
|
<input type="hidden" id="amount" name="amount" value="10">
|
||||||
<input type="hidden" name="notify_url" value="http://mb3admin.com/admin/service/services/ppipn.php">
|
<input type="hidden" id="featureId" name="item_number" value="MBSupporter">
|
||||||
<input type="hidden" name="return" id ="paypalReturnUrl" value="#">
|
<input type="hidden" name="notify_url" value="http://mb3admin.com/admin/service/services/ppipn.php">
|
||||||
<a data-role="button" id="ppButton" onclick="_xclick.submit();"><img src="css/images/registerpp.png"/></a>
|
<input type="hidden" name="return" id ="paypalReturnUrl" value="#">
|
||||||
<p id="noEmail" style="display: none"><strong>This developer has not provided a PayPal email. Please see their
|
<a data-role="button" id="ppButton" onclick="_xclick.submit();"><img src="css/images/registerpp.png"/></a>
|
||||||
website for registration information.</strong>
|
<p id="noEmail" style="display: none"><strong>This developer has not provided a PayPal email. Please see their
|
||||||
</p>
|
website for registration information.</strong>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
BIN
Html/css/images/supporterflag.png
Normal file
BIN
Html/css/images/supporterflag.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
@ -50,7 +50,7 @@
|
|||||||
regStatus += "You are currently registered for this feature";
|
regStatus += "You are currently registered for this feature";
|
||||||
} else {
|
} else {
|
||||||
if (new Date(pkg.expDate).getTime() < new Date(1970, 1, 1).getTime()) {
|
if (new Date(pkg.expDate).getTime() < new Date(1970, 1, 1).getTime()) {
|
||||||
regStatus += "You have never installed this feature";
|
regStatus += "This feature has no registration information";
|
||||||
} else {
|
} else {
|
||||||
if (pkg.expDate <= new Date().getTime()) {
|
if (pkg.expDate <= new Date().getTime()) {
|
||||||
regStatus += "The trial period for this feature has expired on this machine";
|
regStatus += "The trial period for this feature has expired on this machine";
|
||||||
@ -65,23 +65,29 @@
|
|||||||
|
|
||||||
if (pluginSecurityInfo.IsMBSupporter) {
|
if (pluginSecurityInfo.IsMBSupporter) {
|
||||||
$('#regInfo', page).html(pkg.regInfo || "");
|
$('#regInfo', page).html(pkg.regInfo || "");
|
||||||
// Fill in PayPal info
|
if (pkg.price > 0) {
|
||||||
$('#featureId', page).val(pkg.featureId);
|
// Fill in PayPal info
|
||||||
$('#featureName', page).val(pkg.name);
|
$('premiumHasPrice', page).show();
|
||||||
$('#amount', page).val(pkg.price);
|
$('#featureId', page).val(pkg.featureId);
|
||||||
$('#regPrice', page).html("<h2>Price: $" + pkg.price.toFixed(2) + " (USD)</h2>");
|
$('#featureName', page).val(pkg.name);
|
||||||
var url = "http://mb3admin.com/admin/service/user/getPayPalEmail?id=" + pkg.owner;
|
$('#amount', page).val(pkg.price);
|
||||||
$.getJSON(url).done(function (dev) {
|
$('#regPrice', page).html("<h2>Price: $" + pkg.price.toFixed(2) + " (USD)</h2>");
|
||||||
if (dev.payPalEmail) {
|
var url = "http://mb3admin.com/admin/service/user/getPayPalEmail?id=" + pkg.owner;
|
||||||
$('#payPalEmail', page).val(dev.payPalEmail);
|
$.getJSON(url).done(function(dev) {
|
||||||
|
if (dev.payPalEmail) {
|
||||||
|
$('#payPalEmail', page).val(dev.payPalEmail);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('#ppButton', page).hide();
|
$('#ppButton', page).hide();
|
||||||
$('#noEmail', page).show();
|
$('#noEmail', page).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
// Supporter-only feature
|
||||||
|
$('premiumHasPrice', page).hide();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$('#regInfo', page).html("<h3>You must be a <a href='supporter.html'>Media Browser Supporter</a> in order to register this feature.</h3>");
|
$('#regInfo', page).html("<h3>You must be a <a href='supporter.html'>Media Browser Supporter</a> in order to gain access to this feature.</h3>");
|
||||||
$('#ppButton', page).hide();
|
$('#ppButton', page).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (plugin.isPremium) {
|
if (plugin.isPremium) {
|
||||||
html += "<div class='premiumBanner'><img src='css/images/premiumflag.png' /></div>";
|
if (plugin.price > 0) {
|
||||||
|
html += "<div class='premiumBanner'><img src='css/images/premiumflag.png' /></div>";
|
||||||
|
} else {
|
||||||
|
html += "<div class='premiumBanner'><img src='css/images/supporterflag.png' /></div>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var color = plugin.tileColor || Dashboard.getRandomMetroColor();
|
var color = plugin.tileColor || Dashboard.getRandomMetroColor();
|
||||||
|
Loading…
Reference in New Issue
Block a user