Deleting a Cookie in JavaScript by name. LAKHAN GEHARWAR November 28, 2024 Set-Cookie function set_cookie(name, value) { document.cookie = name +'='+ value +'; Path=/;'; } Delete-Cookie funct... Continue Reading
Improved performance of my d7.9 localhost installation.(php.ini & my.ini) LAKHAN GEHARWAR September 20, 2024 improved performance of my d7, D9 localhost installation. For some reason, on my installation, my.ini [mysqld] port = 3306 socket = /tmp/m... Continue Reading
Implements hook_css_alter(). LAKHAN GEHARWAR August 16, 2024 Remove the stable theme css for all anonymous User. function hook_css_alter(&$css, \Drupal\Core\Asset\AttachedAssetsInterface $assets)... Continue Reading
Git Error and command LAKHAN GEHARWAR July 18, 2024 Clone the repo 1:- Clone the repo again using the below command. git clone -c core.longpaths=true <repo-url> Continue Reading
Cron run every which is set the time. LAKHAN GEHARWAR July 01, 2024 /** * Implements hook_cron(). */ function sso_user_cron () { //$current_time = time() + 6*60*60; 6hr total=21600,12hr total=43200,24h... Continue Reading
Maviven .module LAKHAN GEHARWAR April 15, 2024 <?php /** * @file * Maiven Sendgrid module file. */ use Drupal\Component\Plugin\Exception\PluginException; use Drupal\Core\Entity\En... Continue Reading
Logging API in drupal 9 LAKHAN GEHARWAR April 09, 2024\Drupal::logger('module_name')->critical(t('This is critical @message_id', ['@message_id' => $link])); \Drupa... Continue Reading
Drupal LAKHAN GEHARWAR April 09, 2024 https://www.metaltoad.com/help/top-20-drupal-tips Continue Reading
Drupal 8 Entity API cheat sheet LAKHAN GEHARWAR April 09, 2024if you've already read the official Drupal 8 Entity API documentation and you want more examples, here's a handy cheat sheet: The e... Continue Reading