Forums

The great place to discuss topics with other users

Sngine concept: Beyond the Feed: Modular Widget Layouts for Sngine Communities

'
Join the Conversation Post Reply
Zohra Boelhouwers
Member
Joined: 2026-01-29 10:03:15
2026-02-09 18:54:50

Infographic illustrating an Oxwall-style modular widget system for Sngine. On the left is a 'Widget Toolbox' containing draggable widget blocks: About Me (blue), Spotify Playlist (green), Photo Gallery (green/purple), and Custom Text (purple). On the right is a mockup of a profile page in edit mode, showing these widgets already placed in the sidebar and main content area — including an About Me section, embedded Spotify player, photo gallery grid, and custom text block. Arrows and labels demonstrate dragging widgets from the toolbox to the page layout. Title at the top reads 'Oxwall-Style Modular Widget System

Oxwall-Style Modular Widget System for Sngine

Concept Proposal – Update-safe, scalable, and mobile-ready


Background & Rationale

Oxwall natively includes a modular widget system for profiles, groups, and dashboards. Users and admins can freely add, remove, and reorder widgets (such as SAFE html boxes, SAFE css codes, rss feeds, photogalleries, calendar, weather widgets etc ) , creating personalized pages that go beyond a fixed feed layout.

Sngine is a modern platform but currently lacks user-level page customization beyond its feed-driven structure. Adding an Oxwall-style widget layer would give creators, communities, and groups more control, increasing engagement and platform differentiation.

This concept is developed by ChatGPT and builds on Oxwall’s strengths while addressing Sngine-specific constraints and modern security, scalability, and UX requirements.


Concept Overview

  • Data-driven widget system layered on top of Sngine core
  • Profiles and groups can dynamically add, configure, and arrange widgets
  • Update-safe: no core modifications, uses template hooks and includes
  • Mobile-ready design and fallback logic for empty zones
  • Scalable caching for high-volume deployments

Architecture & Technical Design

1. Widget Data Model

widgets – widget definitions

id
key_name
title
description
render_handler    -- PHP class or function
settings_schema   -- JSON
css (optional)
js (optional)
dependencies      -- array of required plugins/data
active

widget_instances – placements

id
widget_id
entity_type (user | group | page)
entity_id
zone
position
settings (JSON)
enabled
last_updated
Principle: separation of widget definition and instance ensures scalability, update-safety, and avoids duplication.

2. Zones & Template Hooks

  • Zones are placeholders in templates (e.g., profile_sidebar, group_main_top)
  • Smarty includes are used but abstracted via a WidgetRenderer layer for future-proofing

Example Smarty include:

{include file='widgets/zone.tpl'
 zone='profile_sidebar'
 entity_type='user'
 entity_id=$user.user_id}
---

3. Rendering Flow

  1. Zone is requested
  2. Widget instances fetched for entity and zone
  3. Dependencies are checked; missing dependencies skip the widget with admin notice
  4. Instances sorted by position
  5. Each widget rendered via its PHP handler
  6. CSS and JS injected conditionally
WidgetManager::renderZone('profile_sidebar', 'user', $user_id);
---

4. Render Handlers

class HtmlBlockWidget {
    public function render($settings, $context) {
        return $settings['html'];
    }
}
- Context includes user/group data and viewer permissions - All widgets must sanitize output (HTMLPurifier or equivalent) - No raw PHP/JS execution for user-defined widgets ---

5. Widget Settings & Security

  • Settings defined in JSON schema
  • User-configurable but safe: no raw code execution
  • Phase 3 “creator-built widgets” use a restricted DSL or pre-approved templates
{
  "html": {
    "type": "textarea",
    "label": "Custom HTML",
    "required": true
  }
}
---

6. Mobile UX & Drag-and-Drop

  • Desktop: drag-and-drop supported
  • Mobile: use “Add widget → Select zone → Choose position” flow
  • Touch-friendly interface ensures 60%+ mobile user base is supported
---

7. Fallbacks for Empty Zones

  • If no widgets exist, default Sngine content renders
  • Admin can override default content per zone
---

8. Caching & Performance

  • Widget queries cached per entity and zone
  • Use Redis or Memcached for high-volume platforms
  • Cache invalidated on widget update, reorder, or enable/disable
---

9. Rollout Strategy

Phase 1 (MVP)

  • Groups only
  • Single widget type: HTML Block
  • No schema UI, no marketplace
  • Focus: validate concept and core rendering flow

Phase 2

  • Profile widgets
  • Drag & drop support
  • Schema-driven settings for multiple widget types

Phase 3

  • Advanced creator-built widgets using restricted DSL/templates
  • Optional widget marketplace
---

10. TL;DR for Developers

Build a modular widget engine on top of Sngine rather than inside it.
Ensure update-safety, caching, mobile UX, dependency checks, and secure widget configuration.
Rollout gradually: MVP in groups, then profiles, then advanced creators.
This concept draws inspiration from Oxwall but modernizes it for Sngine.
Jane Marcia
Admin
Joined: 2025-05-17 02:14:16
2026-02-09 20:11:43

Hey! I emailed Zamblek this morning to suggest this. 

Before this post. We are connected? 

Look at the email time 

Zohra Boelhouwers
Member
Joined: 2026-01-29 10:03:15
2026-02-09 20:15:13

Awesome 🀩 

 

I hope he likes it 😏

Yeah we must be connected 😏 collective mind 🀣🀣🀣

Was your concept idea the same?

Jane Marcia
Admin
Joined: 2025-05-17 02:14:16
2026-02-09 23:35:11

I as not as expecific like you did for I am not as good as expressing myself. I suggested to break the theme into parts just like you did. 

Zohra Boelhouwers
Member
Joined: 2026-01-29 10:03:15
2026-02-18 07:41:48

Send him this thread please. I talked about my idea to Chatgpt and Chatgpt worked out the concept this way. I could've never have written it this way myself 🀣