Skip to main content

Setting Up Activity Streams

Overview

The Activity Stream is the heart of Sociable - a dynamic feed where users can share posts, photos, videos, and interact with content from their connections. It supports reactions, comments, sharing, and sophisticated privacy controls.

Activity Settings Configuration

Configure activity settings in Components → Sociable → Settings → Activities:

SettingDescriptionDefault
Require Post ApprovalPosts need admin approval before publishingNo
Allow Media UploadsAllow image and video attachmentsYes
Max Media Size (MB)Maximum file size for uploads10
Max Media Per PostMaximum attachments per post10
Allowed Media TypesAccepted file typesJPEG, PNG, GIF, MP4
Enable ReactionsAllow reactions on postsYes
Enable CommentsAllow comments on postsYes
Enable SharingAllow sharing/repostingYes

Activity Types

Sociable supports various activity types:

TypeDescription
postStandard text post
photoPhoto post with optional caption
videoVideo post with optional caption
shareShared/reposted content
statusStatus update
systemSystem-generated activity (from integrations)

Creating Activities

From the Frontend

Users can create activities from:

  • Main Feed - Compose box at the top of the feed
  • Profile Page - "What's on your mind?" composer
  • Group Page - Group-specific post composer

Post Features:

  • Text content with character limit (configurable)
  • Multiple media attachments
  • Visibility selection (public/friends/private)
  • @mentions and #hashtags

From Administrator

Administrators can manage activities:

  1. Go to Components → Sociable → Activities
  2. View all activities with:
    • Author information
    • Content preview
    • Visibility setting
    • Reaction/comment counts
    • Moderation status
  3. Actions available:
    • Edit content/visibility
    • Publish/unpublish
    • Delete

Post Visibility

Users can control who sees their posts:

VisibilityWho Can See
PublicEveryone, including non-logged-in visitors
FriendsOnly approved friends/connections
PrivateOnly the author (personal notes)
GroupOnly members of the specified group

Visibility can be set per-post and defaults to the user's profile setting.

Reactions

Sociable supports rich reactions beyond simple likes:

ReactionDescription
Like👍 General approval
Love❤️ Strong appreciation
Haha😂 Funny content
Wow😮 Surprising content
Sad😢 Sympathetic response
Angry😠 Disagreement

Enabling/Disabling Reactions

Toggle reactions in settings:

  • Enable Reactions - Master toggle
  • Individual reaction types can be enabled/disabled

Comments

Comments allow threaded discussions on posts.

Features

  • Nested Replies - Reply to specific comments
  • Mentions - @mention users in comments
  • Reactions - React to comments
  • Edit/Delete - Authors can modify their comments

Moderation

  • Post authors can delete comments on their posts
  • Group moderators can delete comments in their groups
  • Admins can delete any comment

Sharing

Users can share interesting content:

Share Types

TypeDescription
RepostShare to own feed with optional comment
QuoteShare with added commentary
ExternalShare link to other platforms

Privacy Considerations

  • Only public posts can be shared
  • Group posts can only be shared within the group
  • Original author is always credited

Media Handling

Supported Formats

Images:

  • JPEG/JPG
  • PNG
  • GIF (including animated)

Videos:

  • MP4

Upload Limits

SettingDefaultNotes
Max file size10 MBPer file
Max files per post10Combined images/videos

Processing

Uploaded media undergoes:

  1. Validation (type, size)
  2. Virus scanning (if configured)
  3. Thumbnail generation
  4. Multiple resolution versions

Content Moderation

Post Approval

When enabled, new posts go to a queue:

  1. User creates post → Status: pending
  2. Admin reviews in Activities section
  3. Admin approves/rejects
  4. User is notified (if configured)

Spam Detection

Built-in spam filter checks for:

  • Banned words/phrases
  • URL spam
  • Repetitive content
  • Known spam patterns

Configure in Settings → Moderation:

  • Enable Spam Filter
  • Banned Words list

User Reporting

Users can report inappropriate content:

  1. Click the "..." menu on any post
  2. Select "Report"
  3. Choose reason (spam, harassment, etc.)
  4. Submit report

Reports appear in Components → Sociable → Reports.

Auto-Hide Threshold

Configure automatic content hiding:

  • Posts hidden after X reports (default: 5)
  • Hidden posts reviewed by admin
  • Admin can restore or delete

Feed Algorithms

Feed Types

FeedContent Shown
HomePosts from connections + trending
ProfileUser's own posts
GroupPosts within a specific group
DiscoverTrending public content

Ordering

Activities are ordered by:

  • Creation date (newest first)
  • Activity (recent comments bump posts)
  • Relevance (engagement score)

Notifications

Activity events trigger notifications:

EventNotification
Reaction on postIn-app + email
Comment on postIn-app + email
Reply to commentIn-app + email
Post sharedIn-app
Mentioned in postIn-app + email

Configure notification preferences in Settings → Notifications.

Activity Feed Module

Display activities anywhere using mod_sociable_feed:

OptionDescription
LimitNumber of activities to show
Feed TypeAll, following only, or public only
Show AvatarDisplay author avatars
Show ReactionsShow reaction counts
Show Comments CountDisplay comment count
Cache TimeCache duration in seconds

SDK Integration

Developers can create and manage activities via the SDK:

$sociable = Sociable::getInstance();

// Get user's feed
$feed = $sociable->activities()->getFeed($userId, [
'limit' => 20,
'offset' => 0,
]);

// Create an activity
$activityId = $sociable->activities()->create([
'user_id' => $userId,
'content' => 'Hello world!',
'visibility' => 'public',
]);

// Add reaction
$sociable->activities()->addReaction($activityId, $userId, 'like');

// Add comment
$sociable->activities()->addComment($activityId, $userId, 'Great post!');

Third-Party Integration

Sociable can display activities from integrated extensions:

Activity Rules

Activity rules define how external content appears in the feed:

  1. Go to Components → Sociable → Activity Rules
  2. Click Scan Rules to discover new integrations
  3. Enable/disable individual rules
  4. Configure visibility and formatting

Creating Custom Rules

For developers integrating custom extensions:

  1. Create a JSON rules file in your extension
  2. Define the activity template and triggers
  3. Sociable will discover and import the rules

Best Practices

For Site Administrators

  • Monitor the feed - Regularly review reported content
  • Set clear guidelines - Publish community rules
  • Use moderation - Enable approval for new users if needed
  • Configure limits - Set appropriate upload sizes

For Performance

  • Enable caching - Use page caching for feeds
  • Limit media size - Smaller uploads = faster loading
  • Archive old content - Consider archiving very old posts

Next Steps