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
#!/bin/bash | |
# This script will run a series of ab benchmarks and print them out to a files directory in a drupal site with the -w | |
# flag for easy web browser reading. | |
# Example usage: | |
# ./thisScript.sh -u 'ourpassword:todev' -d http://somedomain.com -o dir/towrite/to -f 'index/ something.php /content/node/xxxx' | |
while getopts u:d:o:f: option | |
do | |
case "${option}" | |
in |
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 | |
/** | |
* Implements hook_node_view(). | |
*/ | |
function sponsor_school_page_node_view($node, $view_mode, $langcode) { | |
switch ($node) { | |
case $node->nid == '217308': | |
if(user_is_logged_in()) { |
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 | |
function taoti_javascript_menu() { | |
$items['slider/%/news-embed'] = array( | |
'page callback' => 'taoti_javascript_get_news_view_embed', | |
'delivery callback' => 'taoti_javascript_get_embed_wrapper', | |
'page arguments' => array(1), | |
'access callback' => TRUE, | |
); | |
$items['slider/%/topic-embed'] = array( |
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
(function ($) { | |
Drupal.behaviors.taoti_javascript = { | |
attach: function (context, settings) { | |
$('.view-display-id-our_work_slider .views-field-nothing p').click( function () { | |
var tid = $(this).attr('data-tid'); | |
var descURL = 'slider/' + tid + '/topic-embed'; | |
var newsURL = 'slider/' + tid + '/news-embed'; | |
$('#our-work-taxonomy-desc').empty(); |
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 | |
/** | |
* Created by JetBrains PhpStorm. | |
* User: richallen | |
* Date: 9/25/13 | |
* Time: 11:26 AM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
$tidList = array(); |
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 | |
function custom_blocks_block_info() { | |
$blocks['left_social'] = array( | |
// info: The name of the block. | |
'info' => t('Social Header Left'), | |
); | |
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
/* Slider */ | |
.jcarousel-skin-cssrc .jcarousel-clip-horizontal { background: #4F0F0F; } | |
/* Link */ | |
.html a, ul.primary li.active a, .event-date-styled { color: #4F0F0F; } | |
.html a:visited, ul.primary li a:visited { color: #4F0F0F; } | |
.html a:hover, ul.primary li a:hover { color: #861919; } | |
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
function sponsor_school_page_menu() { | |
$items['add/teacher/%'] = array( | |
'title' => t('Add a Teacher'), | |
'page callback' => 'drupal_get_form', | |
'page arguments' => array('sponsor_school_page_add_teacher_form', array(1)), | |
'access callback' => TRUE, | |
); | |
$items['add/point-of-contact/%'] = array( | |
'title' => t('Add a Point of Contact'), | |
'page callback' => 'sponsor_school_page_add_poc_form', |
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 | |
function mymodule_node_view($node){ | |
switch($node) { | |
case $node->nid == 'the node id here': | |
$node['someLogicalNameHere'] = array ( | |
'#type' => 'markup', | |
'#markup' => views_embed_view($viewName, $display_name); | |
//to get view name click on edit in views_ui and select your display, the url will have the following format: | |
// admin/structure/views/view/$viewName/edit/$display_name | |
//if you want to change the $display_name click advanced in the view and look for machine name about halfway down. Care |
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 | |
$last_page_visited = $_SERVER['HTTP_REFERER']; | |
if(preg_match('/order-step1/', $last_page_visited) && preg_match('/cart/', current_path())) | |
{ | |
drupal_goto($path = 'order-step2'); | |
} | |
?> |
OlderNewer