Laravelã§ãã§ãã¯ããã¯ã¹ã«checkedãä»ãã
æ¤ç´¢ããã¨ä¸é
æ¼ç®åã使ã£ãæ¹æ³ãè¤æ°åºã¦ãã¾ããããã£ã¨ã·ã³ãã«ã«Bladeã®æ©è½ã§åºæ¥ã¾ãã
Bladeã®@checkedã§ãã
<input type="checkbox" name="flag" @checked($flag)>
HumHubã§ãã¿ããªã®åå¿ããè¦ããããã
HumHubã®ãã¿ããªã®åå¿ãã¯ã³ã¡ã³ããå
¨ã¦è¡¨ç¤ºãããã®ã§é常ã«ããããã³ã¡ã³ããåé¤ããã«ã¯
humhub\protected\humhub\modules\like\messages\ja\activities.php
ã®ã{contentTitle}ããåé¤ããã
HumHubã§ã¢ãããã¼ãããç»åãµã¤ãºãä¸ãã
HumHub1.7ã§ãããããç»åãªãµã¤ãºæ©è½ãå®ç¾ããã¾ããã以åã¯èªä½ãã¦ãããâ¦ã
ãprotected/config/common.phpããéãã¦ããmodules.fileãã追è¨ãã¾ãã
追è¨ããã®ã¯â
'modules' => [ 'file' => [ 'imageMaxResolution' => '1920x1080', 'imageJpegQuality' => 75, 'imagePngCompressionLevel' => 9, 'imageWebpQuality' => 75, ] ],
ãããªæãã«ãªãã¾ãã
$config = [ 'modules' => [ 'file' => [ 'imageMaxResolution' => '1920x1080', 'imageJpegQuality' => 75, 'imagePngCompressionLevel' => 9, 'imageWebpQuality' => 75, ] ], 'name' => 'HumHub', 'version' => '1.8.1',
詳細ã¯ããã«âããã¾ãã
docs.humhub.org
Vmwareã¨Windowsã«å ±æãã©ã«ããä½ã£ã¦ãWindowså´ã§ç·¨é
Vmwareã¨Windowsã«å
±æãã©ã«ããä½ã£ã¦ãWindowså´ã§ç·¨éããã¨ãã®ã¡ã¢ãå
±æãã©ã«ãã«ãã©ã«ãã移åãã¦ãã·ã³ããªãã¯ãªã³ã¯ãè²¼ã£ãã
ã¤ã³ã¹ãã¼ã«
- git clone https://github.com/rasa/vmware-tools-patches.git
- cd vmware-tools-patches
- sudo ./download-tools.sh latest
- sudo ./untar-and-patch.sh
- sudo ./compile.sh
ã·ã³ããªãã¯ãªã³ã¯
- sudo mv /home/myuser/app /mnt/hgfs/app
- sudo ln -s /mnt/hgfs/app /home/myuser/app
åèãªã³ã¯
Windowsã®XAMPPç°å¢ã«Monicaãã¤ã³ã¹ãã¼ã«ãã
Windowsã®XAMPPç°å¢ã«Monicaãã¤ã³ã¹ãã¼ã«ããã
phpã7.1以åã®å ´å
- https://pecl.php.net/package/libsodiumããdllããã¦ã³ãã¼ãããã
- php.iniã«extension=php_sodiumã追è¨ããã
phpã7.2以éã®å ´å
- sodiumãå ¥ããªãã®ã§ã諦ãã¦composer.jsonãããweb-token/jwt-signature-algorithm-eddsaããåé¤ããã
- ãã¼ã¿ãã¼ã¹monicaãä½ã
- php artisan key:generateãå®è¡ãã
- php artisan setup:production -vãå®è¡ãã
- ã[email protected]/admin0ãã§ãã°ã¤ã³ãã
xamppç°å¢ã§Laravel Backup
ãspatie/laravel-backupããxamppç°å¢ã§ä½¿ãã¨ãã«ã¯ãconfig/database.phpãç·¨éããã
'mysql' => [ 'driver' => 'mysql', 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'prefix_indexes' => true, 'strict' => true, 'engine' => null, 'options' => extension_loaded('pdo_mysql') ? array_filter([ PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), ]) : [], 'dump' => [ 'dump_binary_path' => 'D:\xampp\mysql\bin' âãã®è¡ãå¿ è¦ã«ãªãã ]
Laravel Excelã§ã¨ã¯ã¹ãã¼ãæã«ããããã¤ãã
Laravel Excelã§ã¨ã¯ã¹ãã¼ãæã«ããããã¤ãããã¨ãã§ããããWithHeadingsãã追å ãã¦ããããheadings()ãã¡ã½ããã«é åã§ãããã®å 容ãæ¸ãã ãã§ãã
<?php namespace App\Exports; use App\Member; use Maatwebsite\Excel\Concerns\FromCollection; use Maatwebsite\Excel\Concerns\WithHeadings; #â追å class MembersExport implements FromCollection, WithHeadings #âWithHeadingsã追å { /** * @return \Illuminate\Support\Collection */ public function collection() { return Member::all(); } public function headings(): array { return [ 'name', 'birthday', ]; } }
HumhubãSafariã§ä½¿ã£ãã¨ãã®æ¼¢å確å®ã®ãã°ã解æ¶ãã
HumhubãSafariã§ä½¿ãã¨ãæ¥æ¬èªå ¥åã§Enterãã¼ãæ¼ãã¨å¿ ãæ¹è¡ã«ãªããããã解æ¶ããããã«keyCode = 229ã®ãã§ãã¯ã追å ããã
function inOrNearComposition(view, event) { if (view.composing) { return true } // See https://www.stum.de/2016/06/24/handling-ime-events-in-javascript/. // On Japanese input method editors (IMEs), the Enter key is used to confirm character // selection. On Safari, when Enter is pressed, compositionend and keydown events are // emitted. The keydown event triggers newline insertion, which we don't want. // This method returns true if the keydown event should be ignored. // We only ignore it once, as pressing Enter a second time *should* insert a newline. // Furthermore, the keydown event timestamp must be close to the compositionEndedAt timestamp. // This guards against the case where compositionend is triggered without the keyboard // (e.g. character confirmation may be done with the mouse), and keydown is triggered // afterwards- we wouldn't want to ignore the keydown event in this case. if (result.safari && Math.abs(event.timeStamp - view.compositionEndedAt) < 500) { view.compositionEndedAt = -2e8; return true } if (event.keyCode===229) { return true} #âããã追å ãã return false }
Humhubã§æ¥æ¬èªå ¥åãã§ããªã件ã解決ãã
Humhubã®richtextã¨ãã£ã¿ã¼ã¯Webãã©ã¦ã¶ããæ¥æ¬èªå ¥åãã§ããªããã ãã©ã解決æ¹æ³ããã£ãã
ãã¡ã¤ã«ãprotected\humhub\modules\content\resources\js\humhub.ui.richtext.prosemirror.jsãã®
RichTextEditor.prototype.focus = function() { this.editor.view.focus(); };
ä¸è¨ãå ¨é¨æ¶ãã°æ£å¸¸ã«åããæ¶ãããã¨ã¯ãã£ãã·ã¥ã¯ãªã¢ãå¿ããã«å®æ½ãã¦ãã ããã
Humhubã®ããã³ãã©ãè¦ã¤ããã¾ãããã¨ã©ã¼
ããããã¨ã©ã¼ããã¾ã«ã§ãã
æå¾ã®æä½ãå¦çä¸ã«ã¨ã©ã¼ãçºçãã¾ããã ï¼ãã³ãã©ãè¦ã¤ããã¾ããï¼ã
ããã¯ãè¨å®âAdvancedâãã£ãã·ã¥âä¿åãã¦ãã£ãã·ã¥ã¯ãªã¢ãã§è§£æ±ºããã
HumHubã®æä½ããã¥ã¢ã«ï¼éææ´æ°ï¼
ããããï¼ããã¦ããã人ã調ã¹ã
ããããï¼ãã®äººæ°ãã¯ãªãã¯ãã¦ãã ããããã½ã³ã³ã®å ´åã¯ãã¦ã¹ãªã¼ãã¼ã ãã§ããããã¾ãã
HumHub 1.3ãªãªã¼ã¹
HumHubã1.3ã«ãªã£ããã ãã©ãCronè¨å®ãã¡ãã£ã¨å¤ãã£ããyii cronã¯ä¸ã¤ã«ãªããyii queueãå¢ããã
* * * * * /usr/bin/php /path/to/humhub/protected/yii queue/run >/dev/null 2>&1 * * * * * /usr/bin/php /path/to/humhub/protected/yii cron/run >/dev/null 2>&1
HumHubã«æ稿ããç»åã®ãµã¤ãºãå°ãããã
HumHubã¯æ稿ç»åãå°ãããã¦ãããªãã®ã§ãï¼MBã®åçãã¢ããããã¨ãã®ã¾ã¾ã¢ãããã¼ããããã
ã¾ãç»åãå°ããããé¢æ°ãä½ã£ã¦
<?php namespace humhub\modules\mymodules\libs; use humhub\modules\file\libs\ImageConverter; class Reduce { public static function Resize($uploadedFile) { $filepath = $uploadedFile->tempName; $options = [ 'width' => 400, 'height' => 400, 'mode' => 'max', ]; ImageConverter::Resize($filepath, $filepath, $options); $uploadedFile->size = filesize($filepath); return $uploadedFile; } }
humhub\modules\file\actions\UploadAction.phpã«è¿½è¨ããã
protected function handleFileUpload(UploadedFile $uploadedFile, $hideInStream = false) { $uploadedFile = \humhub\modules\mymodule\libs\Reduce::Resize($uploadedFile);
ã¨ããããå¿æ¥å¦ç½®ã