We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link repository: https://github.com/huynhtrucquyen0812/elfinder-for-sifoni
php.ini
extension=php_fileinfo.dll
require
composer.json
"studio-42/elfinder": "2.x-dev", "barryvdh/elfinder-flysystem-driver": "~0.1”
rồi chạy lệnh composer update -vvv
composer update -vvv
routing
/admin
'/finder/browse' => 'Admin\FinderController:browse:admin_finder_browse', '/finder/connector' => 'Admin\FinderController:connector:admin_finder_connector’,
FinderController.php
app/controller/Admin/
finder.html.twig
app/view/admin/utils/
elfinder
web/assets/
upload
web/
<textarea name="content" id="content" rows="10" cols="60"></textarea> <script> CKEDITOR.replace('content', { filebrowserBrowseUrl : "{{ url('admin_finder_browse') }}" }); </script>
config.js
ckeditor/
CKEDITOR.editorConfig = function( config ) { // Config Sth config.filebrowserBrowseUrl = '/admin/finder/browse'; };
<img id="img" src="/assets/admin/image/no-image.png"/> <!-- để hiển thị image được chọn --> <input id="imgURL" type="text" name="image"/> <!-- để lưu URL của image --> <button class="btn-browse-img" type="button">Choose</button> <!-- để browse image --> <script> $(document).ready(function() { window.admin_finder_browse = "{{ url('admin_finder_browse') }}"; }); $(document).ready(function() { $('.btn-browse-img').on('click', function() { var txt = $(this); var fileupload = function(file) { $('#img').attr('src', file.url); $('#imgURL').attr('value', file.url) }; window.upload_handle = fileupload; var w = window.open(window.admin_finder_browse, "", "width=600, height=400"); w.onbeforeunload = function(){ window.upload_handle = false; }; }); }); </script>
--> Về AuthedController trong FinderController: #3
AuthedController
FinderController
DONE~!!! (╯°□°)╯︵ ┻━┻
The text was updated successfully, but these errors were encountered:
Mục 2 chỉ là form Create chứ nếu Update thì fải show hình hiện tại ra chứ
Sorry, something went wrong.
Vì là cách lấy dữ liệu khác nhau nên ko biết để làm sao, nếu update thì mấy bạn tự để hình zô nha 😀
<input id="imgURL" type="text"/> <!-- để lưu URL của image -->
ko co name sao ma save form 😕
name
No branches or pull requests
Link repository: https://github.com/huynhtrucquyen0812/elfinder-for-sifoni
Mục đích
Cài đặt
php.ini
đã bỏ comment dòngextension=php_fileinfo.dll
require
trongcomposer.json
đoạn code:rồi chạy lệnh
composer update -vvv
routing
trong phần/admin
FinderController.php
vàoapp/controller/Admin/
finder.html.twig
vàoapp/view/admin/utils/
elfinder
vàoweb/assets/
upload
và chmod 777 trongweb/
Cách dùng
I. Tích hợp vào CKEditor:
config.js
trongckeditor/
II. File Browser trong form
--> Về
AuthedController
trongFinderController
: #3DONE~!!! (╯°□°)╯︵ ┻━┻
The text was updated successfully, but these errors were encountered: