seanr

seanr's picture

Doesn't seem to do anything

  1. function hfc_user_fboauth_user_presave(&$edit, $fbuser) {
  2.   // Save the user's location into a field provided by Profile module.
  3.   //watchdog('hfc_user', print_r($fbuser, 1));
  4.   if (isset($fbuser->
seanr's picture

SyntaxError: Unexpected token (

  1. (function ($('.form-type-uc-quantity .form-text').keypress(function(e){
  2.     if ( e.which == 13 ) return false;
  3. }))(jQuery);
seanr's picture

Empty $node->type

  1.     //load existing node, if any
  2.     $series_nid = db_result(db_query('SELECT cts.nid FROM {content_type_series} cts WHERE cts.field_series_code_value = %d', $fields[2]));
  3.     if (!empty($series_nid
seanr's picture

Code

  1. <?php
  2. /**
  3.  * use hook_apachesolr_query_prepare to add the fuzzy operator (~) to the query
  4.  */
  5. function aavid_search_apachesolr_query_prepare($query) {
  6.   $param = $query->getParam('q');
  7.   if ((st
seanr's picture

Malfunctioning batch API - outputs homepage HTML in error message

  1. <?php
  2. function brproductimport_upload_form_submit($form, &$form_state) {
  3.   $dir = file_directory_path() .
seanr's picture

Can't get sustainability/report/download/%hash to load it's callback, returns sustainability/report/download's instead

  1. /**
  2.  * All below is for the secure report download.
  3.  */
  4. function crown_sustainability_menu() {
  5.   $items['admin/settings/sustainability'] = array(
  6.     'title' => 'Sustainability Report',
  7.     'des
seanr's picture

Code

  1. $view = new view;
  2. $view->name = 'books';
  3. $view->description = '';
  4. $view->tag = 'default';
  5. $view->base_table = 'node';
  6. $view->human_name = 'Books';
  7. $view->core = 7;
  8. $view->api_version = '3.0-alp
seanr's picture

Code

  1. function gillan_node_submitted($node) {
  2.   $format = 'F j, Y';
  3.   $date = format_date($node->created, 'custom', $format);
  4.  
  5.   return $date;
  6. }
seanr's picture

Fix for Print full menu tree in page.tpl.php

  1. In page.tpl.php:
  2.  
  3. <?php if (isset($primary_links)) print menu_tree('primary-links'); ?>
  4.  
  5. CSS for menu and dropdowns:
  6.  
  7. #navigation {margin-top:0; height:36px;}
  8. #navigation ul {position:relative;
seanr's picture

Print full menu tree in page.tpl.php

  1. <?php if (isset($primary_links)) print menu_tree('primary-links'); ?>
seanr's picture

Code

  1.       foreach ($codes as $code_name => $code_value) {
  2.         if ($code_value != '0') {
  3.           $volunteer_id = crmngp_crm_volunteer_save($contact_id, $code_value, $notes);
  4.           //$notes = '
seanr's picture

Code

  1.   $transforms = array(
  2.     'contact_id'     => 'contactID',
  3.     'first_name'     => 'firstName',
  4.     'last_name'      => 'lastName',
  5.     'middle_name'    => 'middleName',
  6.     'prefix'         =>
seanr's picture

Code

  1.   if (module_exists('crmapi') && !empty($form_state['values']['first_name'])) {
  2.     $contact['first_name'] = $form_state['values']['first_name'];
  3.     $contact['last_name'] = $form_state['values']['l
seanr's picture

validate and submit handlers don't get called

  1. <?php
  2. // $Id$
  3.  
  4. function connecticut_form_crmapi_contact_form_alter(&$form, $form_state) {
  5.         if ($form['section']['#value'] == 'contribute') {
  6.          
  7.     $form['employment']['ct_status'] = array(
  8.  
seanr's picture

Fix for Code

  1. <IfModule mod_rewrite.c>
  2.   RewriteEngine on
  3.  
  4.   RewriteCond %{HTTP_HOST} ^decirlaverdad\.org
  5.   RewriteCond %{HTTP_HOST} ^www\.decirlaverdad\.org
  6.   RewriteCond %{HTTP_HOST} ^speaktruth\.org
  7.   Re
seanr's picture

Code

  1.   RewriteCond %{HTTP_HOST} ^decirlaverdad\.org
  2.   RewriteCond %{HTTP_HOST} ^www\.decirlaverdad\.org
  3.   RewriteCond %{HTTP_HOST} ^speaktruth\.org
  4.   RewriteCond %{HTTP_HOST} ^www\.speaktruth\.org
  5.   Re
seanr's picture

Code

  1. $view = new view;
  2. $view->name = 'grants_ope_trio_state_view';
  3. $view->description = '';
  4. $view->tag = 'trio';
  5. $view->view_php = '';
  6. $view->base_table = 'node';
  7. $view->is_cacheable = FALSE;
  8. $view-
seanr's picture

Attempting to change search button to an image

  1. function ngp_preprocess_search_block_form(&$variables) {
  2.   $variables['form']['search_block_form']['#title'] = NULL;
  3.   $variables['form']['search_block_form']['#value'] = 'Search this site';
  4.   $var
seanr's picture

Code

  1. [ngpadmin@ewhserver393 html]$ php index.php
  2. PHP Notice:  Undefined index:  REMOTE_ADDR in /var/www/html/drupal7.com/html/inc
  3. ludes/bootstrap.inc on line 2535
  4.  
  5. Notice: Undefined index:  REMOTE_ADDR
seanr's picture

Code

  1. [ngpadmin@ewhserver393 html]$ php index.php
  2. PHP Notice:  Undefined index:  REMOTE_ADDR in /var/www/html/drupal7.com/html/inc
  3. ludes/bootstrap.inc on line 2535
  4.  
  5. Notice: Undefined index:  REMOTE_ADDR
Syndicate content