This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function convert_string_vietnam($text) | |
{ | |
$text = html_entity_decode ($text); | |
$text = preg_replace("/(ä|à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/", 'a', $text); | |
$text = str_replace("ç","c",$text); | |
$text = preg_replace("/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/", 'e', $text); | |
$text = preg_replace("/(ì|í|î|ị|ỉ|ĩ)/", 'i', $text); | |
$text = preg_replace("/(ö|ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)/", 'o', $text); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Theme_menu_tree doesn't provide any context information | |
* THIS SUCKS | |
* But you can use hook_block_view_alter to change the theme wrapper | |
* OUF! | |
*/ | |
function MYTHEME_menu_tree(&$variables) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Implementing hook_form_alter() to change classes and add a wrapper function | |
*/ | |
/** | |
* Implements hook_form_alter(). | |
*/ | |
function MYTHEME_form_alter(array &$form, array &$form_state = array(), $form_id = NULL) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = My Module | |
description = This module exmaple | |
core = 7.x | |
version = 1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commerce_pricing_attributes.module | 46 +++++++++++++++++++++++++++++----------------- | |
1 file changed, 29 insertions(+), 17 deletions(-) | |
diff --git a/commerce_pricing_attributes.module b/commerce_pricing_attributes.module | |
index d7b979e..4a39c0e 100644 | |
--- a/commerce_pricing_attributes.module | |
+++ b/commerce_pricing_attributes.module | |
@@ -929,6 +929,9 @@ function commerce_pricing_attributes_add_to_cart_submit($form, $form_state){ | |
elseif (isset($form_state['products'])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** template_preprocess_page(); | |
* @param $vars | |
*/ | |
function hosting_preprocess_page(&$vars) { | |
global $theme; | |
if (drupal_is_front_page()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get a list of the top selling products on a Drupal Commerce site | |
* If you have different product types - add them to the in list. | |
* Based on https://drupal.org/node/1292104#comment-6866420 by tmsimont https://drupal.org/user/566678 | |
*/ | |
SELECT node.title AS product_title, node.nid AS product_nid, COUNT(cp.title) AS order_count | |
FROM commerce_order | |
LEFT JOIN field_data_commerce_line_items as fdcli ON commerce_order.order_id = fdcli.entity_id AND (fdcli.entity_type = 'commerce_order' AND fdcli.deleted = '0') | |
INNER JOIN commerce_line_item as cli ON fdcli.commerce_line_items_line_item_id = cli.line_item_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[class^="col-"] { | |
padding-left: 0; | |
padding-right: 0; | |
} | |
[class$="-12"] | |
{ | |
padding-left: 0; | |
padding-right: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = Mod Panel Style | |
description = Module support Style for Panel region | |
dependencies[] = panels | |
core = 7.x | |
version = 1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.site-contact-wrapper{ | |
background-color: #eff1f5; | |
} | |
</style> | |
<div class="contact-map"> | |
<div id="map"></div> | |
</div> | |
<div id="content-wrapper" class="site-contact-wrapper"> | |
<div class="container"> |