Stack POL Pro pages (Marty 2026-11-09): a Pro member's page shows their own LinkSpin Banner Spins in the ad spots (a spot with no fitting size keeps the network zone), their spin links, a purple Polygon QR to the page (/qr/<username>.svg, qrcode module) and a "Want a personalized page like this?" panel (join under the member, or Unlock Pro in IAP). Every page opened with ?ref=<Pro member> credits them on every call to action (join links, game links, program pages, internal links carry the ref) and shows their banners; no ref or a non-Pro ref = the standard network pages and zones. Blog posts now carry an ad spot after the third paragraph, and personalized posts end with the member's links and the Pro panel. Member pages also get a network spot and the latest blog posts. Indexer reads pro[] from IAP stack-optin.json and adds each Pro member's active spins and spin links (matched by username in LinkSpin).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -144,6 +144,26 @@ def main():
|
||||
stacks[un] = {'total': round(sum(r['pol'] for r in mine), 4), 'payments': len(mine), 'since': min(r['ts'] for r in mine),
|
||||
'byProg': {k: {'pol': round(v['pol'], 4), 'payments': v['payments']} for k, v in by.items()},
|
||||
'recent': [{'k': r['k'], 'pol': round(r['pol'], 4), 'tx': r['tx'], 'ts': r['ts']} for r in mine[:25]]}
|
||||
# Stack POL Pro (2026-11-09): a paid one-time unlock in IAP. Pro pages (and blog/program pages opened from one) show the member's own
|
||||
# LinkSpin Banner Spins and spin links in place of the network zones. Matched by username (one identity across IAP and LinkSpin).
|
||||
pro = {str(k).lower() for k, v in ((so.get('pro') or {}) if isinstance(so, dict) else {}).items() if v}
|
||||
if pro and lsd:
|
||||
em = {}
|
||||
for e, a in (load(os.path.join(lsd, 'accounts.json'), {}).get('byEmail', {}) or {}).items():
|
||||
un = str(a.get('username') or '').lower()
|
||||
if un in pro:
|
||||
em[str(e).lower()] = un
|
||||
bs = load(os.path.join(lsd, 'bannerspin.json'), {}).get('spins', []) or []
|
||||
rt = load(os.path.join(lsd, 'rotator.json'), {}).get('rotations', []) or []
|
||||
for un in pro:
|
||||
if un not in stacks:
|
||||
continue
|
||||
mine = [e for e, u in em.items() if u == un]
|
||||
spins = [{'code': x['code'], 'size': x.get('size', ''), 'name': str(x.get('name') or '')[:60]} for x in bs
|
||||
if str(x.get('owner', '')).lower() in mine and not x.get('paused') and any(b.get('active', True) for b in x.get('banners') or [])]
|
||||
links = [{'code': x['code'], 'name': str(x.get('name') or '')[:60]} for x in rt
|
||||
if str(x.get('owner', '')).lower() in mine and not x.get('paused') and any(d.get('active', True) for d in x.get('destinations') or [])]
|
||||
stacks[un]['pro'] = {'spins': spins[:40], 'links': links[:20]}
|
||||
snap = {'v': 1, 'at': now, 'network': {'pol': round(sum(r['pol'] for r in rows), 4), 'payments': len(rows), 'wallets': len(wallets - {''})},
|
||||
'last7': {'pol': round(sum(r['pol'] for r in l7), 4), 'payments': len(l7)}, 'programs': programs, 'recent': recent, 'progRecent': prog_recent, 'stacks': stacks}
|
||||
print('network %.2f POL, %d payments, %d wallets | last7 %.2f | stacks %s' % (snap['network']['pol'], snap['network']['payments'], snap['network']['wallets'], snap['last7']['pol'], ','.join(stacks) or '-'))
|
||||
|
||||
Reference in New Issue
Block a user