Skip to content

Technical Plugin Gift

Daniel Neto edited this page Oct 29, 2026 · 1 revision

Technical: Gift plugin

Purchases and redeems supported subscription or pay-per-view plans as gifts.

Audience: developers, advanced administrators and AI-assisted diagnosis. Plugin catalog.

Source baseline

  • Review date: 2026-10-29. Method: static source analysis; runtime/provider behavior was not exercised.
  • Code ownership: independently versioned plugin repository.
  • Reported version: 1.1.
  • Source revision: c967efecf72c7d1206e4e74b07a99c81a8b6e1b4.
  • Entry class file: Gift.php.

Confirm the installed plugin version independently of the Streamer version. Configuration defaults below are not a dump of this installation's saved settings.

Dependencies

Plugin Required by declaration Source reason
Subscription Optional Optional gift-a-subscription-plan support
PayPerView Optional Optional gift-a-PPV-plan support
YPTWallet Required Gift purchase and redemption require wallet transactions

Literal runtime plugin references: PayPerView, Subscription, YPTWallet. These calls do not mean every referenced plugin is mandatory.

Hook integration

Override Implementation
updateScript() Gift.php:50
getPluginMenu() Gift.php:119
profileTabName($users_id) Gift.php:159
profileTabContent($users_id) Gift.php:165
executeEveryMinute() Gift.php:449
getHTMLMenuRight() Gift.php:459

Configuration assignments

These are direct assignments inside getEmptyDataObject(), not evaluated effective defaults. Stored plugins.object_data, globals, structured values and conditional branches may alter runtime behavior. Private/default credential values are omitted.

Field Literal default or expression type Literal source label/help Evidence
displayTopBarBuyButton true — source
buyButtonText "Buy Now" — source
gift_message_subject Computed/structured; inspect source Gift Message Subject source
gift_message Computed/structured; inspect source Gift email message: This message will be sent to the person receiving the gift via email source
gift_redeem_confirmation_message Computed/structured; inspect source Gift redeem confirmation message: This message will appear once the user confirm the gift code source
gift_ppv true — source
gift_subscription true — source

Files and request surface

This inventory distinguishes implementation files from an API specification. Includes, templates, callbacks and CLI workers are not interchangeable HTTP endpoints. Request-field names below are direct source references, not a complete schema or permission declaration.

File Source role Direct request fields observed
Gift.php plugin entry class —
HTMLMenuRight.php PHP page/include/worker; inspect caller —
Objects/Gifts.php class/helper implementation —
View/Gifts/add.json.php JSON entry point; inspect caller and guard buyer_email, buyer_users_id, delivery_date, expiration_time, fsubscriptions_plan_id, gift_code, gift_message, gift_value, howmany, id, json, ppv_plans_id, recipient_email, recipient_users_id, redeemed_time, status, subscriptions_plans_id, type
View/Gifts/delete.json.php JSON entry point; inspect caller and guard id
View/Gifts/index.php PHP page/include/worker; inspect caller —
View/Gifts/index_body.php PHP page/include/worker; inspect caller —
View/Gifts/list.json.php JSON entry point; inspect caller and guard draw
View/createGift.php PHP page/include/worker; inspect caller plans_id, type
View/editor.php PHP page/include/worker; inspect caller —
View/gift.cancel.json.php JSON entry point; inspect caller and guard gifts_id
View/gift.save.json.php JSON entry point; inspect caller and guard —
View/gift.sendemail.json.php JSON entry point; inspect caller and guard gifts_id
View/install.json.php JSON entry point; inspect caller and guard —
View/profileTabContent.php PHP page/include/worker; inspect caller sort
View/redeem.json.php JSON entry point; inspect caller and guard code
View/redeem.php PHP page/include/worker; inspect caller code
install/install.sql schema/migration SQL —
install/updateV1.1.sql schema/migration SQL —

Data and migrations

Tables named in available CREATE TABLE statements: gifts. Apply installation/update behavior through the owning plugin; this reference is not a script for running historical migrations manually.

Main-file named symbols

Visibility and implementation semantics must be checked in source. Nonempty string defaults are represented as . This is a symbol reference, not a stable public API promise.

Function or method Source
getPluginDependencies() 9
getDescription() 28
getName() 35
getUUID() 40
getPluginVersion() 45
updateScript() 50
getEmptyDataObject() 55
getPluginMenu() 119
replaceText($users_id, $planId, $type, $text) 129
profileTabName($users_id) 159
profileTabContent($users_id) 165
getStatusText($status, $addLabel = true) 175
getPlan($gifts_id) 211
getSupportedPlan($type, $id) 224
purchase($data) 244
clearCode($code) 296
statusIsValidForReddem($status) 301
getGiftInfo($code) 312
redeem($code) 363
cancelGift($id) 418
getLink($code) 444
executeEveryMinute() 449
getHTMLMenuRight() 459

Supporting PHP declarations

These symbols are grouped by source file; inspect the class declaration and visibility before calling them.

Objects/Gifts.php

Declared classes: Gifts.

Named symbol Source
getSearchFieldsNames() 12
getTableName() 17
getAllPpv_plans() 22
getAllFsubscriptions_plan() 47
getAllSubscriptions_plans() 72
setId($id) 99
setGift_code($gift_code) 104
setHowmany($howmany) 109
setBuyer_email($buyer_email) 114
setRecipient_email($recipient_email) 119
setGift_message($gift_message) 124
setDelivery_date($delivery_date) 129
setRedeemed_time($redeemed_time) 134
setType($type) 139
setRecipient_users_id($recipient_users_id) 144
setBuyer_users_id($buyer_users_id) 149
setStatus($status) 154
setJson($json) 159
setExpiration_time($expiration_time) 164
setPpv_plans_id($ppv_plans_id) 169
setFsubscriptions_plan_id($fsubscriptions_plan_id) 174
setSubscriptions_plans_id($subscriptions_plans_id) 179
setGift_value($gift_value) 184
getId() 190
getGift_code() 195
getHowmany() 200
getBuyer_email() 205
getRecipient_email() 210
getGift_message() 215
getDelivery_date() 220
getRedeemed_time() 225
getType() 230
getRecipient_users_id() 235
getBuyer_users_id() 240
getStatus() 245
getJson() 250
getExpiration_time() 255
getPpv_plans_id() 260
getFsubscriptions_plan_id() 265
getSubscriptions_plans_id() 270
getGift_value() 275
save() 281
getAllToSendEmail() 296
getAll($buyer_users_id=0, $recipient_users_id=0) 323
getFromCode($code) 357
getEmailMessage() 373
sendEmail() 387

Diagnostics and validation

  1. Check the installed/enabled version and the dependencies/settings above.
  2. Identify the actual failing page, request, callback or worker and correlate its timestamp with the AVideo log.
  3. Follow the linked method and caller. Check business-state changes and output artifacts as well as HTTP status.
  4. Reproduce the relevant workflow in a test environment. External provider, Encoder, live-server, storage, payment and authenticated flows require their real integrations.

Shared diagnostic workflow. This page is not a security audit or a claim of end-to-end validation.

Clone this wiki locally