VIP
您设计的付费 VIP 等级:价格、时长、图片、颜色和特权(头像框、入场效果、彩色名字、防踢和防封、隐藏房间)。用金币为自己或作为礼物购买,保存在背包中。
作者:Arjun Mehta首次发布于 2026年11月29日最近更新于 2026年12月1日
关于此功能
您设计的付费 VIP 等级:价格、时长、图片、颜色和特权(头像框、入场效果、彩色名字、防踢和防封、隐藏房间)。用金币为自己或作为礼物购买,保存在背包中。
功能
- 运作方式:您可以创建任意数量的 VIP 等级(等级 1、2、3 等)。用户在应用中打开 VIP 中心,在 VIP 商店中选择一个等级,用金币购买,可以为自己购买,也可以作为礼物赠送给其他用户。金币会被扣除,VIP 在一个步骤中加入其 VIP 背包:如果任何环节失败,其金币保留不变。购买的 VIP 会在背包中保持未开启状态,只有在首次使用(或首次佩戴其中某件物品)时才开始计算天数。同一时间只有一个 VIP 生效:开启另一个会停止第一个。用户可以再次关闭它,但天数已结束的 VIP 无法开启。如果安装了 Levels 功能,其支付金额也会计入其财富等级。
- 您为每个等级设置:等级编号(每个编号对应一个等级)、名称、等级图片(显示在名字旁的 VIP 徽章)、等级页面的背景图片、#RRGGBB 格式的三种颜色(页面背景、金色和浅金色)、整数金币价格(1 或以上)、以天计的时长(非超级管理员的管理员最多只能设置 30 天)、该等级附带的特权(每种类型一次),以及等级成员可在普通聊天设置之外,额外置顶在聊天列表顶部的聊天数量(0 到 1000)。如果某等级的自有商品仍在某处作为奖励发放,则无法删除该等级。
- 特权第一部分:拥有自己图片或动画的物品。您可以通过等级的设置按钮为每个等级创建物品,或关联一个其他等级未使用的现有商店物品:VIP 图标(每个等级自动附带,无需选择,即等级图片)、Avatar Frame(头像框)、Profile Frame(资料框,带半幅图片选项)、Chat Bubble(聊天气泡,带上、左、右、下内边距)、Entrance(入场效果)、Entrance Banner(入场横幅)、以及 Gift Banner(礼物横幅:持有者发送昂贵礼物时在应用中绘制的横幅条;每个等级都有自己的横幅,并优先于金币区间的横幅条)。每件物品都有名称、标题、图片、带类型的动画文件、以天计的有效期(0 = 只要 VIP 有效),并可开启或关闭。
- 特权第二部分:为等级开启的行为,无需制作图片:Colored Name(名字以您为等级选择的颜色显示)、Hide profile visits(查看资料但不留下访问记录)、Hide country(资料上不显示名称和国旗)、Animated profile picture(接受 GIF 作为头像;没有此特权则 GIF 会被拒绝)、Hidden last seen(无人能知道其当前是否在线)、Hidden read receipts(发送者仍会看到两个灰色勾)、Protected from kicks(除面板外,无人能将其踢出房间)、Protected from bans(无人能在房间中封禁其或将其加入屏蔽名单)、Hidden room(其房间不会出现在列表中,搜索不到,也不显示在资料卡片上)、以及 Anonymous entry(进入房间时其名字不会出现在房内成员中)。总计最多 17 项特权;每项只在所属功能(商店、聊天、资料、语音房和礼物)安装后才会出现,因此您永远看不到无法销售的特权。其中十二项用户可以在自己的 VIP 设置中开启和关闭;防踢和防封、隐藏房间、匿名进入和礼物横幅则保持开启。
- 背包、礼物与历史:在 VIP 背包中,用户可以看到自己拥有的每个 VIP 及其物品,状态为使用中、已暂停,或将在首次使用时开始。他可以立即使用,也可以将其作为礼物赠送。从未使用过的 VIP 可以通过朋友的 ID(人们看到的数字,包括特殊 ID)赠送给朋友;物品随之转移,被封禁的账号无法接收,不能赠送给自己,已送出的礼物也无法收回。礼物历史页面会列出其送出和收到的内容。购买数量为 1 至 12,如果总天数超过可交付的范围,整笔购买会被拒绝。
- 您在控制面板中管理的内容:包含五个页面的 VIP 板块。VIP Levels(创建、编辑、删除、查看;即上面的等级表单)。VIP Privileges(每项特权的名称、标题、类型,以及两张必填图片:激活和未激活;面板默认语言的一个名称和一个标题,其他语言通过翻译页面获取)。VIP Wares(每个等级的物品,可按等级和类型筛选,有状态开关、对 VIP 激活、有效期和数量)。VIP Dedicate(将等级赠予任何用户:输入用户的 ID,可选填天数,或留空以使用等级本身的时长;用户会收到推送和官方消息;非超级管理员的管理员限于 30 天,并且只能针对其所辖地区的用户)。VIP Settings(单一选项,Enable Vip Auto)。在每位用户的页面上,VIPs 标签列出其持有的等级,并带有一个可移除其中一个的按钮。所有功能都受 23 项权限控制(等级、等级物品、特权、商品、设置和赠予,每项都有各自的查看、创建、编辑、删除和显示权限),默认授予管理员职位。
- 图片和动画文件:等级的背景是普通图片,等级图片以文件形式上传。物品的图片接受图像,其动画文件接受 SVGA、VAP、PAG、带 Alpha 通道的视频(透明 MP4)、普通 MP4 和图像;文件类型根据文件内容识别,您可以修改;特权图片(激活和未激活)是图像。(需要商店功能,因为动画格式由其提供。)
- 用户在应用中看到的内容:VIP 中心,显示其当前等级、剩余天数(占总时长)及其特权;VIP 商店,用户可在此购买或续费等级,并查看价格、时长、解锁的特权和下一等级;背包;VIP 设置(每项特权可开关,自动保存);礼物历史;名字出现的任何地方都会在名字旁显示 VIP 徽章;屏幕上的彩色名字、头像框、气泡和入场效果;以及在任何需要特定等级的功能处,显示一条明确的提示「需购买 VIP N 或更高等级才能享用」,点击即可打开商店。尚未设置任何等级的服务器会显示「No VIP levels yet」。
- 适用于所有主题:VIP 中心、商店、背包和设置从当前主题取色;每个等级的页面使用您为其选择的颜色,并选择文字颜色,以确保在每个主题下都清晰可读。
- 无附加组件:每项特权都是 VIP 本身的一部分;当您安装带有自身特权的功能时,列表会自动增长。
- 对您的价值:VIP 是您能卖给最活跃用户的最清晰的产品。您决定有多少等级、每个等级的价格和时长;而特权(外观、隐私和保护)是用户真正想要并会续费的东西。礼物让您的用户变成销售者,背包则把未使用的 VIP 作为存储价值保留下来。
依赖
钱包(金币被扣除并记录;没有钱包时等级仍会显示,管理员仍可赠送 VIP,但无法销售)和商店(等级物品及动画格式)。Levels 功能为可选。每项特权都需要其自身的功能:聊天、资料、语音房和礼物。
应用内截图
左右滑动查看更多
安装与移除
购买后,您也可以在“我的购买”中找到这些命令。
安装
php artisan feature:install vip --apply移除(您的数据会保留)
用一条命令在基础应用中关闭此功能(命令显示在本页)。VIP 页面、特权和购买停止,面板板块消失,其他功能的 VIP 奖励被跳过。等级、订阅和用户设置会保留,并在功能恢复后回来。
php artisan feature:remove vip请先移除它的附加项:如果附加项仍已安装,移除该功能的操作会被拒绝。
此功能暂时还没有附加项。
所需功能
没有任何要求:可以单独安装。
安装与移除
这条命令会为功能准备好数据表、管理面板页面、权限、设置和基础数据。在应用中,该功能会自动出现在它应在的位置。 该功能会从应用和管理面板中消失,而您的数据会保留。重新安装后,一切都会恢复原样。
购买后,您也可以在“我的购买”中找到这些命令。
安装
php artisan feature:install vip --apply移除(您的数据会保留)
用一条命令在基础应用中关闭此功能(命令显示在本页)。VIP 页面、特权和购买停止,面板板块消失,其他功能的 VIP 奖励被跳过。等级、订阅和用户设置会保留,并在功能恢复后回来。
php artisan feature:remove vip请先移除它的附加项:如果附加项仍已安装,移除该功能的操作会被拒绝。
在你自己的功能里使用这个功能
In short: the VIP offers other features 4 server ports (VipCatalog, VipGrant, PrivilegeReader, PrivilegeSwitches: the ones other features bind or ask; VipBag and VipWares are the two the store answers), FeatureCalls for the card, and one app extension point (VipUpsell). Do not call any class inside Modules/Vip directly.
Install and remove
- Install:
php artisan feature:install vip --apply(without--applyit is a dry run). It seeds the menu, the permissions and the switch row closed; open it withphp artisan feature:open vip. The install is empty: no level, no item, no subscription, no demo account; the admin adds levels from the panel. The only thing seeded is the list of privilege kinds (vip_privileges: kind number, name and icon, which the code reads), byVipPrivilegeKindsSeeder. A test stops any seeder or migration from writing a level (Tests/Feature/Install/VipInstallsEmptyTest). - Remove:
php artisan feature:remove vip --apply. The data stays. - Requires:
base:users@1only.
Ports (server)
All of them live in the base; the feature binds the implementation from VipServiceProvider::register(), and without the feature the Null one answers.
| Port | What it asks / does | Without the feature |
|---|---|---|
Modules\Vip\Contracts\VipCatalog | all(), find($id), byIds($ids), idsByLevel(): the levels as data (id, name, level) | empty |
Modules\Vip\Support\VipGrant | addVipToUser(...) / removeVipFromUser(...): gives a level or takes it back (inside a transaction, rolled back on failure) | false |
Modules\Vip\Support\Privileges\PrivilegeReader | the behaviour privileges in effect for a user (has, color) | no privileges |
Modules\Vip\Support\Privileges\PrivilegeSwitches | the user's choice to turn a privilege on or off | everything on |
- Get them from the container:
app(\Modules\Vip\Contracts\VipCatalog::class); they are always bound. - Do not bind another implementation, and do not read
o_vips,users_vipsor theUser::UserViprelation directly. - Granting from your feature (a VIP prize): use
RewardGrantwith kindvip(the feature registersVipRewardGrant), orVipGrant.check()answerstarget_missingwhen the level does not exist andno_durationwhen there is no duration to give (the prize's days or the level's duration). Ask it beforegrant()if you pay inside one transaction and want to tell "nothing to give" apart from a failed write.
FeatureCalls (the VIP card and images)
vip.card: one call, with the kind as the first argument. Kinds:card,cardV2,rank,rankImage,rankImageV2,ware,wareV2andcolorV2. Each feature asks it directly:FeatureCalls::call('vip.card', <default>, <kind>, $userId, <context>); the default is the caller's.vip.announce_grant: the message that tells a user a VIP was granted (defaultnull).vip.valid_ids($userIds):userId => [vipId => true]for the running subscriptions.vip.valid_ids_query(): the same rows as a query with theidcolumn only, for a sub-select (not deleted,is_used = 1, andexpire = 0or not yet passed). The default is the caller's.vip.holds_level:FeatureCalls::call('vip.holds_level', false, $userId, $level). A missing key returns the default (used byMiscHelperService::userVipLevel).vip.ovip_options:id => levelfor every level (a filter list, used by the families' user filter).vip.user_vips($userId)andvip.delete_expired(): the bag lists a user's own VIP rows and clears the ones that ended.
FeatureCalls for the bag (the store asks them without requires)
vip.never_activated (a subscription id: was it never activated? default false), vip.activate_on_first_wear, vip.level_prices (cacheKey, seconds), vip.dedicate_level (the "gift a VIP level" branch of the bag action). vip.privilege_has is in the list below. The model user_vip is registered in FeatureModels.
Events
- The feature does not emit real-time events. It sends a VIP-granted notification (an official message plus Firebase) when a VIP is granted.
- What it listens to: nothing.
Data you can read
Read through the port, not the table. The six tables belong to the feature. App routes: GET api/vips/list, GET api/vips/user/list, POST api/vips/buyVip, POST api/vips/use, POST api/vips/send-to-user, GET api/vips/theme-settings, GET api/vips/gifts, GET api/vips/recipient; all of them are guarded by appFeatureEnable:vip.
Slots (app)
VipUpsell.provide(opener): your feature calls VipUpsell.open(context, level: n) to open the VIP center at a given level; without the feature nothing happens. The vips notification is NotificationRoute(id: 'vips', feature: 'vip').
Server example: a feature asks "does the user hold a VIP of level 3 or more?"
use App\Support\FeatureCalls;
// false when the VIP is not installed
$ok = (bool) FeatureCalls::call('vip.holds_level', false, $user->id, 3);Add an add-on inside the VIP
The VIP has no add-ons today (by design: protection, hiding and the coloured name are privileges inside the feature, not add-ons). If you want to build an add-on on it, the shape is the same as any add-on in the repo (real examples: Modules/LevelsCharge/feature.json on levels, and Modules/ChargeAgency/feature.json on payment_gateways):
{
"contract": "2.1",
"slug": "vip_xxx",
"kind": "addon",
"parent": "vip",
"version": "1.0.0",
"app_switch": "vip_xxx",
"requires": ["base:users@1", "vip@^1"],
"slots": { "routes": { "api": { "file": "Routes/api.php" } } }
}- In the app:
of: vipintools/features.yamlinstead ofparent. - Files:
Modules/<X>/{feature.json,module.json,FEATURE.md,Providers/<X>ServiceProvider.php,Routes/api.php,Database/Migrations}, and your tables are declared inslots.data.tables. - Where it registers itself: in
Providers/<X>ServiceProvider(likeLevelsChargeServiceProvider):register()binds the port withbind(notbindIf), andboot()loads the migrations and routes and registersFeatureCalls::register('<slug>.<name>', '<slug>', fn...). - Do not call
Modules/Vipclasses directly: read throughVipCatalog/PrivilegeReader/FeatureCallsabove, and grant throughVipGrant. A new column onusers_vipsoro_vipsis a migration in your module, not a change in the VIP. - Install and remove:
php artisan feature:install vip_xxx --applyandphp artisan feature:remove vip_xxx --apply; the app:python tools/apply_features.py.
Settings, permissions and menu
- Settings (table
configs, modelApp\Models\Config, from theovip-settingsscreen):enable_vip_auto: turns the automatic system on or off in the settings screen.
- Chat pin limit: the column
o_vips.chat_pin_limit(0 = no increase) is set from the level form. The feature registersPanelSlots::register('chat.pin_limit', 'vip.level', 'vip', ['limit' => fn (User) => int]), and the chat takes the largest value between its own setting and every limit (the largest limit among the user's running VIP levels, 0 for a user without VIP). - Feature switch:
app_features.vip(closed byfeature:remove vip, opened byfeature:open vip). - Feature permissions (23 legacy, category
Vip, defaultadmin):browse/create/edit/delete/show-VIPs(levels)browse/create/edit/delete-vip-giftbrowse/create/edit/delete/show-vip-privilegebrowse-ovip-settingsandedit-ovip-settingsbrowse/create/edit/delete/show-wares-vipsbrowse-gift-VIPandgift-switch-gift-VIP
- Menu rows (section "VIP", after "Banners & Splash"):
| Title | uri | Permission |
|---|---|---|
| VIP Privileges | vip_privilege | browse-vip-privilege |
| VIP Dedicate | vips_dedicate | browse-gift-VIP |
| VIP Levels | ovip | browse-VIPs |
| VIP Wares | wares-vips | browse-wares-vips |
| VIP Settings | ovip-settings | browse-VIPs |
UserPayload keys
The App\Support\UserPayload keys this feature registers or answers (the base does not know feature names; the explanation is here). The default is written by the caller.
- Keys it adds to an answer (
UserPayload::extend):my_data: vip and image.user_v1: vip.user_v1anduser_v2: has_color_name and visit_hidden (each is the matching privilege).user_v2anduser_search_v1: vip.user_search_v1andsearch_user: has_color_name.mini_user: colored_name and has_color_name. hide_country(13),colored_name(18),hide_visits(19),hide_last_active(20),vip_upload_gif(22): does the user hold the privilege? (bool; user cards, themeanswer, search, user data; default false: without a VIP nobody holds a privilege)privileges_preload: the ids a list is about to ask about.
Registered FeatureCalls
Small questions other features ask with FeatureCalls::call (the name, who asks, and what it answers; the default is the caller's when the feature is not installed):
vip.privilege_has(the store (a worn pack of a behaviour type, the pack helpers), the pack screens: does he hold the privilege and has not switched it off (false without VIP))vip.privilege_holds(the store (is_allow: he holds it, switched off or not; false without VIP))vip.privilege_color(the store UserPackHelper (the colour a privilege gives, '' without VIP))vip.privilege_item(the gift banner (userId, kind): the picture {img, type} of the item privilege on the highest running level that has an enabled product of it; null without VIP, switched off, or no product)
更新内容
1.1.171发布于 2026年12月1日作者:Arjun Mehta
- 1.1.171: Gifting VIP works for any user: the phone-number rule is gone, so an account without a phone is found and gifted like any other.
1.1.169发布于 2026年11月29日作者:Arjun Mehta
- Release 1.1.169 (signed build 9921cfa)