Skip to content
This repository has been archived by the owner on Nov 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #78 from kj415j45/patch-2.5
Browse files Browse the repository at this point in the history
Patch 2.5
  • Loading branch information
kj415j45 authored Jul 26, 2018
2 parents 5ce3812 + d6b550e commit c67539a
Show file tree
Hide file tree
Showing 272 changed files with 130 additions and 19 deletions.
2 changes: 1 addition & 1 deletion module/help/osu.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$msg=<<<EOT
osu! 系列命令
用法:
!osu.{bind|bp|listen|me|recent} [参数列表]
!osu.{bind|bp|listen|me|recent|setMode} [参数列表]
具体用法请查看下一级 help
EOT;
Expand Down
7 changes: 6 additions & 1 deletion module/help/osu/me.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
$msg=<<<EOT
展示你的 osu! 个人资料
用法:
!osu.me
!osu.me [...]
参数列表:
-user "用 户 名" 查看别人的资料
-{std|mania|ctb|taiko} 指定模式
-withMe 同时显示 me! 的内容(实验性功能)
EOT;

$Queue[]= sendBack($msg);
Expand Down
2 changes: 1 addition & 1 deletion module/help/pixiv.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$msg=<<<EOT
Pixiv !
用法:
!pixiv.search
!pixiv.{search|IID}
具体用法请查看下一级 help
EOT;
Expand Down
Binary file added module/osu/Exo2-Bold.ttf
Binary file not shown.
Binary file added module/osu/Exo2-Italic.ttf
Binary file not shown.
Binary file added module/osu/Exo2-Regular.ttf
Binary file not shown.
Binary file added module/osu/Yahei.ttf
Binary file not shown.
Binary file added module/osu/flags/A1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/A2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AF.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AQ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AU.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AW.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AX.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/AZ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/BA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/BB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/BD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/BE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/BF.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added module/osu/flags/BG.png
Binary file added module/osu/flags/BH.png
Binary file added module/osu/flags/BI.png
Binary file added module/osu/flags/BJ.png
Binary file added module/osu/flags/BL.png
Binary file added module/osu/flags/BM.png
Binary file added module/osu/flags/BN.png
Binary file added module/osu/flags/BO.png
Binary file added module/osu/flags/BR.png
Binary file added module/osu/flags/BS.png
Binary file added module/osu/flags/BT.png
Binary file added module/osu/flags/BV.png
Binary file added module/osu/flags/BW.png
Binary file added module/osu/flags/BY.png
Binary file added module/osu/flags/BZ.png
Binary file added module/osu/flags/CA.png
Binary file added module/osu/flags/CC.png
Binary file added module/osu/flags/CD.png
Binary file added module/osu/flags/CF.png
Binary file added module/osu/flags/CG.png
Binary file added module/osu/flags/CH.png
Binary file added module/osu/flags/CI.png
Binary file added module/osu/flags/CK.png
Binary file added module/osu/flags/CL.png
Binary file added module/osu/flags/CM.png
Binary file added module/osu/flags/CN.png
Binary file added module/osu/flags/CO.png
Binary file added module/osu/flags/CR.png
Binary file added module/osu/flags/CU.png
Binary file added module/osu/flags/CV.png
Binary file added module/osu/flags/CX.png
Binary file added module/osu/flags/CY.png
Binary file added module/osu/flags/CZ.png
Binary file added module/osu/flags/DE.png
Binary file added module/osu/flags/DJ.png
Binary file added module/osu/flags/DK.png
Binary file added module/osu/flags/DM.png
Binary file added module/osu/flags/DO.png
Binary file added module/osu/flags/DZ.png
Binary file added module/osu/flags/EC.png
Binary file added module/osu/flags/EE.png
Binary file added module/osu/flags/EG.png
Binary file added module/osu/flags/EH.png
Binary file added module/osu/flags/ER.png
Binary file added module/osu/flags/ES.png
Binary file added module/osu/flags/ET.png
Binary file added module/osu/flags/EU.png
Binary file added module/osu/flags/FI.png
Binary file added module/osu/flags/FJ.png
Binary file added module/osu/flags/FK.png
Binary file added module/osu/flags/FM.png
Binary file added module/osu/flags/FO.png
Binary file added module/osu/flags/FR.png
Binary file added module/osu/flags/FX.png
Binary file added module/osu/flags/GA.png
Binary file added module/osu/flags/GB.png
Binary file added module/osu/flags/GD.png
Binary file added module/osu/flags/GE.png
Binary file added module/osu/flags/GF.png
Binary file added module/osu/flags/GG.png
Binary file added module/osu/flags/GH.png
Binary file added module/osu/flags/GI.png
Binary file added module/osu/flags/GL.png
Binary file added module/osu/flags/GM.png
Binary file added module/osu/flags/GN.png
Binary file added module/osu/flags/GP.png
Binary file added module/osu/flags/GQ.png
Binary file added module/osu/flags/GR.png
Binary file added module/osu/flags/GS.png
Binary file added module/osu/flags/GT.png
Binary file added module/osu/flags/GU.png
Binary file added module/osu/flags/GW.png
Binary file added module/osu/flags/GY.png
Binary file added module/osu/flags/HK.png
Binary file added module/osu/flags/HM.png
Binary file added module/osu/flags/HN.png
Binary file added module/osu/flags/HR.png
Binary file added module/osu/flags/HT.png
Binary file added module/osu/flags/HU.png
Binary file added module/osu/flags/ID.png
Binary file added module/osu/flags/IE.png
Binary file added module/osu/flags/IL.png
Binary file added module/osu/flags/IM.png
Binary file added module/osu/flags/IN.png
Binary file added module/osu/flags/IO.png
Binary file added module/osu/flags/IQ.png
Binary file added module/osu/flags/IR.png
Binary file added module/osu/flags/IS.png
Binary file added module/osu/flags/IT.png
Binary file added module/osu/flags/JE.png
Binary file added module/osu/flags/JM.png
Binary file added module/osu/flags/JO.png
Binary file added module/osu/flags/JP.png
Binary file added module/osu/flags/KE.png
Binary file added module/osu/flags/KG.png
Binary file added module/osu/flags/KH.png
Binary file added module/osu/flags/KI.png
Binary file added module/osu/flags/KM.png
Binary file added module/osu/flags/KN.png
Binary file added module/osu/flags/KP.png
Binary file added module/osu/flags/KR.png
Binary file added module/osu/flags/KW.png
Binary file added module/osu/flags/KY.png
Binary file added module/osu/flags/KZ.png
Binary file added module/osu/flags/LA.png
Binary file added module/osu/flags/LB.png
Binary file added module/osu/flags/LC.png
Binary file added module/osu/flags/LI.png
Binary file added module/osu/flags/LK.png
Binary file added module/osu/flags/LR.png
Binary file added module/osu/flags/LS.png
Binary file added module/osu/flags/LT.png
Binary file added module/osu/flags/LU.png
Binary file added module/osu/flags/LV.png
Binary file added module/osu/flags/LY.png
Binary file added module/osu/flags/MA.png
Binary file added module/osu/flags/MC.png
Binary file added module/osu/flags/MD.png
Binary file added module/osu/flags/ME.png
Binary file added module/osu/flags/MF.png
Binary file added module/osu/flags/MG.png
Binary file added module/osu/flags/MH.png
Binary file added module/osu/flags/MK.png
Binary file added module/osu/flags/ML.png
Binary file added module/osu/flags/MM.png
Binary file added module/osu/flags/MN.png
Binary file added module/osu/flags/MO.png
Binary file added module/osu/flags/MP.png
Binary file added module/osu/flags/MQ.png
Binary file added module/osu/flags/MR.png
Binary file added module/osu/flags/MS.png
Binary file added module/osu/flags/MT.png
Binary file added module/osu/flags/MU.png
Binary file added module/osu/flags/MV.png
Binary file added module/osu/flags/MW.png
Binary file added module/osu/flags/MX.png
Binary file added module/osu/flags/MY.png
Binary file added module/osu/flags/MZ.png
Binary file added module/osu/flags/NA.png
Binary file added module/osu/flags/NC.png
Binary file added module/osu/flags/NE.png
Binary file added module/osu/flags/NF.png
Binary file added module/osu/flags/NG.png
Binary file added module/osu/flags/NI.png
Binary file added module/osu/flags/NL.png
Binary file added module/osu/flags/NO.png
Binary file added module/osu/flags/NP.png
Binary file added module/osu/flags/NR.png
Binary file added module/osu/flags/NU.png
Binary file added module/osu/flags/NZ.png
Binary file added module/osu/flags/O1.png
Binary file added module/osu/flags/OM.png
Binary file added module/osu/flags/PA.png
Binary file added module/osu/flags/PE.png
Binary file added module/osu/flags/PF.png
Binary file added module/osu/flags/PG.png
Binary file added module/osu/flags/PH.png
Binary file added module/osu/flags/PK.png
Binary file added module/osu/flags/PL.png
Binary file added module/osu/flags/PM.png
Binary file added module/osu/flags/PN.png
Binary file added module/osu/flags/PR.png
Binary file added module/osu/flags/PS.png
Binary file added module/osu/flags/PT.png
Binary file added module/osu/flags/PW.png
Binary file added module/osu/flags/PY.png
Binary file added module/osu/flags/QA.png
Binary file added module/osu/flags/RE.png
Binary file added module/osu/flags/RO.png
Binary file added module/osu/flags/RS.png
Binary file added module/osu/flags/RU.png
Binary file added module/osu/flags/RW.png
Binary file added module/osu/flags/SA.png
Binary file added module/osu/flags/SB.png
Binary file added module/osu/flags/SC.png
Binary file added module/osu/flags/SD.png
Binary file added module/osu/flags/SE.png
Binary file added module/osu/flags/SG.png
Binary file added module/osu/flags/SH.png
Binary file added module/osu/flags/SI.png
Binary file added module/osu/flags/SJ.png
Binary file added module/osu/flags/SK.png
Binary file added module/osu/flags/SL.png
Binary file added module/osu/flags/SM.png
Binary file added module/osu/flags/SN.png
Binary file added module/osu/flags/SO.png
Binary file added module/osu/flags/SR.png
Binary file added module/osu/flags/SS.png
Binary file added module/osu/flags/ST.png
Binary file added module/osu/flags/SV.png
Binary file added module/osu/flags/SY.png
Binary file added module/osu/flags/SZ.png
Binary file added module/osu/flags/TC.png
Binary file added module/osu/flags/TD.png
Binary file added module/osu/flags/TF.png
Binary file added module/osu/flags/TG.png
Binary file added module/osu/flags/TH.png
Binary file added module/osu/flags/TJ.png
Binary file added module/osu/flags/TK.png
Binary file added module/osu/flags/TL.png
Binary file added module/osu/flags/TM.png
Binary file added module/osu/flags/TN.png
Binary file added module/osu/flags/TO.png
Binary file added module/osu/flags/TR.png
Binary file added module/osu/flags/TT.png
Binary file added module/osu/flags/TV.png
Binary file added module/osu/flags/TW.png
Binary file added module/osu/flags/TZ.png
Binary file added module/osu/flags/UA.png
Binary file added module/osu/flags/UG.png
Binary file added module/osu/flags/UM.png
Binary file added module/osu/flags/US.png
Binary file added module/osu/flags/UY.png
Binary file added module/osu/flags/UZ.png
Binary file added module/osu/flags/VA.png
Binary file added module/osu/flags/VC.png
Binary file added module/osu/flags/VE.png
Binary file added module/osu/flags/VG.png
Binary file added module/osu/flags/VI.png
Binary file added module/osu/flags/VN.png
Binary file added module/osu/flags/VU.png
Binary file added module/osu/flags/WF.png
Binary file added module/osu/flags/WS.png
Binary file added module/osu/flags/XK.png
Binary file added module/osu/flags/XX.png
Binary file added module/osu/flags/YE.png
Binary file added module/osu/flags/YT.png
Binary file added module/osu/flags/ZA.png
Binary file added module/osu/flags/ZM.png
Binary file added module/osu/flags/ZW.png
Binary file added module/osu/flags/__.png
Binary file added module/osu/heart.png
Binary file added module/osu/levelbadge.png
122 changes: 112 additions & 10 deletions module/osu/me.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,46 @@

Image::configure(array('driver' => 'imagick'));

$osuid = getOsuID($Event['user_id']);
$withMeText = false;

do{
$arg = nextArg();
switch($arg){
case '-withMe':
$withMeText = true;
break;
case '-osu':
case '-std':
$mode = 'osu';
break;
case '-taiko':
$mode = 'taiko';
break;
case '-ctb':
case '-fruit':
case '-fruits':
$mode = 'fruits';
break;
case '-mania':
$mode = 'mania';
break;
case '-user':
$osuid = nextArg();
break;
default:

}
}while($arg !== NULL);

$osuid = $osuid??getOsuID($Event['user_id']);

if($osuid == ''){
throw new \Exception('未绑定 osu!');
}else{
$osuid = urlencode($osuid);
}

$osuid = OsuUsernameEscape($osuid);

$web = file_get_contents('https://osu.ppy.sh/users/'.$osuid);
$web = file_get_contents('https://osu.ppy.sh/users/'.$osuid.'/'.$mode);

$target = '<script id="json-user" type="application/json">';

Expand All @@ -25,14 +55,86 @@

$userJson = substr($web, $start+strlen($target), $end-strlen($target));

$user = json_decode($userJson, true);

$img = Image::make($user['cover_url']);


$user = json_decode($userJson);

