- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
app::storage()->setUserUploadDir('public');
app::storage()->avatar = 'profile/avatars';
app::storage()->background = 'profile/background';
app::storage()->audioFile = 'music';
app::storage()->videoFile = 'video/file';
app::storage()->videoScreen = 'video/screen';
app::storage()->forum = 'forum';
app::storage()->systemImages = 'system/images';
app::storage()->tmpUpload('upload');
app::storage()->registerMethod('avatar', function($id, $type = false)
{
if($type==true){
return app::storage()->fileExists(app::storage()->path('avatar').'/'.$id.'.png') ? '/'.app::storage()->path('avatar').'/'.$id.'.png' : null;
}else{
return '/'.app::storage()->path('avatar').'/'.$id.'.png';
}
} );
app::storage()->registerMethod('defaultAvatar', function()
{
return '/'.app::storage()->path('systemImages').'/noavatar.png';
} );
SlavaBagru 24.08.2016 09:43 # −52
Kozel 24.08.2016 12:27 # +19
Эх, Говнокод опять в жопе :(
SlavaBagru 24.08.2016 12:36 # −57
pravka 24.08.2016 12:52 # +18
SladkiyBagorchik 24.08.2016 16:17 # −61
guesto 24.08.2016 23:22 # +16
SladkiyBagorchik 25.08.2016 06:58 # +14