Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pedra/php-little-messenger
https://github.com/pedra/php-little-messenger
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pedra/php-little-messenger
- Owner: pedra
- Created: 2024-04-11T02:20:18.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-18T06:04:33.000Z (10 months ago)
- Last Synced: 2024-11-27T23:12:00.760Z (3 months ago)
- Language: PHP
- Size: 29.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP Little Messenger - PLM
Script PHP minimalista para um painel de recados (mural) para ser usado em qualquer site.
## TODO
- [x] Iniciar com algo bem básico e testar;
- [ ] Transformar em API JSON;
- [ ] Permitir texto com formatação (\*bold*, \_italic_, -strikethrough-);
- [ ] Permitir anexar arquivo (imagem, pdf, etc) com restrição de tamanho;
- [ ] Admin com "ping" automático no navegador (setTimeout|tick);
- [ ] Manter a simplicidade extrema para facilitar a instalação em qualquer serviço de **'back'** da internet.
## Banco de Dados (MySql)
```sql
-- USERS
CREATE TABLE `users` (
`user_id` bigint(20) NOT NULL,
`user_name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;ALTER TABLE `users`
ADD PRIMARY KEY (`user_id`);ALTER TABLE `users`
MODIFY `user_id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;INSERT INTO `users` (`user_id`, `user_name`) VALUES
(1, 'Joe Doe'),
(2, 'Jon Doe'),
(3, 'Joy Doe');-- MESSAGES
CREATE TABLE `messages` (
`user_from` bigint(20) NOT NULL,
`user_to` bigint(20) NOT NULL,
`date_send` datetime NOT NULL DEFAULT current_timestamp(),
`date_read` datetime DEFAULT NULL,
`message` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;ALTER TABLE `messages`
ADD PRIMARY KEY (`user_from`, `user_to`, `date_send`),
ADD KEY `date_read` (`date_read`);
```