DrupalBin
Submit Code
About
Recent Posts
What is this?
display suite field group
Code
Code
Code
Code
Fix for UC Node Checkout - Base Product Title into Token
Code
Import a content type from a file.
Alteration to Trying to alter contact form to allow pre-selecting of cid
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
test
theme
user
views
more tags
Home
›
stborchert
›
Recent Posts
stborchert
View
Posts
uc_checkout_pane_payment override
September 6, 2010 - 10:01am —
stborchert
function
my_uc_checkout_pane_payment
(
$op
,
&
$arg1
,
$arg2
)
{
switch
(
$op
)
{
case
'review'
:
// do custom stuff
default
:
// back to defaults
return
uc_checkout_pane_payme
Read more
view#2
August 31, 2010 - 4:28am —
stborchert
$view
=
new
view;
$view
-
>
name
=
'paged_view'
;
$view
-
>
description
=
'Paged view'
;
$view
-
>
tag
=
''
;
$view
-
>
view_php
=
''
;
$view
-
>
base_table
=
'node'
;
$view
-
>
is_cacheable
=
FALSE
;
$view
-
>
api_versi
Read more
view#1
August 31, 2010 - 4:28am —
stborchert
$view
=
new
view;
$view
-
>
name
=
'nodes'
;
$view
-
>
description
=
'Nodes'
;
$view
-
>
tag
=
''
;
$view
-
>
view_php
=
''
;
$view
-
>
base_table
=
'node'
;
$view
-
>
is_cacheable
=
FALSE
;
$view
-
>
api_version
=
2
;
$
Read more
Term-View
August 14, 2010 - 10:25am —
stborchert
$view
=
new
view;
$view
-
>
name
=
'terms'
;
$view
-
>
description
=
''
;
$view
-
>
tag
=
''
;
$view
-
>
view_php
=
''
;
$view
-
>
base_table
=
'term_data'
;
$view
-
>
is_cacheable
=
FALSE
;
$view
-
>
api_version
=
2
;
$
Read more
Node file gallery
July 7, 2010 - 4:06am —
stborchert
$view
=
new
view;
$view
-
>
name
=
'node_image_gallery'
;
$view
-
>
description
=
''
;
$view
-
>
tag
=
''
;
$view
-
>
view_php
=
''
;
$view
-
>
base_table
=
'node'
;
$view
-
>
is_cacheable
=
FALSE
;
$view
-
>
api_version
Read more
Latest item + title list
July 6, 2010 - 7:48am —
stborchert
$view
=
new
view;
$view
-
>
name
=
'news_block'
;
$view
-
>
description
=
''
;
$view
-
>
tag
=
''
;
$view
-
>
view_php
=
''
;
$view
-
>
base_table
=
'node'
;
$view
-
>
is_cacheable
=
FALSE
;
$view
-
>
api_version
=
2
;
$
Read more
Fix for undpaul - ASCII
July 5, 2010 - 7:21am —
stborchert
<!--
_| _| _|
_| _| _|
_| _|
Read more
undpaul - ASCII
July 5, 2010 - 7:20am —
stborchert
<!--
_| _| _|
_| _| _|
_| _|
Read more
pdf in new window
May 21, 2010 - 7:51am —
stborchert
Drupal.behaviors.pdfNewWindow =
function
(
context
)
{
$
(
"a[@href$=pdf]"
, context
)
.
each
(
function
(
)
{
$
(
this
)
.attr
(
'target'
,
'_blank'
)
;
}
)
;
}
"Show password" for Drupal
April 7, 2010 - 7:42am —
stborchert
/**
* Add a "Show password" checkbox to each password field.
*/
Drupal.
behaviors
.
showPassword
=
function
(
context
)
{
// Create the checkbox.
var
showPassword
=
$
(
'<label><input type="checkb
Read more
checkbox
March 29, 2010 - 6:41am —
stborchert
<?php
$checkbox
=
array
(
'#title'
=
>
t
(
'Empty Log'
)
,
'#value'
=
>
0
,
'#return_value'
=
>
1
,
'#description'
=
>
''
)
;
$output
.=
theme_checkbox
(
array
(
'element'
=
>
$checkbox
)
)
;
?>
links gefummel
March 25, 2010 - 5:15am —
stborchert
/**
* Override node template variables.
*/
function
mymodule_preprocess_node
(
&
$vars
)
{
$node_links
=
isset
(
$vars
[
'node'
]
-
>
links
)
?
Read more
Fix for Code
March 11, 2010 - 7:01am —
stborchert
function
dingens_preprocess_page
(
&
$vars
)
{
if
(
$vars
[
'node'
]
&&
count
(
$vars
[
'node'
]
-
>
taxonomy
)
)
{
$term_names
=
array
(
)
;
foreach
(
$vars
[
'node'
]
-
>
taxonomy
as
$tid
=
>
$term
)
{
$term_
Read more
Code
March 11, 2010 - 6:56am —
stborchert
function
dingens_preprocess_page
(
&
$vars
)
{
if
(
$vars
[
'node'
]
&&
count
(
$vars
[
'node'
]
-
>
taxonomy
)
)
{
$term_names
=
array
(
)
;
foreach
(
$vars
[
'node'
]
-
>
taxonomy
as
$tid
=
>
$term
)
{
$term_
Read more
user has nodes of type
March 10, 2010 - 5:39am —
stborchert
$count_nodes
=
db_result
(
db_query
(
"SELECT COUNT(*) FROM {node} WHERE type = '%s' AND uid = %d"
,
'story'
,
5
)
)
Fix for custom logout
March 2, 2010 - 5:35am —
stborchert
<?php
/**
* Custom logout function to display messages after logout.
*/
function
evlka_logout
(
)
{
global
$user
;
watchdog
(
'user'
,
'Session closed for %name.'
,
array
(
'%name'
=
>
$user
-
>
name
)
)
Read more
Code
March 2, 2010 - 5:33am —
stborchert
<?php
/**
* Custom logout function to display messages after logout.
*/
function
evlka_logout
(
)
{
global
$user
;
watchdog
(
'user'
,
'Session closed for %name.'
,
array
(
'%name'
=
>
$user
-
>
name
)
)
Read more
logout
March 2, 2010 - 4:39am —
stborchert
function
evlka_logout
(
)
{
global
$user
;
watchdog
(
'user'
,
'Session closed for %name.'
,
array
(
'%name'
=
>
$user
-
>
name
)
)
;
// Save messages.
$messages
=
(
isset
(
$_SESSION
[
'messages'
]
)
?
Read more
modul-Zusatz
February 26, 2010 - 5:09am —
stborchert
/**
* Check if a user has a registration node and an event-registration node.
* @param $user
* User object to check.
* @return
* TRUE if the user has such nodes, otherwise FALSE.
*/
Read more
show/hide fields
February 26, 2010 - 3:55am —
stborchert
/**
* Conditionally show/hide the group registration upload field.
*/
Drupal.
behaviors
.
evlkaShowUploadField
=
function
(
)
{
// Initially show/hide the upload field based on the checkbox state.
Read more
1
2
3
4
5
6
7
8
9
…
next ›
last »