Skip to content

Technical Plugin MonetizeUsers

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

Technical: MonetizeUsers plugin

Calculates creator rewards from viewing statistics and configured wallet rules.

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: AVideo Streamer repository.
  • Reported version: 3.2.
  • Source revision: 7d48f2dfc0289236718a3f9fba7c5ffecff4a37f.
  • Entry class file: MonetizeUsers.php.

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

Behavior and operational checks

Viewing statistics can have financial consequences with this plugin enabled. Check the reward formula and accounting period before treating a view counter as a purely cosmetic value.

Dependencies

No literal dependency declaration was extracted. This does not prove the plugin is standalone.

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

Hook integration

Override Implementation
getTags() MonetizeUsers.php:8
executeEveryMinute() MonetizeUsers.php:89

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
rewardPerView 0.1 Reward Value: This is how much you will pay the video producer for each view source
rewardMinimumViewPercentage Computed/structured; inspect source Minimum watch video percentage: We will only reward if the viewer watch at least the percentage here source
rewardOnlyLoggedUsersView true Reward only logged users: This is a good option to avoid bots. This option requires VideosStatistics plugin source
revenueCalculatorFooterText Computed/structured; inspect source — 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
MonetizeUsers.php plugin entry class —
Objects/Monetize_user_reward_log.php class/helper implementation —
View/index.php PHP page/include/worker; inspect caller —
View/report.php PHP page/include/worker; inspect caller end_date, start_date, users_id
View/reportPerVideo.php PHP page/include/worker; inspect caller —
View/reportTimeline.php PHP page/include/worker; inspect caller —
install/install.sql schema/migration SQL —
install/updateV2.0.sql schema/migration SQL —
install/updateV3.1.sql schema/migration SQL —
revenueCalculator.php PHP page/include/worker; inspect caller —
tools/resetAllStatistics.php PHP page/include/worker; inspect caller —

Data and migrations

Tables named in available CREATE TABLE statements: monetize_user_reward_log. 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
getTags() 8
getDescription() 15
getName() 25
getUUID() 29
getPluginVersion() 33
getEmptyDataObject() 37
executeEveryMinute() 89
rewardAndSaveLog($videos_id, $video_owner_users_id, $percentage_watched, $seconds_watching_video, $when_watched, $who_watched_users_id) 140
videosStatisticsToMonetizeUserRewardLog($videos_id, $video_owner_users_id, $percentage_watched, $seconds_watching_video, $when_watched, $who_watched_users_id, $total_reward) 151
getRewards($users_id = 0, $when_from = ''<string>''<string>'all') 167

Supporting PHP declarations

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

Objects/Monetize_user_reward_log.php

Declared classes: Monetize_user_reward_log.

Named symbol Source
getSearchFieldsNames() 9
getTableName() 13
setId($id) 17
setVideos_id($videos_id) 21
setVideo_owner_users_id($video_owner_users_id) 25
setPercentage_watched($percentage_watched) 29
setSeconds_watching_video($seconds_watching_video) 33
setWhen_watched($when_watched) 37
setWho_watched_users_id($who_watched_users_id) 41
setTotal_reward($total_reward) 45
getId() 50
getVideos_id() 54
getVideo_owner_users_id() 58
getPercentage_watched() 62
getSeconds_watching_video() 66
getWhen_watched() 70
getWho_watched_users_id() 74
getTotal_reward() 78
getLastRewardTime() 82
save() 96

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