Submitted by Thao Huynh on October 29, 2020 - 13:45
Open settings.php add this line:
$settings['http_client_config'] = ['verify' => FALSE];
Submitted by Thao Huynh on July 30, 2020 - 13:31
Drupal.safe_encode = function(element) {
var encode = encodeURIComponent(JSON.stringify(element));
var base64 = Base64.encode(encode);
base64 = base64.replace('/', '_');
base64 = base64.replace('+', '-');
return base64;
};
var base64 = Drupal.safe_encode(object);
var url = Drupal.url('module-url?component_data='+ base64);
Submitted by Thao Huynh on August 27, 2018 - 14:04
Submitted by Thao Huynh on June 17, 2015 - 12:28
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.
Submitted by Thao Huynh on July 16, 2014 - 22:21
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
Submitted by Thao Huynh on June 25, 2014 - 10:04
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
Submitted by Thao Huynh on June 17, 2014 - 21:09
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.
Submitted by Thao Huynh on June 16, 2014 - 12:53
<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>
Submitted by Thao Huynh on March 8, 2014 - 22:01
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.
Submitted by Thao Huynh on January 27, 2014 - 11:29
Tips update Drupal core with Drush:
- Make sure you enabled "Update manager" module otherwise enable it with Drush by command:
drush en update
- Always backup your site and database before update Drupal core.
- Run Drush command to update Drupal core:
drush up drupal
Submitted by Thao Huynh on December 22, 2013 - 21:00
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: