Skip to content

tanghoong/phpchatblock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1e76653 Β· Aug 30, 2021

History

4 Commits
Aug 30, 2021
Aug 30, 2021
Aug 29, 2021
Aug 30, 2021
Aug 30, 2021
Aug 30, 2021
Aug 30, 2021
Aug 30, 2021
Aug 30, 2021
Aug 30, 2021
Aug 30, 2021

Repository files navigation

PHP Chat Block

A dialogue chat block display component for php project. A UI component for conversational novel community. Date: 30 Aug, 2021 Author: Tang Hoong

Screenshot

Description

Just dump the string format which exactly same as sample.txt then ChatBlock will render them into perfect and nice chat blocks.

How

Follow the format from sample.txt:

Snake: https://i.imgur.com/FEiFVeO.png
---
Narator: Once upon a time...
Snake: Wanna eat apple θ‹Ήζžœ 🍎🍎🍎?

then

include 'ChatBlock.php';
$lines = file_get_contents('./chapter.1.txt');
$cb = new ChatBlock($lines);
echo $cb->read();

become

Resources refer from:

Codepen IMessage css