Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Falafel65/mavo-php
PHP adaptor for Mavo
https://github.com/Falafel65/mavo-php
Last synced: 3 months ago
JSON representation
PHP adaptor for Mavo
- Host: GitHub
- URL: https://github.com/Falafel65/mavo-php
- Owner: Falafel65
- License: gpl-3.0
- Created: 2017-07-09T15:07:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-27T09:26:08.000Z (over 1 year ago)
- Last Synced: 2024-07-21T04:48:10.544Z (4 months ago)
- Language: PHP
- Size: 49.8 KB
- Stars: 15
- Watchers: 4
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mavo-php
PHP adaptor for [Mavo](http://mavo.io/).Mavo read files. PHP can write files. So I made them work together.
PHP is used to manage login and write to files, as adapters should only do.
The main goal was to not use external data providers like Dropbox or Github, as great as they are, if you have access to your own server.
## Usage
To use it, you'll have to upload the php files, login.html and mavo-users.json to same directory as you Mavo app.PHP need to have write access to files and some folders (for uploads).
Set `mv-storage-type` to `php` and `mv-storage` to your favorite file path, as long as it's writable on the server.
_Rumours say that `mv-storage-type` is case insensitive. So go on, write `PHP` in all caps like a maniac._
## Users
In order to login and edit, you'll need to have users. The file which contain them is `mavo-users.json`.An user is defined by 3 things : a login, a password and a name.
To manage users, for now you'll have to manually edit the json file.
The password is a md5 hashed string, salted with `mavo-`.
If you want to change the salt, or use another method to store password, have a look into `login.php`, line 9## Example
A navbar in BootStrap 4 :
```
```
`data/menu.json` file :
```
{
"menus": [{
"title": "Entry 1",
"url": "file.html"
}, {
"title": "Entry 2",
"url": "file2.html"
}]
}
```## Disclaimer
As I'm a bit lazy, it's not 104% tested. But it my usage showed that it mostly works.Any feedbacks or bug reports are appreciated !
_(thanks to @stalcer for #6, @joyously for #7, @GalinhaLX for #12)_