update README

This commit is contained in:
printempw 2016-02-02 21:36:31 +08:00
parent c6fd0b55a6
commit 844e67b4bc

View File

@ -8,12 +8,14 @@ Live demo is now unavailable because of my fault that typing in wrong path when
Features: Features:
----------- -----------
- Support latest [UniSkinAPI](https://github.com/RecursiveG/UniSkinServer/blob/master/doc/UniSkinAPI_zh-CN.md) - Support latest [UniSkinAPI](https://github.com/RecursiveG/UniSkinServer/blob/master/doc/UniSkinAPI_zh-CN.md)
- Also support legacy link style for UniSkinMod before 1.3 - Also support legacy link style for UniSkinMod before 1.3
- Nothing else... - Nothing else...
Installation: Installation:
----------- -----------
1. Configure your database information in config.php 1. Configure your database information in config.php
2. Run `./admin/install.php` 2. Run `./admin/install.php`
3. Configure your rewrite rules in your `nginx.conf` 3. Configure your rewrite rules in your `nginx.conf`
@ -24,26 +26,31 @@ Installation:
Server configure: Server configure:
------------ ------------
Add rewrite rules to your nginx.conf: Add rewrite rules to your nginx.conf:
``` ```
if (!-e $request_filename) { if (!-e $request_filename) {
rewrite ^/([^/]*).json$ /index.php?action=get&type=json&uname=$1 last; rewrite ^/([^/]*).json$ /get.php?type=json&uname=$1 last;
rewrite ^/skin/([^/]*).png$ /index.php?action=get&type=skin&uname=$1 last; rewrite ^/skin/([^/]*).png$ /get.php?type=skin&uname=$1 last;
rewrite ^/cape/([^/]*).png$ /index.php?action=get&type=cape&uname=$1 last; rewrite ^/cape/([^/]*).png$ /get.php?type=cape&uname=$1 last;
break; break;
} }
``` ```
Well, I need more time to add a fancy route instead of these shit :( Well, I need more time to add a fancy route instead of these shit :(
Now you can access `/path/to/root/username.json` to get your json profile. After uploading skins, you can also access `/path/to/root/skin/username.png` for skin image or `/path/to/root/cape/username.png` for cape. Now you can access `/path/to/root/username.json` to get your json profile. After uploading skins, you can also access `/path/to/root/skin/username.png` for skin image or `/path/to/root/cape/username.png` for cape.
Client configure: Client configure:
------------ ------------
#### For UniSkinMod version >= 1.3 #### For UniSkinMod version >= 1.3
Put your root directory of skin server( like `/path/to/root` above ) into your `/config/UniSkinMod.cfg` of Minecraft client Put your root directory of skin server( like `/path/to/root` above ) into your `/config/UniSkinMod.cfg` of Minecraft client
Sample: Sample:
``` ```
# Line starts with '#' is a commit line # Line starts with '#' is a commit line
# Line starts with 'Root: ' indicates a server # Line starts with 'Root: ' indicates a server
@ -63,6 +70,7 @@ Root: http://fuck.io/path/to/root
Also put your url into `/config/UniSkinMod.cfg`, but you need to fill 2 urls for skin and cape Also put your url into `/config/UniSkinMod.cfg`, but you need to fill 2 urls for skin and cape
Sample: Sample:
``` ```
Version: 1 Version: 1
# Do not edit the line above # Do not edit the line above
@ -76,11 +84,13 @@ Cape: http://fuck.io/path/to/root/cape/%s.png
FAQ FAQ
------------ ------------
If everything works well, you will get an awesome skin in game: If everything works well, you will get an awesome skin in game:
![screenshot2](https://img.prinzeugen.net/image.php?di=EV1E) ![screenshot2](https://img.prinzeugen.net/image.php?di=EV1E)
And the log will be like this: And the log will be like this:
``` ```
[16:23:56] [launcher/INFO] [UniSkinMod]: Loading configuration ... @D:\Minecraft\1.8\.minecraft\config\UniSkinMod.cfg [16:23:56] [launcher/INFO] [UniSkinMod]: Loading configuration ... @D:\Minecraft\1.8\.minecraft\config\UniSkinMod.cfg
[16:23:56] [launcher/INFO] [UniSkinMod]: Root Url Added: http://127.0.0.1/blessing-skin-server [16:23:56] [launcher/INFO] [UniSkinMod]: Root Url Added: http://127.0.0.1/blessing-skin-server
@ -90,4 +100,5 @@ And the log will be like this:
[16:24:23] [Client thread/INFO] [UniSkinMod]: Player Skin Selected: 621sama default 3f14a21723023642b9e8d2bc008b443780698aaedbb7d4e29960e8a2c754a771 [16:24:23] [Client thread/INFO] [UniSkinMod]: Player Skin Selected: 621sama default 3f14a21723023642b9e8d2bc008b443780698aaedbb7d4e29960e8a2c754a771
[16:24:23] [Client thread/INFO] [UniSkinMod]: Player Cape Selected: 621sama aed8c3fc67aae4906b72fa74c27e15866c89752f0838f6b2a1c44bb4d59cec1e [16:24:23] [Client thread/INFO] [UniSkinMod]: Player Cape Selected: 621sama aed8c3fc67aae4906b72fa74c27e15866c89752f0838f6b2a1c44bb4d59cec1e
``` ```
If not, please check your log to locate where error occured. If not, please check your log to locate where error occured.