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
›
stborchert
›
Recent Posts
stborchert
View
Posts
field_get_items helper
April 30, 2012 - 10:52am —
stborchert
function
_field_get_value
(
$entity_type
,
$entity
,
$fieldname
,
$default
=
FALSE
,
$key
=
'value'
)
{
// Get the field.
$field_value
= field_get_items
(
$entity_type
,
$entity
,
$fieldname
)
;
// Return
Read more
Views Date-Filter
March 26, 2012 - 10:30am —
stborchert
vorher
(
6.x-3.x-dev von
1313930224
(
"21.08.2011 12:37:04"
)
)
:
-----
SELECT
node.nid
AS
nid,
node.title
AS
node_title,
node.language
AS
node_language,
node_data_field_event_dat
Read more
View: Quiz results
October 8, 2011 - 8:10am —
stborchert
$view
=
new
view;
$view
-
>
name
=
'quiz_results'
;
$view
-
>
description
=
''
;
$view
-
>
tag
=
''
;
$view
-
>
base_table
=
'quiz_node_properties'
;
$view
-
>
human_name
=
'Quiz results'
;
$view
-
>
core
=
6
;
$view
-
Read more
für Elise
August 24, 2011 - 5:36am —
stborchert
/**
* Implementation of hook_install().
*/
function
imagefield_description_cropfix_install
(
)
{
db_query
(
'UPDATE {system} SET weight = -1 WHERE name = "%s"'
,
'imagefield_description_cropfix'
)
;
Read more
Fix for image
August 19, 2011 - 10:42am —
stborchert
// Get the recipes Image
$image
=
$node
-
>
field_recipes_picture
[
0
]
;
// Load default image.
$themed_image
=
theme
(
'image'
,
$theme_path
.
'/images/search-result-recipe-default.png'
,
're
Read more
image
August 19, 2011 - 10:40am —
stborchert
// Get the recipes Image
$image
=
$node
-
>
field_recipes_picture
[
0
]
;
// Load default image.
$themed_image
=
theme
(
'image'
,
$theme_path
.
'/images/search-result-recipe-default.png'
,
'recipe image'
)
;
$
Read more
schema
August 12, 2011 - 3:43am —
stborchert
function
msnf_schema
(
)
{
$schema
[
'msnf_step'
]
=
array
(
'export'
=
>
array
(
)
,
'fields'
=
>
array
(
'step_type'
=
>
array
(
'type'
=
>
'varchar'
,
'length'
Read more
Fix for Code
July 15, 2011 - 2:16am —
stborchert
drupal_add_js
(
'(function ($) {
$("#waterwheel-carousel-horizon").waterwheelCarousel({
startingWaveSeparation: 0,
centerOffset: 30,
startingItemSeparation: 150,
itemSeparationFac
Read more
search template
July 6, 2011 - 9:53am —
stborchert
<!-- Ingredient search accordion block -->
<h2>
<?php
print
$header_ingredient_search
;
?>
</h2>
<div class="accordion-page ingredient-search clear-block">
<?php
$cur
=
0
;
wh
Read more
Fix for Code
July 6, 2011 - 8:19am —
stborchert
// in tmrc_search_forum.module
/**
* Implementation of hook_menu_alter().
*/
function
tmrc_solr_forum_menu_alter
(
&
$items
)
{
$items
[
'search/tmrc_solr_forum/%menu_tail'
]
[
'#weight'
]
=
3
;
}
/
Read more
Code
July 6, 2011 - 6:21am —
stborchert
// in tmrc_search_forum.module
function
tmrc_search_forum_menu_link_alter
(
&
$item
,
$menu
)
{
if
(
$item
[
'link_path'
]
==
'search/tmrc_solr_forum/%menu_tail'
)
{
$item
[
'#weight'
]
=
1
;
}
}
//
Read more
Fix for Fix for Code
July 5, 2011 - 5:28am —
stborchert
function
ww_events_install
(
)
{
// Get vocabulary id by known uuid.
$vid_1
=
tmrc_controller_get_vid_by_uuid
(
'6759fa82-5620-11e0-82ef-7635a7a74f94'
)
;
$vid_2
=
tmrc_controller_get_vid_by_uuid
(
'
Read more
Fix for Code
July 5, 2011 - 5:19am —
stborchert
function
ww_events_install
(
)
{
// Get vocabulary id by known uuid.
$options
=
array
(
tmrc_controller_get_vid_by_uuid
(
'6759fa82-5620-11e0-82ef-7635a7a74f94'
)
=>
1
,
tmrc_controller_get_v
Read more
Fix for Code
June 14, 2011 - 4:02am —
stborchert
/**
* Computed code for the field_event_order_link.
*/
function
computed_field_field_event_order_link_compute
(
&
$entity_field
,
$entity_type
,
$entity
,
$field
,
$instance
,
$langcode
,
$items
)
{
$
Read more
Fix for ckeditor settings
June 7, 2011 - 9:10am —
stborchert
<?php
function
ckeditor_settings_wysiwyg_editor_settings_alter
(
&
$settings
,
$context
)
{
if
(
$context
[
'profile'
]
-
>
editor
==
'ckeditor'
)
{
// disable 'spell-check-as-you-type' option by default
Read more
hook_views_default_views_alter
April 9, 2011 - 5:49pm —
stborchert
function
guestbook_views_default_views_alter
(
&
$views
)
{
if
(
isset
(
$views
[
'guestbook'
]
)
)
{
// Set items per page.
$items_per_page
=
0
;
if
(
isset
(
$views
[
'guestbook'
]
-
>
display
[
'page_gue
Read more
Fix for Fix for js
April 8, 2011 - 10:41am —
stborchert
<?php
drupal_add_js
(
"(function ($) {
$('#imageID').click(function() {
$('#ytapiplayer2').show();
$('#imageID').hide();
});
})(jQuery);"
,
array
(
'type'
=
>
'inline'
,
'scope'
=
>
'footer
Read more
Fix for js
April 8, 2011 - 10:31am —
stborchert
<?php
drupal_add_js
(
"(function ($) {
$('#imageID').click(function() {
$('#ytapiplayer2').show();
$('#imageID').hide();
});
})(jQuery);"
,
'inline'
,
'footer'
)
;
?>
js
April 8, 2011 - 10:25am —
stborchert
(
function
(
$
)
{
$
(
'#imageID'
)
.click
(
function
(
)
{
$
(
'#ytapiplayer2'
)
.show
(
)
;
$
(
'#imageID'
)
.hide
(
)
;
}
)
;
}
)
(
jQuery
)
;
Fix for Code
March 29, 2011 - 5:10am —
stborchert
/**
* Transforms selected form elements into slider widgets.
*/
Drupal.behaviors.mööööpSlider =
function
(
context
)
{
var
sliderElements =
{
'difficulty'
:
'recipes-difficulty-value'
,
'
Read more
1
2
3
4
5
6
7
8
9
…
next ›
last »