-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
5,509 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 liyan. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,26 @@ | ||
# flarum-cravatar | ||
Cravatar for flarum | ||
# Cravatar | ||
|
||
A Cravatar Ext. for [Flarum](//flarum.org). | ||
|
||
Modified from [ianm/gravatar](https://discuss.flarum.org/d/27930-gravatar). | ||
|
||
### Installation | ||
|
||
Install with composer: | ||
|
||
```sh | ||
composer require liyanqwq/cravatar:"*" | ||
``` | ||
|
||
### Updating | ||
|
||
```sh | ||
composer update liyanqwq/cravatar:"*" | ||
php flarum migrate | ||
php flarum cache:clear | ||
``` | ||
|
||
### Links | ||
|
||
- [Packagist](https://packagist.org/packages/liyanqwq/cravatar) | ||
- [GitHub](https://github.com/liyanqwq/flarum-cravatar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "liyanqwq/flarum-cravatar", | ||
"description": "Add cravatar avatars to your forum", | ||
"keywords": [ | ||
"flarum", "cravatar" | ||
], | ||
"type": "flarum-extension", | ||
"license": "MIT", | ||
"support": { | ||
"source": "https://github.com/liyanqwq/flarum-cravatar" | ||
}, | ||
"require": { | ||
"php": "^7.4 || ^8.0", | ||
"flarum/core": "^1.0.3", | ||
"guzzlehttp/guzzle": "^7.0" | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "liyanqwq", | ||
"homepage": "https://liyan.moe", | ||
"role": "Developer" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"IanM\\Gravatar\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"flarum-extension": { | ||
"title": "Cravatar", | ||
"category": "feature", | ||
"icon": { | ||
"image": "resources/logo.svg", | ||
"backgroundColor": "#0072e3", | ||
"backgroundSize": "100%", | ||
"backgroundRepeat": "no-repeat", | ||
"backgroundPosition": "center" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of ianm/gravatar. | ||
* | ||
* Copyright (c) 2021 IanM. | ||
* | ||
* For the full copyright and license information, please view the LICENSE.md | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace IanM\Gravatar; | ||
|
||
use Flarum\Api\Serializer\BasicUserSerializer; | ||
use Flarum\Extend; | ||
use IanM\Gravatar\Provider\GravatarProvider; | ||
|
||
return [ | ||
(new Extend\Frontend('forum')) | ||
->js(__DIR__.'/js/dist/forum.js') | ||
->css(__DIR__.'/resources/less/forum.less'), | ||
|
||
(new Extend\Frontend('admin')) | ||
->js(__DIR__.'/js/dist/admin.js') | ||
->css(__DIR__.'/resources/less/admin.less'), | ||
|
||
(new Extend\Routes('api')) | ||
->remove('users.avatar.upload') | ||
->get( | ||
'/users/{id}/gravatar.jpg', | ||
'ianm.gravatar.image', | ||
Api\Controllers\GetGravatarImageController::class | ||
), | ||
|
||
new Extend\Locales(__DIR__.'/resources/locale'), | ||
|
||
(new Extend\ServiceProvider()) | ||
->register(GravatarProvider::class), | ||
|
||
(new Extend\ApiSerializer(BasicUserSerializer::class)) | ||
->attributes(Api\AddGravatar::class), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"printWidth": 150, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "es5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './src/admin'; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.