Skip to content

AvaLovelace1/mini-php-webcomic

Repository files navigation

mini-php-webcomic

Comic page screenshotArchive page screenshot

mini-php-webcomic is a minimal, responsive webcomic template built with PHP and MariaDB. It was created for my comic, Academy 118.

Not into PHP? Try mini-hugo-webcomic!

Installation

Make sure you have the latest version of PHP installed. Then, clone this repository:

git clone https://github.com/AvaLovelace1/mini-php-webcomic.git

Place the repository contents into the root directory of your web server.

Database setup

mini-php-webcomic stores comics in an SQL database. I recommend using MariaDB for database management.

After installing MariaDB, start the MariaDB server. Then, enter the MariaDB shell by running:

mysql

Create a new database for the webcomic by running the following command in the MariaDB shell:

CREATE DATABASE miniwebcomic;

Then, create a new user with your desired username and password, and grant it all privileges on the database:

CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON miniwebcomic.* TO 'username'@'localhost';

Import the initial database schema by running the following command in the command line:

mysql -u [username] -p miniwebcomic < miniwebcomic.sql

Finally, change the username and password fields in the file php/database.php to your MariaDB username and password.

Usage

Site customization

This template’s layout and styling are intentionally kept bare-bones to allow for easy customization. You can modify the site to your heart’s content by editing the .php and css/style.css files.

Adding new comics

Comics are organized into episodes. Each episode contains one or more comic pages.

Add new comic pages and episodes by INSERTing rows into the comics and episodes tables in the miniwebcomic database, respectively. Comics will auto-publish based on the given publish_date.

Comic image files should be stored in the img/comic directory. Image filenames follow the format [filename]_[pageNumber].[extension]. The pageNumber must be padded with leading zeros to a length of 3.

About

A minimal, responsive webcomic template built with PHP and MariaDB.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •