Category: Drupal 7

How to Reset admin password in drupal 7


Drupal 7 stores a salted sha512 hash. You can always use the user_hash_password('mypassword') function (located in includes/password.inc) to make yourself a new one, then paste it into the database. <?php define('DRUPAL_ROOT', getcwd()); require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); require_once 'includes/password.inc'; echo user_hash_password('123456'); die(); menu_execute_active_handler(); ?>

How To Create Custom like module in Drupal 7

How To Create Custom like module in Drupal 7


Let’s start by creating the new Drupal module. To do that we should first create a folder called likepost in the sites\all\modules\custom directory of your Drupal installation as shown below: Inside this folder, you should create a file called likepost.info with the following contents: name = likepost description = This module allows the user to … Continue reading How To Create Custom like module in Drupal 7

How To Create an Example CRUD Module in Drupal 7


There are two basic files require to create a module i.e .info file (contains basic information of module like title, description, configuration link path, module version, Drupal version e.t.c) and .module file (contains functions which implement Drupal hooks to display menu and table e.t.c on admin panel or front site). Here I also used .install … Continue reading How To Create an Example CRUD Module in Drupal 7

Drupal 8 Theme folder structure


A theme is a collection of files that define the presentation layer. You can also create one or more "sub-themes" or variations on a theme. Only the .info.yml file is required, but most themes and sub-themes will use other files as well. This page lists the files and folders that are found in a typical … Continue reading Drupal 8 Theme folder structure

Create a custom form in Drupal 8

Create a custom form in Drupal 8


In Drupal 8 form API is similar to Drupal 7 Form API. forms still uses array structure to render the data. but having separate validation and submission form.Drupal 8 has some new (HTML 5) elements available. New HTML 5 elements like 'tel','email','number','date','url','search','range' etc. In Drupal 8 Form classes implement the \Drupal\Core\Form\FormBuilderInterface and the basic workflow … Continue reading Create a custom form in Drupal 8

PHP to OPcode caching enable in Drupal 8


1.Goto >> C:/xampp/php/php.ini edit this file and at very last add this code... 2.  Then add this line into the file      [opcache] zend_extension=php_opcache.dll ;Determines if Zend OPCache in enabled opcache.enable=1 3. Then restart your apache server

How to Install Drupal with Apache2 + MySQl 5.5 + PHP 5.5 on Ubuntu Server Ubuntu 15.10

How to Install Drupal with Apache2 + MySQl 5.5 + PHP 5.5 on Ubuntu Server Ubuntu 15.10


In this tutorial we will provide you basic step how to install Drupal 7.x with Apache2 + MySQl 5.5 + PHP 5.5 on Ubuntu Server Ubuntu 15.10. Step 1 : Setup LAMP Stack Before installing Drupal 7.x you need to have a LAMP (Linux, Apache2, MySQL5, and PHP5) stack installed on your Ubuntu Server 14.04. … Continue reading How to Install Drupal with Apache2 + MySQl 5.5 + PHP 5.5 on Ubuntu Server Ubuntu 15.10

How ensure it Your Drupal website security

How ensure it Your Drupal website security


The Drupal core is well protected by default, but we can unintendedly open its vulnerabilities through insecure configuration. For example, such simple things allowing untrusted users to use any HTML tag in comments may enable cross-site scripting attacks. So do not rely on the Drupal core security measures, but also follow additional security rules that … Continue reading How ensure it Your Drupal website security