Skip to content

Instantly share code, notes, and snippets.

View KostasBlank's full-sized avatar

Kostas Kourakis KostasBlank

  • Point Blank
  • Thessaloniki
View GitHub Profile
<div class="ajax-progress ajax-progress-throbber">
<div class="throbber">&nbsp;</div>
<div class=“message”>Add product</div>
</div>
<!-- Drupal Commerce -->
<span class="checkout-processing"></span>
function no_greek_punctuation($source){
$newphrase="";
$newphrase= str_replace("ά", "α", $source);
$newphrase= str_replace("έ", "ε", $newphrase);
$newphrase= str_replace("ί", "ι", $newphrase);
$newphrase= str_replace("ό", "ο", $newphrase);
$newphrase= str_replace("ή", "η", $newphrase);
$newphrase= str_replace("ύ", "υ", $newphrase);
$newphrase= str_replace("ώ", "ω", $newphrase);
$newphrase= str_replace("Ά", "Α", $newphrase);
@KostasBlank
KostasBlank / readmore.js
Created March 8, 2017 10:45
Drupal readmore toggle
/**
* @file
* A JavaScript file for the theme.
*
* Add a read more / less functionality.
*/
(function ($, Drupal, window, document) {
'use strict';
@KostasBlank
KostasBlank / gist:2ca32fdd25829ae3f2bf
Created July 22, 2015 09:49
Find all views with sql rewrite disabled
$all_views = views_get_all_views();
foreach ($all_views as $view) {
$displays = $view->display;
foreach ($displays as $views_display) {
$display_options = $views_display->display_options;
$disable_sql_rewrite = $display_options['query']['options']['disable_sql_rewrite'];
if ($disable_sql_rewrite) {
dpm($view->name . ': ' . $views_display->display_title);
}
}
<?php
$greek = array();
$greek['AD'] = 'Ανδόρρα';
$greek['AE'] = 'Ηνωμένα Αραβικά Εμιράτα';
$greek['AF'] = 'Αφγανιστάν';
$greek['AG'] = 'Αντίγκουα και Μπαρμπούντα';
$greek['AI'] = 'Ανγκουίλα';
$greek['AL'] = 'Αλβανία';
$greek['AM'] = 'Αρμενία';
$greek['AN'] = 'Ολλανδικές Αντίλλες';
/**
* @file
* A JavaScript file for the theme.
*
* Resizes all elements having the class equal-height-parent to the same height.
*/
(function ($, Drupal, window, document, undefined) {