我稍微修改了初始帖子。看起来我最初的预算猜测并不现实。
另外,我删除了扩展 House Ads 界面的模型截图,因为那肯定需要破解或修改 Ad 插件的代码库。
看起来我需要通过一些巧妙的 Javascript 和 CSS 来实现。我注意到每个帖子都有一个 CSS 类,我猜这有助于我需要的修改逻辑。我想知道是否可以利用当前的 Ad 模块代码并将 N = 1 设置好,然后用 Javascript 和/或 CSS 来隐藏/显示不需要的实例。(不确定 House Ads 是否可以添加 <script> 标签?这篇帖子说可能不行。)
我在其他地方找到了一些类似的要求,看起来这个功能对社区很有用:
- https://meta.discourse.org/t/assistance-automatically-inserting-a-banner-after-every-initial-post-within-a-forum-topic
- https://meta.discourse.org/t/how-i-can-put-adsense-banner-after-first-post-only
- https://meta.discourse.org/t/is-it-possible-to-space-out-the-ads-in-the-topic
- House Ads in the official Ad Plugin - #132 by Jay91
- House Ads in the official Ad Plugin - #159 by Maynard
- House Ads in the official Ad Plugin - #168