Sngine Addon — Documentation

Trend-Notify Installation Guide

Trend-Notify keeps your community informed when groups, events, pages, posts, or comments gain significant engagement. It can also send a periodic digest highlighting popular posts from your website.

PHP 8.4+ Sngine 4.4.2+ Cron required Database MySQL / MariaDB Core edits none
01

Requirements

PHP PHP 8.4 or newer.
Sngine Designed and tested with Sngine 4.4.2.
Cron Access Your hosting account must allow scheduled PHP tasks.
Database MySQL or MariaDB with standard InnoDB support.
!

Important: Trend-Notify relies on scheduled tasks to regularly check your website's activity. Make sure cron jobs are available on your hosting plan before installation.

02

What's in the Package

The addon package contains the required files, database setup, scheduled task files, settings integration files, and editable email templates.

addons/trend-notify/
install.sql
entity-cron.php
entity-worker.php
post-engagement-cron.php
post-engagement-worker.php
comment-trending-cronp.php
comment-trending-worker.php
trending-digest-cron.php
trending-digest-worker.php
trend-notify-worker.php
template-loader.php
tn-admin-settings.php
tn-user-settings.php
tn-admin-settings.txt
tn-user-settings.txt
templates/
i

You do not need to modify the addon files unless specifically instructed in this guide. Installation mainly involves uploading the files, importing the database setup, adding the provided settings to your theme, and creating the required scheduled tasks.

03

Installation

1

Upload the addon

Extract the downloaded package and upload the trend-notify folder into your existing Sngine addons directory.

A No addons folder

Upload the provided addons folder to your Sngine installation.

B You already have an addons folder

Upload only the trend-notify folder into your existing addons directory.

C Upgrading an existing installation

Back up your existing Trend-Notify folder first. Then replace the old addon files with the files from the new version.

2

Import the database setup

Open phpMyAdmin, select the database used by your Sngine installation, and import the included install.sql file.

i

The database setup is required for Trend-Notify to operate. Import the supplied file rather than manually creating or renaming database objects.

3

Confirm your Sngine email settings

Trend-Notify uses your existing Sngine email configuration. No separate SMTP configuration is required for the addon.

Go to: Admin Panel → Settings → Email / SMTP

If your Sngine installation can already send emails successfully, Trend-Notify can use the same configuration.

4

Add the Trend-Notify settings

Add the supplied settings blocks to the corresponding Sngine template files.

Provided File Theme Template
tn-user-settings.txt themes/[theme]/templates/settings.notifications.tpl
tn-admin-settings.txt themes/[theme]/templates/admin.settings.notifications.tpl

If your website uses multiple themes, repeat this step for each active theme where the Trend-Notify settings should appear.

5

Configure the security key

Trend-Notify includes a security key for its scheduled tasks. Before creating the cron jobs, replace the default security placeholder with your own unique secret where required.

File Action
post-engagement-cron.php Replace the default security value.
comment-trending-cronp.php Replace the default security value.
!

Use the same secret value wherever the addon requires the security key. Choose a long, difficult-to-guess value and keep it private.

6

Set up the scheduled tasks

Trend-Notify requires scheduled PHP tasks to periodically check activity and send notifications. For most websites, the following schedule is recommended.

Task Purpose Recommended
entity-cron.php Checks groups, events and pages for trending activity. Every 15–30 min
entity-worker.php Processes entity-trending notifications. Every 5 min
post-engagement-cron.php Checks posts for trending activity. Every 15–30 min
post-engagement-worker.php Processes post-trending notifications. Every 5 min
comment-trending-cronp.php Checks comments for trending activity. Every 15–30 min
comment-trending-worker.php Processes comment-trending notifications. Every 5 min
trending-digest-cron.php Prepares the periodic trending digest. Once daily
trending-digest-worker.php Processes digest notifications. Every 5–10 min

Example PHP cron commands:

Cron Job Example
/usr/bin/php /home/account/domains/your-website.com/public_html/addons/trend-notify/entity-cron.php

/usr/bin/php /home/account/domains/your-website.com/public_html/addons/trend-notify/entity-worker.php

/usr/bin/php /home/account/domains/your-website.com/public_html/addons/trend-notify/post-engagement-cron.php

/usr/bin/php /home/account/domains/your-website.com/public_html/addons/trend-notify/post-engagement-worker.php

/usr/bin/php /home/account/domains/your-website.com/public_html/addons/trend-notify/comment-trending-cronp.php

/usr/bin/php /home/account/domains/your-website.com/public_html/addons/trend-notify/comment-trending-worker.php

/usr/bin/php /home/account/domains/your-website.com/public_html/addons/trend-notify/trending-digest-cron.php

