Drupal 7 with Laravel 5

I just write a Drupal module allow integrate Drupal with Laravel to work together, you can check here: https://www.drupal.org/project/illuminate

More information and example will post in next article.

Code fun.

Install Multiple PHP Versions and PHP 5.5 with Virtualmin on CentOS

PHP5.5

Beginning in Virtualmin 3.99, Virtualmin allow you install multiple version of PHP with Software Collections.

MAC OS: Change fn to command key

Just moving to MAC OS and have problem with fn key when using Windows keyboard, fortunately there is a free application called Karabiner help you can swap fn and command key.

Drupal Charts module and custom Highcharts properties

Drupal Charts is a great charts module for Drupal, it allow use you both Google Charts and Highcharts. You can use same setup for both Google Charts and Highchats but some settings properties not implement yet. Here is tips allow you add custom chart properties

Bootstrap theme menu hover and clickable parent menu

This article show you how config Drupal Bootstrap theme allow show dropdown menu when hover and clickable parent menu

First add this css to your theme css, usually is style.css

@media (min-width: 768px) {
  .dropdown:hover .dropdown-menu {
    display: block;
  }
}

Second, override theme_menu_link to remove data-toggle

Fix Drupal .htaccess symlinks problem

Some hosting problem with Drupal .htaccess symlinks, default Drupal use "Options +FollowSymLinks", you need change it to "Options +SymLinksIfOwnerMatch" to resolve the issue.

Change .htaccess at root of Drupal folder, files folder and temporary folder to fix them.

Simple CSS to optimize Drupal tabs operations with Bootstrap

 

<style>
.page-node .tabs--primary {
  position: fixed;
  left: 0;
  top: 35%;
}
@media (max-width: 767px) {
  .page-node .tabs--primary {
    display: none;
  }
}
.page-node .tabs--primary.nav-tabs > li {
  float: none;
}
.page-node .tabs--primary.nav-tabs > li a {
  border: 1px solid #DDDDDD;
  border-radius: 0;
}
.front .page-header {
  display: none;
}
</style>

Quick Fix FlexSlider with Firefox 29 on Windows

FlexSlider error with Firefox v29 on Windows, it doesn't apply animation for slider item. Here is sollution to fix them:

  $(document).ready(function() {
    $(".flexslider").flexslider({
      touch: !$.browser.mozilla
    });
  });

Translate Drupal from English to Vietnamese with POEdit

Drupal multi language

Drupal support multi language website and user can translate with Locale module. But it have some difficult when you translate a lot text or you need send to customer and they will translated by himself. Export current language to .po file and translate with POEdit is an easy way.

Installing VirtualMin on CentOS

VirtualMin

VirtualMin is free system help user can easy manager their server or VPS. I usually use it with Drupal hosting, here is note for install VirtualMin on CentOS

Update System

# sudo yum -y update

Install pre-requisites

# sudo yum -y install perl

Download VirtualMin Installer

 # wget http://software.virtualmin.com/gpl/scripts/install.sh

Installation

# sudo sh install.sh

Wait a moment, it about to 5 minutes to install VirtualMin on your system.

Fix multilib versions error when updating yum in Centos/Fedora

Recent i need update some modules of my VPS Centos like glib2 i got error Multilib version problems found...

Solve problem: Run command bellow as root permisson

$ sudo yum upgrade --setopt=protected_multilib=false --skip-broken

Reference: http://superuser.com/questions/419329/protected-multilib-versions-error-when-updating-yum-in-fedora-16

 

Easy Syntax Highlight with CKEditor and Google Code Prettify

This article show you way how to config CKEditor module and Google Code Prettify to this display code syntax hightlight

The organic post for CKEditor with WYSIWYG here http://www.larsbo.org/article/ckeditor-with-syntax-highlight-for-drupal-710

Update Drupal core with Drush

Update Drupal core with Drush

Tips update Drupal core with Drush:

  1. Make sure you enabled "Update manager" module otherwise enable it with Drush by command: drush en update
  2. Always backup your site and database before update Drupal core.
  3. Run Drush command to update Drupal core: drush up drupal

Add icon to readmore link with bootstrap theme and display suite

Add mouse click `goto definition` in sublime text 3

Config SublimeText 3 enable mouse click 'goto definition':
Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User
Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User
Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User

[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
"command": "goto_definition"
}
]
Tags: 

Fix Drush fail download dev module on Windows

In drush/commands/pm/package_handler/wget,inc

// Add to URL so it is part of the cache key . Dev snapshots can then be cached forever. 
if (strpos($release['download_link'], '-dev') !== FALSE) { 
   $release['download_link'] .= '?date=' . $release['date']; 
} 
$filename = basename($release['download_link']);

should probably be replaced with this: