Tags » Drupal

Allowing Code in CKEditor Wysiwyg

Every used CKEditor’s WYSIWYG, inserted some code in Source view, then when you reverted to¬†WYSIWYG the code disappeared?

The default setting of CKEditor strips the html, and extra bits of code that aren’t entered normally bu users. 72 more words


Drupal Development Environment - Installing Drush

Installing Drush is very easy, but installing it the right way on Linux can be a daunting task! Drush might work but you will always have a lot of permissions conflicts. 22 more words


Integrating and working with multiple databases in Drupal 7.

Earlier after working on a scenario where multiple Drupal interfaces were running on a single database, I was wondering, what if a single Drupal interface uses multiple databases? 976 more words


Install / Update Drush Using Composer

To install Drush 6.x (stable):

composer global require drush/drush:6.*

To install Drush 7.x (dev) which is required for Drupal 8:

composer global require drush/drush:dev-master

To update to a newer version (what you get depends on your specification in ~/.composer/composer.json): 55 more words


Change password through Drush

drush user-password  name_of_user --password="your_name"
e.g. drush user-password admin --password="anand"

Remember last clicked pager

Remember last clicked pager(for ajax views)

 * Implements hook_views_pre_view().
 * @see http://drupalcontrib.org/api/drupal/contributions%21views%21views.api.php/function/hook_views_pre_view/7
function modulename_views_pre_view(&$view) {
  // check view name
  if($view->name == 'my-view-name' && $view->current_display == 'view-display-name') {

    if(isset($_SESSION['views_pages'])) {
      $page = $_SESSION['views_pages'];
    else {
      $page = 0;

    if(!empty($_REQUEST)) {
      $page = (isset($_REQUEST['page'])) ? 18 more words

Drupal: how to delete Fields with a lot of data inside

The problem:

in my Drupal Production instance, i need to remove some Fields. They are no more used but they are full of data already. in their DB tables i have millions of records and many GB occupied. 387 more words