//初始化绘图环境
$here = __DIR__.'/';
$exo2 = $here.'Exo2-Regular.ttf';
$exo2_italic = $here.'Exo2-Italic.ttf';
$exo2_bold = $here.'Exo2-Bold.ttf';
$yahei = $here.'Yahei.ttf';
$white = '#ffffff';
$mode = $mode??$user->playmode;
$badges = $user->badges;
$badge = $badges[rand(0, count($badges)-1)];
$flag = file_exists($here."flags/{$user->country->code}.png")?($here."flags/{$user->country->code}.png"):($here.'flags/__.png');
$stats_key = imageFont($yahei, 12, $white);
$statics = $user->statistics;
$playtime = [
'hours' => sprintf('%d', $statics->play_time/3600),
'minutes' => sprintf('%d', ($statics->play_time%3600)/60),
'seconds' => sprintf('%d', $statics->play_time%60),
];
$stat = [
'Ranked 谱面总分' => number_format($statics->ranked_score),
'准确率' => sprintf('%.2f%%', $statics->hit_accuracy),
'游戏次数' => number_format($statics->play_count),
'总分' => number_format($statics->total_score),
'总命中次数' => number_format($statics->total_hits),
'最大连击' => number_format($statics->maximum_combo),
'回放被观看次数' => number_format($statics->replays_watched_by_others),
];
$grade = [
'XH' => $statics->grade_counts->ssh,
'X' => $statics->grade_counts->ss,
'SH' => $statics->grade_counts->sh,
'S' => $statics->grade_counts->s,
'A' => $statics->grade_counts->a,
];
//开始绘图
$img = Image::make($user->cover_url);
$img->resize(1000, 350)
->insert(Image::canvas(1000, 350)->fill([0, 0, 0, 0.5])) //背景暗化50%
->insert(Image::make('https://a.ppy.sh/'.$user->id)->resize(110, 110), 'top-left', 40, 220) //插入头像
->text($user->username, 170, 256, imageFont($exo2_italic, 24, $white, 'left', 'top')) //插入用户名
;
if($badge!=NULL)$img->insert(Image::make($badge->image_url), 'top-left', 40, 168); //插入狗牌
if($user->is_supporter){
$img->insert(Image::make($here.'heart.png')->resize(28, 28), 'top-left', 170, 223) //插入支持者标志
->insert(Image::make($here."modes/{$mode}.png")->resize(28, 28), 'top-left', 210, 223) //插入模式标志
;
}else{
$img->insert(Image::make($here."modes/{$mode}.png")->resize(28, 28), 'top-left', 170, 223); //插入模式标志
}
$img->insert(Image::make($flag)->resize(30, 20), 'top-left', 170, 310) //插入国旗
->insert(Image::canvas(280, 323)->fill([0, 0, 0, 0.3]), 'top-left', 670, 27) //绘制右侧暗化
->text('游戏时间', 690, 50, $stats_key)
->text("{$playtime['hours']}小时 {$playtime['minutes']}分钟 {$playtime['seconds']}", 690, 72, imageFont($yahei, 18, '#ffcc22'))
->insert(Image::make($here.'levelbadge.png')->resize(50, 50), 'top-left', 880, 30)
->text($statics->level->current, 905, 45, imageFont($exo2_bold, 18, $white, 'center', 'middle'))
;
$yIndex = 120;
foreach($stat as $key => $value){
$img->text($key, 690, $yIndex, $stats_key);
$img->text($value, 930, $yIndex, imageFont($exo2_bold, 16, $white, 'right'));
$yIndex+=20;
}
$img->text(sprintf('%.2f', $statics->pp), 690, 280, imageFont($exo2_bold, 40, $white));
$img->text('PP', 740, 300, imageFont($exo2_bold, 20, $white));
$img->text('#'.number_format($statics->rank->global), 930, 280, imageFont($exo2_bold, 20, $white, 'right'));
$img->text($user->country->code.' '.'#'.number_format($statics->rank->country), 930, 300, imageFont($exo2_bold, 20, $white, 'right'));
$xIndex = 675;
foreach($grade as $key => $value){
$img->insert(Image::make($here."{$key}.png")->resize(50, 50), 'top-left', $xIndex, 300);
$img->text($value, $xIndex+20, 350, imageFont($exo2_bold, 16, $white, 'center', 'buttom'));
$xIndex+=55;
}
$img->save('../storage/cache/'.$Event['message_id']);

$Queue[]= sendBack(sendImg(getCache($Event['message_id']))."\n".preg_replace('/\n+/', "\n", str_replace('<br />', "\n", htmlspecialchars_decode(strip_tags($user['page']['html'], '<br>')))));
$msg = sendImg(getCache($Event['message_id']));
if($withMeText)$msg.="\n".preg_replace('/\n+/', "\n", str_replace('<br />', "\n", htmlspecialchars_decode(strip_tags($user->page->html, '<br>'))));

$Queue[]= sendBack($msg);


?>
Binary file added module/osu/modes/fruits.png
Binary file added module/osu/modes/mania.png
Binary file added module/osu/modes/osu.png
Binary file added module/osu/modes/taiko.png
14 changes: 9 additions & 5 deletions module/osu/tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function getSSPP($map, $stat){
}

function get_user_recent($k, $u, $m = OsuMode::std){
$u=urlencode($u);
$u=OsuUsernameEscape($u);
$result = json_decode(file_get_contents("https://osu.ppy.sh/api/get_user_recent?k={$k}&u={$u}&m={$m}"), true)[0];
if(NULL === $result){
throw new \Exception('玩家最近没有成绩');
Expand All @@ -122,7 +122,7 @@ function get_user_recent($k, $u, $m = OsuMode::std){
}

function get_user_best($k, $u, $bp, $m = OsuMode::std){
$u=urlencode($u);
$u=OsuUsernameEscape($u);
$result = json_decode(file_get_contents("https://osu.ppy.sh/api/get_user_best?k={$k}&u={$u}&limit={$bp}&m={$m}"), true)[$bp-1];
if(NULL === $result){
throw new \Exception('没有这个bp');
Expand All @@ -131,7 +131,7 @@ function get_user_best($k, $u, $bp, $m = OsuMode::std){
}

function get_user($k, $u, $m = OsuMode::std){
$u=urlencode($u);
$u=OsuUsernameEscape($u);
$result = json_decode(file_get_contents("https://osu.ppy.sh/api/get_user?k={$k}&u={$u}&m={$m}"), true)[0];
if(NULL === $result){
throw new \Exception('无效的 osu! ID,请检查用户名是否正确(或者被 ban 了');
Expand All @@ -151,6 +151,10 @@ function get_map($id, $mod){
return array_merge($map, json_decode($result[0], true));
}

function OsuUsernameEscape($osuid){
return str_replace('+', '%20', urlencode($osuid));
}

function getOsuID($qq){
return rtrim(getData('osu/id/'.$qq));
}
Expand Down Expand Up @@ -180,9 +184,9 @@ function imageFont($file = 1, $size = 12, $color = '#000000', $align = 'left', $
function drawScore($recent, $map, $u){
Image::configure(array('driver' => 'imagick'));

$exo2 = '/usr/share/fonts/truetype/exo2/exo2.ttf';
$exo2b = '/usr/share/fonts/truetype/exo2/exo2-bold.ttf';
$here = __DIR__.'/';
$exo2 = $here.'Exo2-Regular.ttf';
$exo2b = $here.'Exo2-Bold.ttf';
$venera = $here.'Venera.ttf';
$blue = '#44AADD';
$gray = '#AAAAAA';
Expand Down
2 changes: 1 addition & 1 deletion module/pixiv/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

$webStr = 'https://www.pixiv.net/search.php?type=illust'
.'&p='.$page
.'&mode='.$mode
.'&mode='.strtolower($mode)
.'&word='.$word
;

Expand Down

0 comments on commit c67539a

Please sign in to comment.