Add ckfinder 3x for code PHP and framework PHP tutorial


Make friends to get support from me Please like & subscribe to my channel to get the latest video Interface after completion. After successful testing Go to ckfinder page to download the new source code of ckfinder I have already downloaded it After downloading, extract the file Source code file completed I have uploaded it to my website, you can download and view the sample code. Download and overwrite the source code of ckfinder. I will guide you step by step to show you how to do it Copy the extracted directory to your source code Create some necessary directories. For example js, uploads Paste the newly extracted ckfinder folder into the js folder Wait for the copy to succeed I will guide you to get the thumb image in the 3x version that was previously only available in the 2x version Here I use virtual host Copying files in the public folder takes the source code out Open the index.php file to edit it Delete “../” in 2 lines as I do Refresh the page Open the link http://www.project.com/public/js/ckfinder/ckfinder.html. The link may vary according to your source code. ckfinder’s authentication status is false Open ckfinder’s config.php file to correct the authentication status from false to true Refresh the page Next activate ckfinder remove demo Visit my personal page phamgiang.pro to get the key ckfinder Read the instructions carefully and follow Choose the 3x version Copy domain name into the License Name box Can copy more www Next, click Generate to generate the key. Copy the License Name and key into the config.php file Note. If the key has not been copied successfully, then you get the key again until the demo loss If you call the laravel autoload directly into the config.php file, you will get an error I will make an example for you to see The website will be corrupted and cannot be run. Step 1: open source code ckfinder to find connector.php file Save as file to ckfinder folder Edit the file path Copy the code to load the laravel library into before the autoload of the connector.php file. No error, you succeeded Can be saved as a new file for easy editing require file Laravel.php into before the autoload of the connector.php file. This is the file I have completed the code. For quick work, I will copy it via config.php You can use laravel’s request and auth to check permissions Check if the user is logged in and get the user information Guard editing according to your site You can use the request to get more value I will guide you to add parameters to the url in the following step Check the url value in the browser will be empty at first. I added the value to make it easier to test Can check the admin & user rights to decentralize access If the user successfully logged in, edit the upload directory & upload url You can use the user id to create a directory for each user If login successfully, then authentication is true otherwise false. I set the value to true to test. Refresh the page Why is the error? Because we changed the other connector.php file If we want to use the new connector.php file, we have to edit the config.js file to call the new connector.php file add to config.js connectPath with the new path Check if config.js has loaded the new code. Clear the cache or press ctrl + F5 to reload the page So was successful Add new resourceTypes if admin example resourceTypes videos If you want to get thumbnails, you need to add config for thumbnails The default is 250×250 I will add the htaccess code to get the thumbnail The default 250×250 follows the configuration of the config file If you want to get the thumbnail, you need to edit the BackendFactory file to get the picture Navigate to the last line of the BackendFactory file comment code because whenever the new directory with user id, ckfinder will create more htaccess file to block the opening of the path … Change backends default baseUrl and root dir Review Upload again Check the image again view image edit url and add thumbs to the url Add htaccess code to get thumb into htaccess file review not view thumb because the file htaccess of the user id folder has deny the file view Delete the content of the htaccess file in the directory of the user id to test comment the code in the BackendFactory file so that ckfinder does not create the htaccess file for the user id Get the thumb image successfully add value to url. such as tokens Each value separated by commas Add config value with the value declared in config.pass Check if the value has been added successfully add successful Source code sample I will upload to phamgiang.pro page for your reference download The source will contain the main files that I code and edit Edit the path if your project is different from the path of my project You can use the str_replace function of php to add thumbs to the image path Please like & subscribe to my channel to get the latest video

Leave a Reply

Your email address will not be published. Required fields are marked *