News Portal v1.0

Documentation

Introduction

News Portal is a high-performance News Management System built with Core PHP 8.x, Alpine JS and Tailwind CSS 4.0. This system is designed for speed and simplicity, to ensure the lowest possible server response time.

Server Requirements

To run the portal smoothly, ensure your server matches these specifications:

  • PHP: Version 7.4 or higher (8.1+ Recommended)
  • Database: MySQL 5.7+ or MariaDB 10.3+
  • Extensions: PDO, OpenSSL, mbstring, cURL, GD Library
  • Permissions: config/ and uploads/ must be Writable (755)
  • Server: Apache with mod_rewrite enabled

Step-by-Step Setup

We've included a professional web-installer. No manual SQL imports are required.

1. Upload Files

Extract the source code zip file and upload everything to your public_html or a subfolder via File Manager/FTP.

2. Run Setup

Visit yourdomain.com/install in your browser. Follow the 3-step wizard to connect your database and create your Super Admin account.

3. Post-Installation

Once the "Success" screen appears, immediately delete the /install folder from your server for security.

Logo & Branding

Configure your site's visual identity from the centralized settings panel.

Upload Instructions

  • Go to Admin > System Settings > Media Tab.
  • Main Logo: Recommended size 250x60px (Transparent PNG).
  • Favicon: Recommended size 32x32px (.ico or .png).
  • Settings are saved with timestamped filenames to prevent browser caching issues.

Email (SMTP) Setup

SMTP is required for sending newsletters, contact form responses, and system alerts.

Navigate to Settings > SMTP Tab and enter your provider details:

Host: smtp.yourprovider.com
Port: 587 (TLS) or 465 (SSL)
User: your@email.com
Password: your_app_password

Required for the newsletter batch-sender to function.

Article Publishing

The system uses the Jodit Rich Text Editor for a modern experience.

Advanced Editor Features

  • Auto-Slug: Permalinks are generated automatically as you type the title.
  • Images: Supports direct Drag & Drop.
  • SEO Metabox: Custom Meta Titles and Descriptions for every post.
  • Status: Save as Draft to keep private or Published to go live.

Homepage Curator

A visual slot-based system to manage featured content on the homepage.

  • Hero Spotlight: Assign the top 3 major stories for the big cards.
  • Top Picks Slider: Assign up to 10 articles for the auto-scrolling horizontal slider.
  • Manual Selection: Click a slot > Search by Keyword or Category > Select.
  • This system uses site_sections table to prevent duplicate news appearing in the "Recent Stories" feed.

Ad Management

Monetize your portal with built-in ad placement slots.

Placement Locations

Supports Header Top, Sidebar Top/Bottom, Article Mid-Content, and Footer.

  • Type 1: Image Ad: Upload a JPG/PNG and provide a destination URL.
  • Type 2: Code Ad: Paste your Google AdSense or script-based ad code directly.
  • Each ad can be toggled Active/Inactive instantly from the manager.

Newsletter System

A production-ready mailing system with batch sending logic.

  • Double Opt-in: Users must click a verification link in their email to join.
  • Batch Sending: Sends emails in chunks (e.g., 20 at a time) using AJAX to prevent server timeout.
  • Visual Composer: Compose newsletters using the same rich-text editor used for posts.
  • Export: Download your subscriber list as a CSV file anytime.

Static Pages

Manage legal and informational pages (About Us, Privacy Policy, Terms).

These pages are stored in the pages table. Editing them in the Admin Panel updates the content globally across the frontend using the prose typography standard.

Clean URLs (.htaccess)

The system automatically generates an .htaccess file during installation.

Structure:
- Article: /article/news-headline-slug
- Category: /category/politics
- Search: /search/keyword

Ensure AllowOverride All is enabled in your Apache virtual host configuration.

Maintenance Mode

Disable the public site for updates while keeping the Admin Panel accessible.

Toggle Maintenance Mode in Settings > General. Visitors will see a professional "Under Maintenance" screen while you can continue working in the backend.

Troubleshooting

404 Error on Inner Pages?

Make sure the .htaccess file is present in the root folder and Apache mod_rewrite is active.

Login Fails with "Unauthorized"?

Ensure your user role in the users table is set to 'admin'.

Images Not Uploading?

Check if the uploads/ folder has permission 755. Also check PHP upload_max_filesize in php.ini.