f63a37947a
Publisher program (Marty's zone-owner offer for outside site owners):
- /publishers public page: what a zone is, the nine sizes, the waterfall (member ads, network ads, house),
what pays (viewable only, bots never, warm-up 100 views at 40%, cap), what credits buy, install in four steps
with the origin lock explained, Standard/Verified tiers, FAQ, and a live "Network right now" strip
- GET /api/public/publishers: zones installed/live, viewable impressions and credits paid in the last 7 days,
live rates, sizes, warm-up; computed in zones.js and cached a minute
- zones.js: per-zone tier (default standard); verified zones earn network views at nasViewsPerCreditVerified
(default 8) instead of nasViewsPerCredit (10); member-campaign views stay at viewsPerCredit (5) on both tiers;
rateFor/tierOf exported; a pay log (zones.json "pay") so credits can be reported by day; publisherTotals(days)
returns {zones, live, views, viewable, credits, byDay, byZone} with Central day keys for the Reports screen
- admin: Tier select per zone in the Zones pane, saved via POST /api/admin/zones/:id (tier) or the alias
/api/admin/zones/:id/tier; the admin list carries the 7-day publisher totals
- Zones screen: first-run "Add your site" card (site, size, copy the tag, check it is live) for new accounts and
for /zones?start=1 from the publisher page; Verified tag on zone rows; rate note mentions the verified rate
- /partners (downline-builder kit) keeps its URL, gets the real LinkSpin ladder ($10 door to $500 Network, $25
qualifies), the 10% + 10% admin split, and a cross-link to the publisher program
Chatbot: every canned answer and the AI knowledge block now describe LinkSpin (spin links, pages, zones and the
publisher tiers, audiences, promo tools with the five hook angles, blog; the six packages, the 50/20/10/10+10 split,
$25 qualification, pass-ups, the contract; email codes, Control Room screens, sponsor carry-over from the network
registry, free activation). InstantAdPay-only mechanics removed (dormant-lead rescue, Five Dollar Friday, Wired
Wednesday, games, mint passes, surf earn tab); the holding tank stays because /tools > My line still runs it here.
Copy: "Level 2 opens after two of your people buy a $25 or larger package" on the home page, contract, launch,
earning, my, plays pages and promo.js (the $20 figures that remain are the $100 example split amounts).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
27 lines
2.2 KiB
JavaScript
27 lines
2.2 KiB
JavaScript
// Publisher program page (2026-10-10): fills the "Network right now" strip and every rate number from
|
|
// /api/public/publishers (server-side totals, cached a minute), and points Start at the Zones screen when the visitor
|
|
// is already signed in (otherwise the join page, zones angle). Display only; nothing here changes an account.
|
|
(function () {
|
|
const $ = id => document.getElementById(id);
|
|
const fmt = n => Number(n || 0).toLocaleString();
|
|
const ago = t => { if (!t) return ''; const d = Date.now() - t; if (d < 90e3) return 'updated just now'; if (d < 3600e3) return 'updated ' + Math.round(d / 60e3) + ' min ago'; return 'updated ' + Math.round(d / 3600e3) + ' h ago'; };
|
|
async function strip() {
|
|
let d; try { d = await (await fetch('/api/public/publishers')).json(); } catch (e) { $('stUpdated').textContent = 'live numbers unavailable right now'; $('stDot').classList.add('off'); return; }
|
|
$('stLive').textContent = fmt(d.live); $('stViews').textContent = fmt(d.viewable7); $('stCredits').textContent = fmt(d.credits7);
|
|
$('stUpdated').textContent = (d.zones ? fmt(d.zones) + ' zone' + (d.zones === 1 ? '' : 's') + ' installed · ' : '') + ago(d.updated);
|
|
if (!d.live) $('stDot').classList.add('off');
|
|
const r = Object.assign({}, d.rates || {}); r.warmup = d.warmup; r.holdPct = Math.round((d.holdRatio || 0.4) * 100);
|
|
document.querySelectorAll('[data-rate]').forEach(el => { const v = r[el.dataset.rate]; if (v != null && v !== '') el.textContent = fmt(v); });
|
|
}
|
|
// signed in already? then Start opens the Zones screen with the first-run card; the join page otherwise
|
|
async function start() {
|
|
try { localStorage.setItem('ls.publisher', '1'); } catch (e) {}
|
|
let signedIn = false; try { signedIn = (await fetch('/api/my/zones', { cache: 'no-store' })).status === 200; } catch (e) {}
|
|
if (!signedIn) return;
|
|
document.querySelectorAll('[data-start]').forEach(a => { a.href = '/zones?start=1'; if (/^Start/.test(a.textContent)) a.textContent = 'Open Zones: add your site'; });
|
|
document.querySelectorAll('[data-join]').forEach(a => { a.href = '/links'; a.textContent = 'Control Room'; });
|
|
}
|
|
strip(); start();
|
|
setInterval(strip, 60000);
|
|
})();
|