By editor, 2 March, 2018 Create a Pagination with PHP Tags PHP Code Example of a pager (pagination) on php: function showpager($currentIndex = 0, $buttons = 5, $totalPages = 50) { $currentPage = $lowerLimit = $upperLimit = min($currentIndex, $totalPages); //Search boundaries
By editor, 13 February, 2018 JavaScript Events on Drupal 8. Tags Drupal 8 Code JavaScript Module Note : On drupal the best practice is use drupal behaviors but not JS or Jquery codes such as: <button onclick='myFunction()'>Click</button>
By editor, 9 February, 2018 Save a temporary data - Key Value Expirable. Tags Drupal 8 Code keyvalue.expirable service allow to save Key / Value variable in the database. Example: // Save without date limit. \Drupal::service('keyvalue.expirable')->get('my_module')->set('my_var', 123);
By editor, 2 February, 2018 Tips for Webmin and Virtualmin Tags Server Linux Webmin and Virtualmin Change IP access control from shell terminal. Edit file: /etc/webmin/miniserv.conf vim /etc/webmin/miniserv.conf Change: allow=OLD_IP to New IP Example: allow=123.214.123.123 85.25.65.45 45.65.85.36
By editor, 26 January, 2018 Install drupal 8, modules and themes from Drush. Tags Drupal 8 Drush Shell Linux Drush allow to download and install drupal core, drupal modules and drupal themes. Note : It is recommended to use composer to manage drupal 8, modules and themes.