| admin | ||
| funnies-frame.php | ||
| index.php | ||
| README.md | ||
🧠 MentalNet Funnies
A lightweight PHP + SQLite web app for hosting MentalNet Original comic strips. Built for simplicity, security, and self-hosting — no external dependencies, just pure PHP, HTML, and CSS.
🚀 Overview
MentalNet Funnies is a micro-comic CMS that serves as the home for Debian Osaka, Tux, Miku, and other MentalNet.xyz comics. It’s designed for local hosting on Apache + PHP setups and includes a tiny password-protected admin panel for uploads.
✨ Features
- 🖼 Upload, title, and describe new comics via a web form
- 💾 SQLite database — no external DB needed
- 🔐 Password-protected admin area
- 📱 Mobile-friendly front page (
index.php) - 🪶 Compact iframe version (
funnies-frame.php) for embedding - ⚙️ One-click database initializer (
init_db.php)
📁 Directory Structure
/var/www/html/funnies/
├── index.php # Main public comic viewer
├── funnies-frame.php # Small-width iframe-friendly viewer
├── uploads/ # Comic image storage
├── mentalnet_funnies.db # SQLite database file
├── admin/
│ ├── auth.php # Login handler
│ ├── config.php # Config & DB setup
│ ├── upload.php # Upload interface
│ ├── init_db.php # Manual DB table initializer
└── README.md # This file
⚙️ Installation
-
Create directory & set permissions
sudo mkdir -p /var/www/html/funnies/uploads sudo chown -R www-data:www-data /var/www/html/funnies sudo chmod -R 755 /var/www/html/funnies -
Set up the admin password Generate a bcrypt hash:
php -r 'echo password_hash("YourStrongPassword", PASSWORD_DEFAULT), PHP_EOL;'Then place that hash inside
admin/config.phpunder:$ADMIN_PASS_HASH = '$2y$10$replace_with_real_hash'; -
Initialize the database Visit:
https://yourdomain.com/funnies/admin/init_db.phpOr run the init script via command-line:php init_db.phpIt will create thecomicstable or confirm if it already exists. -
Upload a comic Visit:
https://yourdomain.com/funnies/admin/auth.phpLog in and use the form to upload images and descriptions. -
View your comics
- Main gallery:
https://yourdomain.com/funnies/ - Iframe feed:
https://yourdomain.com/funnies/funnies-frame.php
- Main gallery:
🪄 Embedding the Funnies Frame
The iframe viewer (funnies-frame.php) is optimized for small layouts (≈ 325 px).
Example embed:
<iframe src="https://mentalnet.xyz/funnies/funnies-frame.php"
width="325"
height="500"
frameborder="0"
scrolling="yes"
style="border-radius:8px;overflow:hidden;">
</iframe>
💡 You can adjust image width inside
funnies-frame.php(default: 250 px for compact display).
🛡 Security Notes
- Only the admin section (
/admin/) requires authentication. - Use strong passwords and HTTPS.
- The upload form restricts to images only.
- SQLite DB and uploads folder should be owned by
www-datawith 755 perms.
🧩 Customization Ideas
- Add a “View All Comics →” link inside the iframe version.
- Include navigation buttons (Next / Previous comic).
- Implement tags or short titles for categorization.
- Add a JSON API endpoint for future integration with other MentalNet services.
🧰 License
MIT License — free to modify and self-host. Created by MarkMental as part of the mentalnet.xyz web ecosystem.
“In the MentalNet, Tux is root — and Miku too.” 🐧🎤