/usr/bin/php /home/account/domains/your-website.com/public_html/addons/trend-notify/trending-digest-worker.php
!

Replace the example hosting path with the correct path for your own website. The exact PHP executable path may differ between hosting providers.

If you are using cPanel, Hostinger, Plesk, DirectAdmin, or another hosting control panel, check your hosting provider's documentation for instructions on creating cron jobs.

Need help with installation or setup? Contact me for installation assistance.

7

Verify the installation

After creating the scheduled tasks, allow Trend-Notify to run. Confirm that the admin settings page is available and that the notification settings appear correctly for users.

i

If your website already has enough activity to meet the configured thresholds, notifications can begin appearing after the scheduled tasks run.

If your site is still new or has low activity, you may not receive a trending notification immediately. This is normal — Trend-Notify only notifies users when the configured conditions are met.

8

Customize the email templates (optional)

Trend-Notify includes editable HTML email templates that allow you to customize the appearance and branding of notification emails.

Template Purpose
templates/entity-notification.html Group, event and page trending notifications.
templates/post-trending-author.html Notification for a user's trending post.
templates/post-trending-follower.html Notification when someone a user follows has a trending post.
templates/comment-trending-commenter.html Notification for a user's trending comment.
templates/comment-trending-post-author.html Notification related to a trending comment on a user's post.
templates/comment-trending-follower.html Notification when someone a user follows has a trending comment.
templates/digest-notification.html Periodic trending digest email.
templates/digest-post-row.html Individual post displayed inside the digest.
i

You can customize the visual design, wording and branding of the emails. Do not remove or rename template placeholders enclosed in {{ }}.

04

How Trend-Notify Works

Trend-Notify uses activity already happening on your Sngine website to identify content and community areas that are gaining significant engagement.

Groups Notify relevant administrators when a group reaches the configured activity level.
Events Monitor event activity and notify the appropriate administrators when an event becomes trending.
Pages Identify pages receiving significant engagement and notify their administrators.
Posts Notify content creators and eligible followers when posts receive enough engagement to become trending.
Comments Notify users when comments receive significant engagement and meet the configured trending conditions.
Trending Digest Periodically highlight popular posts in a convenient digest email for users who have enabled it.
i

Trend-Notify does not require users to create additional content or enter special information. It works with the activity already taking place across your Sngine community.

Admin Control Administrators decide which trending features are active and set the appropriate activity thresholds.
User Control Individual members can control the types of Trend-Notify email notifications they want to receive.
Automatic Once cron jobs are configured, Trend-Notify runs automatically in the background.
Sngine Email Notifications use your existing Sngine email configuration, so no separate mail system is required.
05

Settings

Trend-Notify provides separate controls for individual members and website administrators.

User → Notifications
Entity trending notifications
Notifications for groups, events and pages you administer.
Your post trending
Know when one of your posts becomes trending.
Followed users' trending posts
Discover trending posts from people you follow.
Your comment trending
Know when one of your comments becomes trending.
Followed users' trending comments
Discover trending comments from people you follow.
Trending digest emails
Receive a periodic roundup of popular posts.
On — Trend-Notify notifications are enabled for this preference.
Admin → Trend-Notify Settings
Post trending
Enable trending notifications for posts.
Comment trending
Enable trending notifications for comments.
Group trending
Enable trending notifications for groups.
Event trending
Enable trending notifications for events.
Page trending
Enable trending notifications for pages.
Trending digest
Enable the periodic popular-post digest.
Digest interval
Number of days between digest emails.
7 days
Posts per digest
Number of popular posts included in each digest.
5 posts
These settings allow administrators to control Trend-Notify functionality across the website. Individual users can also control their own notification preferences.
Admin → Trending Thresholds

Administrators can adjust the activity levels required before different types of content are considered trending.

Setting What it controls
Group threshold How much group activity is required before a group can become trending.
Event threshold How much event activity is required before an event can become trending.
Page threshold How much engagement is required before a page can become trending.
Post likes threshold Number of post reactions required for post trending.
Post comments threshold Number of comments required for post trending.
Post lookback period How far back Trend-Notify considers post activity.
Comment engagement threshold Engagement required before a comment can become trending.
Comment lookback period How far back comment activity is considered.
Digest reaction weight Controls how reactions contribute to the popularity ranking.
Digest comment weight Controls how comments contribute to the popularity ranking.
i

Choose thresholds based on your website's activity level. A smaller community may need lower thresholds, while a highly active community may benefit from higher values.

06

Support

Need help installing Trend-Notify, configuring your website, or troubleshooting an issue? Get in touch.