DrupalBin
Submit Code
About
Recent Posts
Failed relationship
7 hours 8 min
ago
Fix for Code
8 hours 22 min
ago
Fix for Code
8 hours 26 min
ago
Fix for Code
8 hours 45 min
ago
more
Tags
CCK
fapi
jquery
menu
module
Panels
php
simpletest
template.php
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
block
call template file, pass variables
August 5, 2008 - 11:41pm — Anonymous
<?php
$text
= theme
(
'apply_template'
,
$data
)
;
return
$text
;
function
theme_apply_template
(
$data
)
{
ob_start
(
)
;
include
path_to_theme
(
)
.
'/my-block.tpl.php'
;
block
template
theme
Read more
Some code to search flickr for images
July 2, 2008 - 10:18am — Anonymous
function
_optotrip_block_flickr
(
)
{
$termtext
= _optotrip_get_block_context
(
)
;
if
(
$termtext
==
''
)
{
return
NULL
;
}
$starttime
=
microtime
(
TRUE
)
;
lightbox2_add_files
(
)
;
block
drupal
flickr
Read more
block visibility code doesn't work in all regions
February 28, 2008 - 3:04pm — Anonymous
if
(
drupal_is_front_page
(
)
==
TRUE
)
{
return
FALSE
;
}
else
{
return
TRUE
;
}
block
regions
theming
Blog author information
February 7, 2008 - 6:39pm — Anonymous
<?php
// $Id$
/**
* @file
* Implements block for showing archives, user picture, and links for blog sidebars.
*/
function
blog_sidebar_block
(
$op
=
'list'
,
$delta
=
0
,
$edit
=
array
(
)
)
{
block
module
visibility
Read more