DrupalBin
Submit Code
About
Recent Posts
Problemas com o submit
Fix for extranet
extranet
Fix for drush make snippet for apachesolr library
Fix for Embedding Google Maps, use object instead of iframe with XHTML Strict
Code
Serializable closures
Closures in menu item arguments
dpr($content['field_headshot'])
Fix for Git push error
more
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Log in using OpenID
Cancel OpenID login
Create new account
Request new password
Tags
CCK
drupal
fapi
jquery
menu
module
php
simpletest
taxonomy
test
theme
views
more tags
Home
›
seanr
›
Recent Posts
seanr
View
Posts
Doesn't seem to do anything
April 2, 2012 - 2:59pm —
seanr
function
hfc_user_fboauth_user_presave
(
&
$edit
,
$fbuser
)
{
// Save the user's location into a field provided by Profile module.
//watchdog('hfc_user', print_r($fbuser, 1));
if
(
isset
(
$fbuser
-
>
Read more
SyntaxError: Unexpected token (
March 1, 2012 - 12:10pm —
seanr
(
function
(
$
(
'.form-type-uc-quantity .form-text'
)
.
keypress
(
function
(
e
)
{
if
(
e.
which
==
13
)
return
false
;
}
)
)
(
jQuery
)
;
Empty $node->type
December 14, 2011 - 3:24pm —
seanr
//load existing node, if any
$series_nid
=
db_result
(
db_query
(
'SELECT cts.nid FROM {content_type_series} cts WHERE cts.field_series_code_value = %d'
,
$fields
[
2
]
)
)
;
if
(
!
empty
(
$series_nid
Read more
Code
December 6, 2011 - 5:54pm —
seanr
<?php
/**
* use hook_apachesolr_query_prepare to add the fuzzy operator (~) to the query
*/
function
aavid_search_apachesolr_query_prepare
(
$query
)
{
$param
=
$query
-
>
getParam
(
'q'
)
;
if
(
(
st
Read more
Malfunctioning batch API - outputs homepage HTML in error message
November 23, 2011 - 6:04pm —
seanr
<?php
function
brproductimport_upload_form_submit
(
$form
,
&
$form_state
)
{
$dir
=
file_directory_path
(
)
.
batch api
Drupal 6
error
unexpected output
Read more
Can't get sustainability/report/download/%hash to load it's callback, returns sustainability/report/download's instead
November 8, 2011 - 1:10pm —
seanr
/**
* All below is for the secure report download.
*/
function
crown_sustainability_menu
(
)
{
$items
[
'admin/settings/sustainability'
]
=
array
(
'title'
=
>
'Sustainability Report'
,
'des
debug menu
hook_menu
Read more
Code
October 27, 2011 - 9:39pm —
seanr
$view
=
new
view;
$view
-
>
name
=
'books'
;
$view
-
>
description
=
''
;
$view
-
>
tag
=
'default'
;
$view
-
>
base_table
=
'node'
;
$view
-
>
human_name
=
'Books'
;
$view
-
>
core
=
7
;
$view
-
>
api_version
=
'3.0-alp
Read more
Code
August 22, 2011 - 5:51pm —
seanr
function
gillan_node_submitted
(
$node
)
{
$format
=
'F j, Y'
;
$date
=
format_date
(
$node
-
>
created
,
'custom'
,
$format
)
;
return
$date
;
}
Fix for Print full menu tree in page.tpl.php
August 10, 2011 - 2:42pm —
seanr
In page.tpl.php:
<?php
if
(
isset
(
$primary_links
)
)
print
menu_tree
(
'primary-links'
)
;
?>
CSS for menu and dropdowns:
#navigation {margin-top:0; height:36px;}
#navigation ul {position:relative;
Read more
Print full menu tree in page.tpl.php
August 10, 2011 - 2:40pm —
seanr
<?php
if
(
isset
(
$primary_links
)
)
print
menu_tree
(
'primary-links'
)
;
?>
Code
February 1, 2011 - 4:54pm —
seanr
foreach
(
$codes
as
$code_name
=
>
$code_value
)
{
if
(
$code_value
!
=
'0'
)
{
$volunteer_id
= crmngp_crm_volunteer_save
(
$contact_id
,
$code_value
,
$notes
)
;
//$notes = '
Read more
Code
February 1, 2011 - 4:52pm —
seanr
$transforms
=
array
(
'contact_id'
=
>
'contactID'
,
'first_name'
=
>
'firstName'
,
'last_name'
=
>
'lastName'
,
'middle_name'
=
>
'middleName'
,
'prefix'
=
>
Read more
Code
February 1, 2011 - 4:40pm —
seanr
if
(
module_exists
(
'crmapi'
)
&&
!
empty
(
$form_state
[
'values'
]
[
'first_name'
]
)
)
{
$contact
[
'first_name'
]
=
$form_state
[
'values'
]
[
'first_name'
]
;
$contact
[
'last_name'
]
=
$form_state
[
'values'
]
[
'l
Read more
validate and submit handlers don't get called
December 29, 2010 - 4:56pm —
seanr
<?php
// $Id$
function
connecticut_form_crmapi_contact_form_alter
(
&
$form
,
$form_state
)
{
if
(
$form
[
'section'
]
[
'#value'
]
==
'contribute'
)
{
$form
[
'employment'
]
[
'ct_status'
]
=
array
(
Read more
Fix for Code
December 3, 2010 - 5:09pm —
seanr
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^decirlaverdad\.org
RewriteCond %{HTTP_HOST} ^www\.decirlaverdad\.org
RewriteCond %{HTTP_HOST} ^speaktruth\.org
Re
Read more
Code
December 3, 2010 - 4:06pm —
seanr
RewriteCond %{HTTP_HOST} ^decirlaverdad\.org
RewriteCond %{HTTP_HOST} ^www\.decirlaverdad\.org
RewriteCond %{HTTP_HOST} ^speaktruth\.org
RewriteCond %{HTTP_HOST} ^www\.speaktruth\.org
Re
Read more
Code
October 18, 2010 - 3:00pm —
seanr
$view
=
new
view;
$view
-
>
name
=
'grants_ope_trio_state_view'
;
$view
-
>
description
=
''
;
$view
-
>
tag
=
'trio'
;
$view
-
>
view_php
=
''
;
$view
-
>
base_table
=
'node'
;
$view
-
>
is_cacheable
=
FALSE
;
$view
-
Read more
Attempting to change search button to an image
September 16, 2010 - 11:44am —
seanr
function
ngp_preprocess_search_block_form
(
&
$variables
)
{
$variables
[
'form'
]
[
'search_block_form'
]
[
'#title'
]
=
NULL
;
$variables
[
'form'
]
[
'search_block_form'
]
[
'#value'
]
=
'Search this site'
;
$var
Read more
Code
September 7, 2010 - 11:32am —
seanr
[ngpadmin@ewhserver393 html]$ php index.php
PHP Notice: Undefined index: REMOTE_ADDR in /var/www/html/drupal7.com/html/inc
ludes/bootstrap.inc on line 2535
Notice: Undefined index: REMOTE_ADDR
Read more
Code
September 7, 2010 - 11:30am —
seanr
[ngpadmin@ewhserver393 html]$ php index.php
PHP Notice: Undefined index: REMOTE_ADDR in /var/www/html/drupal7.com/html/inc
ludes/bootstrap.inc on line 2535
Notice: Undefined index: REMOTE_ADDR
Read more
1
2
next ›
last »