DrupalBin
Submit Code
About
Recent Posts
Get theme path for use inside views global text fields
Code
Fix for Code
Code
Fix for filefield implementation in an admin page. "An HTTP error 0 occurred. /drupal/?q=filefield/ahah///"
Undefined index:
searching for two different taxonomy terms - get this into views (2 on D6)?
Converting D6 to D7
error on clone same as earlier error on migrate
Reordering ORDER BY elements in selectQuery query
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
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
theme_primary_links
February 4, 2011 - 8:43am —
stborchert
<?php
function
my_primary_links
(
$links
,
$attributes
=
array
(
'class'
=
>
'links primary'
)
)
{
global
$language
;
$output
=
''
;
if
(
count
(
$links
)
>
0
)
{
$output
=
'<ul'
.
Read more
Fix for Fix for Fix for Fix for Fix for Code
February 1, 2011 - 7:02am —
stborchert
<?php
$title
=
t
(
'All about topic !topic'
,
array
(
'!topic'
=
>
$term
-
>
name
)
)
$output
.=
'<div class="more-link more-link-topics">'
;
$output
.=
l
(
$title
,
'taxonomy/term/'
.
Read more
1
2
3
4
5
6
7
8
9
…
next ›
last »