Étiquette : navigateur

  • [Drupal] Make the Search API Page search block appear in Bootstrap markup

    When using Search API Page, I needed to theme the search form in the bootstrap structure. The cleanest answer I have found is to add some variables to trigger the bootstrap overrides on the search form. /** * Implements hook_form_FORM_ID_alter(). */ function MYMODULE_form_search_api_page_block_form_alter(&$form, FormStateInterface $form_state, $form_id) { // We need this to make our search_api_page_block_form…

  • [Drupal] VM + XDebug + Netbeans

    Hey! Long time no see! Heehee. I am just dropping a note here about the basic steps of how to install XDebug for a specific setup. Here is my configuration: host: OS: Windows 7 64 bits IP: 192.168.0.3 IDE: Netbeans 8.2 guest: OS: Debian Jessie 64 bits in VirtualBox IP: 192.168.0.4 (bridged network in VirtualBox…

  • [Drupal] Use admin_block and admin_block_content templates

    This article is about the default admin_page, admin_block and admin_block_content templates which serves as the base of the content display on some system configuration pages such as the one on this image: The code

  • Replace image URLs in WordPress posts from http to https

    I just switched my website to https for testing purpose. But changing the website’s URL to https:// is not sufficient to enable a fully secure browsing experience, as images in posts are still loaded from http://. Or more precisely, most modern browsers (FF or Opera for instance) are now clever enough to guess that the…

  • [Drupal] Base hook schema example to put in .install

    Introduction Delighted hook_schema is one of those methods where you are happy to have a usable documentation on the api website. It is pretty much self-explanatory and you don’t have to look for hours on third parties websites to get some usable information. 🙂 hook_schema on api.drupal.org and don’t forget to select your Drupal version!…

  • [Drupal] Table render array example structure

    Result The code public function controllerCallbackExample() { return [ ‘#type’ => ‘table’, ‘#caption’ => ‘This is a caption. Use a translated string here.’, ‘#header’ => [ ‘Header 1’, ‘Header 2’, ‘Header 3’, ‘Header 4’ ], ‘#rows’ => [ [ ‘Row 1 Cell 1’, ‘Row 1 Cell 2’, ‘Row 1 Cell 3’, [‘data’ => ‘Row 1…

  • [Drupal] Create an event subscriber

    Instructions I will be creating a dedicated module using Drupal Console for this event subscriber. But feel free to use your own if you already have one! (don’t forget to backup) Access the drupal root folder in command line. Generate a new module: dakwamine@debian-drupal:/var/www/html/drupal$ drupal generate:module Enter the new module name: > Test Module Enter…

  • [Drupal] Service dependency injection in a service type class

    The code services: my_module.event_subscriber: # Your service class class: Drupal\my_module\Entity\EventSubscriber\MyModuleSubscriber # Add your services to load here in the array arguments: [‘@current_user’] tags: # For this example, I am making an event subscriber class – { name: event_subscriber }

  • Mini point sur ma carrière

    J’ai quitté volontiers l’industrie du jeu vidéo, ayant perdu toute motivation d’y travailler. L’entreprise dans laquelle j’avais passé plus de quatre ans à essayer de produire des jeux et des applications est sur le point de fermer définitivement. Un chapitre de ma vie est en train de se clore, j’imagine. Avais-je dit que j’étais rentré…

  • [Android] Remove « Couldn’t add widget » from the Overview Screen (Lollipop 5.1)

    Enraged After having spent more than a day on the matter, I have finally figured out how to remove the Couldn’t add widget block in the Overview Screen. This is the block which appears in place of the Google search bar on top of the recent apps list after you have disabled the Google app.…

  • Unity3D.tips[2]: Intersection point between two lines in 2D

    The code The maths behind To get the point where two lines intersect, we will do some maths. To the mathematicians who will come across this post, I’m truly sorry for the heart attacks or strokes you may experience by reading this post. Ok, let’s take a look on the figure: First, sorry, I was…