Network Ad Space + board fill (Marty 2026-11-13 'proceed'): dlbnas.js keeps one standing 468x60 house banner in NAS (25k views, refilled when low, link ?src=nas) and places any spot past 30 days with fewer than 300 views in NAS for exactly the views owed; NAS-served views count toward the spot's 300 (My Spots). Empty board slots show members' own LinkSpin Banner Spins (one active 468x60 per member, refreshed every 10 min) before house ads. art/house-strip-nas.png. Smoke 76/76.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-13 14:14:30 -06:00
parent 76d9bc0b21
commit 62985840f7
4 changed files with 90 additions and 6 deletions
+7 -4
View File
@@ -23,9 +23,12 @@ function eligible(now) {
return chain.spots().filter(s => s.kind !== 3 && now - s.boughtAt < c.spotDays * DAY && store.views(s.id).total < c.viewsOwed);
}
// Hook: member LinkSpin Banner Spins fill empty slots before house ads (SPEC "house fill"). Returns
// [{ img, link, title }]. Not wired in v1: needs a LinkSpin endpoint listing members' active 468x60 spins.
function memberSpins() { return []; }
// Member LinkSpin Banner Spins fill empty slots before house ads (SPEC "house fill", built 2026-11-13). server.js refreshes the
// list every 10 minutes through LinkSpin's /api/partner/bl/spins (one active 468x60 spin per Downline Banners member); each board
// gets them in a fresh random order. [{ img, link, title }]
let SPINS = [];
function setMemberSpins(list) { SPINS = Array.isArray(list) ? list : []; }
function memberSpins() { const a = SPINS.slice(); for (let i = a.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [a[i], a[j]] = [a[j], a[i]]; } return a; }
function spotTile(s) {
const c = cfgMod.get(); const cr = creative(s); const v = store.views(s.id);
@@ -78,4 +81,4 @@ function target(ref) {
return { link: creative(s).link, spotId: s.id };
}
module.exports = { creative, eligible, pick, newestOf, newest, frameable, target, memberSpins, houseFor };
module.exports = { creative, eligible, pick, newestOf, newest, frameable, target, memberSpins, setMemberSpins, houseFor };