diff --git a/chatbot.js b/chatbot.js
index 751cfa4..2c5531f 100644
--- a/chatbot.js
+++ b/chatbot.js
@@ -5,7 +5,7 @@
// ad views per cycle recorded but not credited yet, 6 s visit, 3 browsers per connection a day, 1 free post credit a day for network
// members, 3 banners waiting per member, packs 10 for $3 and 40 for $10, banner look $2), ../contracts VBBShop (SPONSOR_BPS 3000,
// PRIZE_BPS 1000, company the rest, sponsor bound once by voucher, no owner withdraw, failed sends claimable), server.js (100 KB
-// image, 125x125, Banner Spin posting 125x125 or 250x250), lsspins.js (SPIN tiles in empty places never shift, cycle or earn),
+// image, 125x125, Banner Spin posting 125x125 or 250x250, one swap per banner and the admin takedown, 2026-11-15), lsspins.js (SPIN tiles in empty places never shift, cycle or earn),
// public/how.html, packages.html, leaders.html. The prize pot's floor and cap are internal and never shown (Marty's rule).
// HOUSE RULE: when a feature changes, update CANNED and FACTS in the same commit and bump KNOWLEDGE_DATE.
// Plain words, no em dashes, never a promise of income, "SafePal or any other crypto wallet", never RM Circle.
@@ -36,6 +36,9 @@ const CANNED = [
{ id: 'free-credit', title: 'Free post credits', q: ['How do I get a free post credit?', 'Is posting free?', 'Why did I not get my free credit?'], tags: ['free credit', 'post credit', 'daily', 'network member'],
re: /(free (post )?credits?|post credits?|is (it|posting) free|daily credit|credit (a|per|each) day)/i,
a: 'Network members (anyone with an InstantAdPay or LinkSpin account) get one free post credit each day they sign in, Central time. Each credit posts one banner into the loop. Want to post more? Credit packs are one-time purchases: ' + packs + '. You can have up to ' + C.maxQueuedPerMember + ' banners waiting at once.' },
+ { id: 'swap', title: 'Changing a banner after posting (one swap)', q: ['Can I change my banner image or link?', 'I posted the wrong link. Can I fix it?', 'Can I remove my banner?', 'Why was my banner taken down?'], tags: ['swap', 'change banner', 'edit', 'wrong link', 'remove', 'taken down'],
+ re: /((swap|change|edit|replace|update|fix|correct)\b.{0,24}\b(banners?|image|picture|link|url)|wrong (link|image|banner|url|picture)|\btypo\b|(remove|delete|withdraw|take down|pull) (my |a |the )?banners?|banners?.{0,20}taken down)/i,
+ a: 'Each banner can be swapped one time. On My Banners (' + URL_ + '/my), a banner that is waiting or in the loop has a "Swap image or link" button: put in a new image, a new link, or both (a Banner Spin can swap to another of your own 125x125 or 250x250 spins). The banner keeps its place, its clicks and its progress through the loop, and the new image and link get the same checks as a new post. After that one swap the button is gone. Members cannot withdraw or remove a posted banner, and post credits are not refunded. A banner that breaks the rules can be taken down by the admin; its owner sees the reason on My Banners.' },
{ id: 'post', title: 'Posting a banner', q: ['How do I post a banner?', 'What size is the banner?', 'Can I use a Banner Spin?'], tags: ['post', 'banner', '125x125', 'image', 'link', 'banner spin'],
re: /(post (a |my )?banner|banner size|what size|125 ?x ?125|upload|image|banner spin|my banners)/i,
a: 'On My Banners (' + URL_ + '/my) upload a 125x125 image (100 KB or less) with your link, or post one of your LinkSpin Banner Spins (125x125 or 250x250). It uses one post credit, waits in line, and enters the loop at the front at the next shift. Your link must be a real page that loads.' },
@@ -81,6 +84,7 @@ const FACTS = () => [
'- WHAT IT IS: Viral Banner Blitz (' + URL_ + ') is one public loop of ' + C.loopSize + ' member banners (125x125 tiles). A posted banner waits in line, then enters at the front. Every ' + C.perShift + ' verified visitors shift every banner one place; the banner at the end rides out (has cycled) and its owner earns ' + C.viewsPerCycle + ' network ad views. Cycles are recorded on My Banners now; crediting those views to network advertising is NOT switched on yet.',
'- VERIFIED VISITOR: a real browser keeps the loop page open and visible about ' + C.visitSeconds + ' seconds; once per visitor per 24 hours; bots, crawlers, repeats and more than ' + C.perIpDay + ' browsers per connection per day do not count.',
'- POSTING: one post credit per banner. Network members (InstantAdPay or LinkSpin, checked with the network hub) get 1 free post credit each day they sign in (Central day). Up to ' + C.maxQueuedPerMember + ' banners waiting per member. Image 125x125, 100 KB max, or post a LinkSpin Banner Spin (125x125 or 250x250). The link must answer. SPIN tiles in empty places are LinkSpin Banner Spins: they never shift, cycle or earn.',
+ '- ONE SWAP PER BANNER: a banner that is waiting or in the loop can swap its image and/or link ONE time from My Banners (a Banner Spin to another of the member\'s own 125x125/250x250 spins). It keeps its id, place, clicks and loop progress; the new image and link get the same checks as a new post. No second swap. Members cannot withdraw or remove a banner and credits are not refunded. The admin can take a banner down (the owner sees the reason; the admin decides whether the post credit comes back); its place stays as a house tile until it would have ridden out, so nobody else moves, and it never cycles or earns.',
'- PACKAGES (one-time, POL at the live price, never a subscription, overpayment returned): ' + packs + '; banner look $' + C.lookUsd + ' per banner (border + hover teaser, on a waiting or in-loop banner, one per banner); tokens (network visits at the InstantAdPay visit rate) coming soon.',
'- SPLIT (VBBShop constants, no owner withdraw): 30% to the member who introduced the buyer (bound once, by a keeper-signed voucher, on the first purchase; none = company), 10% to the weekly prize pot, 60% company, same transaction. Failed sends wait in the contract for their owner to claim.',
'- LEADERBOARDS (Monday to Sunday Central): most verified visitors sent (the member\'s ?ref= link) and most different traffic sources (referring sites). Prize pot = 10% of the week\'s sales, half per board, top three ' + places + ' percent, paid in POL to the winners\' VBB wallets the following Monday at the POL price at payout; ties to whoever got there first. Never state a maximum or a cap.',
diff --git a/loop.js b/loop.js
index 8fe13d8..72d81f6 100644
--- a/loop.js
+++ b/loop.js
@@ -23,10 +23,16 @@ function enter(id) {
}
function cycleOut(id) {
const b = store.banner(id); if (!b) return null;
+ // taken down by the admin (Marty 2026-11-15): its place rode out on time, but it never cycles and never earns
+ if (b.down) { b.state = 'ended'; b.endedAt = Date.now(); store.saveBanner(b); return null; }
b.state = 'cycled'; b.cycledAt = Date.now(); store.saveBanner(b);
+ return recordCycle(b);
+}
+// the cycle reward: one ledger row (also used when the admin restores a banner whose place rode out while it was taken down)
+function recordCycle(b, extra) {
const S = store.state(); S.totals.cycles++; S.totals.views += C().viewsPerCycle; store.bump('cycles');
const m = store.member(b.owner);
- const e = store.addLedger({ bannerId: b.id, owner: b.owner, username: (m && m.username) || null, views: C().viewsPerCycle, day: store.ctDay(), status: 'recorded' });
+ const e = store.addLedger(Object.assign({ bannerId: b.id, owner: b.owner, username: (m && m.username) || null, views: C().viewsPerCycle, day: store.ctDay(), status: 'recorded' }, extra || {}));
if (onCycle) try { onCycle(b, e); } catch (x) {}
return e;
}
@@ -118,7 +124,9 @@ function memberWeek(addr) {
// ---- views for pages ----
// the banner look (bought per banner, SKU 3): a highlighted border and a hover teaser (the member's line, else the link's site)
const hostOf = l => { try { return new URL(l).hostname.replace(/^www\./, ''); } catch (e) { return ''; } };
-function tile(b) { const m = store.member(b.owner); const t = { id: b.id, img: b.img, href: '/go/' + b.id, owner: (m && m.username) ? '@' + m.username : null };
+// a banner the admin took down keeps its place (nobody else moves) but shows as a house tile: no image, owner, link or id of its own
+const houseTile = b => ({ id: 'h' + b.id, house: true, img: '/art/tile-house.svg', href: '/my', owner: null });
+function tile(b) { if (b.down) return houseTile(b); const m = store.member(b.owner); const t = { id: b.id, img: b.img, href: '/go/' + b.id, owner: (m && m.username) ? '@' + m.username : null };
if (b.spin) t.spin = true;
if (b.look) { t.look = true; t.teaser = b.teaser || (b.spin && b.spin.name) || hostOf(b.link); } return t; }
function view(queueShow) {
@@ -135,5 +143,11 @@ function placeOf(b) {
if (b.state === 'loop') { const i = S.loop.indexOf(b.id); return { state: 'loop', place: i + 1, of: C().loopSize, shiftsToRideOut: Math.max(1, C().loopSize - i) }; }
return { state: b.state };
}
+// a member-facing place: a taken-down banner says so (with the admin's reason), whatever its slot is doing
+function memberPlace(b) {
+ const p = placeOf(b);
+ if (!b.down) return p;
+ return { state: 'down', slot: p.state, downAt: b.down.at, downReason: b.down.reason, creditBack: !!b.down.creditBack };
+}
-module.exports = { hostOf, init, post, shift, verifiedVisit, canCount, rebuildIndex, leaders, memberWeek, view, placeOf, normalize };
+module.exports = { hostOf, init, post, shift, verifiedVisit, canCount, rebuildIndex, leaders, memberWeek, view, placeOf, memberPlace, recordCycle, normalize };
diff --git a/public/admin.html b/public/admin.html
index f50155d..5587317 100644
--- a/public/admin.html
+++ b/public/admin.html
@@ -22,7 +22,7 @@
-
+
@@ -31,13 +31,16 @@
Status
Weekly prize payouts
Each Monday after midnight (Central) the app prepares last week's payout. Nothing is sent until you approve it here, and a week is paid once. Amounts in POL are quoted live and fixed when you approve.
+
Banners: take down or restore
Find a banner by #id, wallet or username. A takedown hides it everywhere at once; its loop place stays (a house tile shows there) until it would have ridden out, so nobody else moves. It never cycles, never earns network views and never counts for prizes. The reason is shown to the owner. Every takedown and restore goes in the admin ledger below.