Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

Drupal 7

By editor , 18 September, 2017

Use IMCE on custom page

Tags

  • Drupal 8
  • Code
  • Drupal 7
  • Module

Example 1 (for drupal 7)


Step 1. Add file brows

Create a simple js file in your module directory (called yourModuleName.js) and enter the following Javascript.

By editor , 11 January, 2017

Make Some operations Programmatically - Hook Update Deploy Tools

Tags

  • Drupal 8
  • Code
  • Drupal 7
  • Module

Hook Update Deploy Tools is a great contrib module help to make most of site deploy operations programmatically.
Link : https://www.drupal.org/project/hook_update_deploy_tools

By editor , 13 December, 2016

Solr Configuration for Drupal

Tags

  • Drupal 8
  • Module
  • Drupal 7

Step 1. Install Tomcat And Solr Server (atlest 5.4.1)

Step 2. Install Solr Search API On your drupal

#Drush# drush en search_api_solr -y

Step 3. Copy solr core files

By editor , 4 November, 2016

Set Drupal System variables manually

Tags

  • Drupal 8
  • Drupal 7
  • Settings

To set Drupal System variables you can use the $settings (on Drupal 8) and $conf (On Drupal 7) array of setting.php file.

By editor , 4 October, 2016

HTML Entity Decode and Encode

Tags

  • Drupal 8
  • Code
  • Drupal 7
  • PHP

Basic php and drupal 7 / 8 Examples

1.
$string_out = html_entity_decode($string, ENT_QUOTES, 'UTF-8')
//Do not forget ENT_QUOTES and 'UTF-8', otherwise quotes will not decodes.

By editor , 29 September, 2016

Execute a drush command programmatically

Tags

  • Drupal 8
  • Code
  • Drush
  • Drupal 7

Methodes:

drush_invoke (For the current site)
drush_invoke($command, $arguments = array());

drush_invoke_process
This creates a new process in a new Drupal instance. There for you must specify the site alias.

By editor , 29 August, 2016

Change Date format on Views BEF

Tags

  • Drupal 8
  • Code
  • Drupal 7
  • Views

There are several methodes.

Change date format Using custom module.

By editor , 26 August, 2016

Tips for Form API of Drupal 8

Tags

  • Drupal 8
  • Drupal 7
  • Code
  • Form

Add html after a field

(#field_prefix and #field_suffix).

By editor , 24 August, 2016

Get Entity, Node, Taxonomy from URL Path

Tags

  • Drupal 8
  • Drupal 7

Drupal 8

 

Drupal 7

Get the node
$node = menu_get_object();

Get Path alias
$alias = drupal_get_path_alias();

By editor , 22 August, 2016

Change Drupal 8 text field maximum length

Tags

  • Drupal 8
  • Code
  • Drupal 7
  • Database

If there no data, You can use field_update_field (tested on D7) Like:

Pagination

  • 1
  • Next page
Drupal 7

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer