This file contains 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
/** | |
* Implements hook_form_FORM_ID_alter() for form--user-login-form.html.twig. | |
*/ | |
function sfp_form_user_login_form_alter(&$form, $form_state) { | |
$config = \Drupal::config('system.site'); | |
$site_login_blurb_display = $config->get('site_login_blurb_display'); | |
$site_login_blurb = ($site_login_blurb_display) ? $config->get('site_login_blurb') : ''; | |
$form['#prefix'] = sprintf('<div class="site_login_blurb">%s</div>', $site_login_blurb); | |
$form['#suffix'] = ''; |
This file contains 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
# Redirect old.org.il to www.new.org/he | |
# test at: https://htaccess.madewithlove.com/ | |
RewriteCond %{HTTP_HOST} ^old\.org\.il$ [OR] | |
RewriteCond %{HTTP_HOST} ^\w+\.old\.org\.il$ | |
RewriteRule ^(.*)$ https://www.new.org/he/$1 [R=301,L] |
This file contains 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 | |
/** | |
* @file | |
* mymodule module file. | |
*/ | |
use Drupal\Core\Form\FormStateInterface; | |
/** |
This file contains 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 | |
namespace Drupal\nyc_common\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\nyc_map\Utils\NycLocationServices; | |
use Drupal\nyc_map\Utils\NycGeometryUtility; | |
use Drupal\Core\Ajax\AjaxResponse; |
This file contains 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
{# | |
/** | |
* @file | |
* Example subtheme implementation to display a single page. | |
* | |
* The doctype, html, head and body tags are not in this template. Instead they | |
* can be found in the html.html.twig template in this directory. | |
* | |
* Available variables: |
This file contains 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
{# | |
/** | |
* @file | |
* A subtheme implementation for the basic structure of a single Drupal page. | |
* | |
* Variables: | |
* - logged_in: A flag indicating if user is logged in. | |
* - root_path: The root path of the current page (e.g., node, admin, user). | |
* - node_type: The content type for the current node, if the page is a node. | |
* - head_title: List of text elements that make up the head_title variable. |
This file contains 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
{# | |
/** | |
* @file | |
* Default theme implementation to display a node. | |
* | |
* Available variables: | |
* - node: The node entity with limited access to object properties and methods. | |
* Only method names starting with "get", "has", or "is" and a few common | |
* methods such as "id", "label", and "bundle" are available. For example: | |
* - node.getCreatedTime() will return the node creation timestamp. |
This file contains 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
{# | |
/** | |
* @file | |
* Default theme implementation to display a block. | |
* | |
* Available variables: | |
* - plugin_id: The ID of the block implementation. | |
* - label: The configured label of the block if visible. | |
* - configuration: A list of the block's configuration values. | |
* - label: The configured label for the block. |
This file contains 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
Vagrant.configure("2") do |config| | |
#config.vm.synced_folder "C:\\Users\\jtarleton\\vagrant", "/var/winroot" | |
#config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "192.168.33.10" | |
#config.vm.provision :shell, path: "bootstrap.sh" | |
config.vm.define "weblocal" do |weblocal| | |
weblocal.vm.box = "ubuntu/precise64" | |
weblocal.vm.synced_folder "C:\\vagrantvm\\adid", "/var/www/adid" | |
weblocal.vm.synced_folder "C:\\Users\\jtarleton\\vagrant_www", "/var/winroot" | |
weblocal.vm.synced_folder "C:\\Users\\jtarleton\\vagrant_web\\home\\jtarleton\\tmp", "/home/jtarleton/tmp" | |
weblocal.vm.network "private_network", ip:"192.168.33.10" |
This file contains 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
CREATE DEFINER=`root`@`localhost` FUNCTION `PatIndex`(pattern VARCHAR(255), tblString VARCHAR(255)) RETURNS int(11) | |
DETERMINISTIC | |
BEGIN | |
DECLARE i INTEGER; | |
SET i = 1; | |
myloop: WHILE (i <= LENGTH(tblString)) DO | |
IF SUBSTRING(tblString, i, 1) REGEXP pattern THEN |
NewerOlder