DrupalBin
Submit Code
About
Recent Posts
Code
Code
PHP for default argument
imagefield in other form
autocomplete
Code
Fix for 123
123
user has nodes of type
Code
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
Panels
simpletest
test
theme
user
views
more tags
Home
template.php
Fix for Theme links - print descriptions of primary menu items
November 15, 2009 - 11:06am — Anonymous
<?php
/**
* Return a themed set of links.
* An override of theme_links()
* Modified to use simple text styling instead of HTML & CSS
*
* @see theme_links
*/
function
phptemplate_links
(
$links
primary links
template.php
Read more
Fix for Add JavaScript to only one node
October 15, 2009 - 8:26am — Anonymous
jquery
template.php
theme
Fix for in_array problem
May 29, 2009 - 3:43pm — Anonymous
function
security_list_term_voc
(
$vid
)
{
$items
=
array
(
)
;
$terms
=
taxonomy_get_tree
(
$vid
)
;
foreach
(
$terms
as
$term
)
{
$items
[
]
=
$term
-
>
name
;
}
return
$items
;
}
template.php
Read more
in_array problem
May 29, 2009 - 3:33pm — Anonymous
function
security_list_term_voc
(
$vid
)
{
$items
=
array
(
)
;
$terms
=
taxonomy_get_tree
(
$vid
)
;
foreach
(
$terms
as
$term
)
{
template.php
Read more
phptemplate css code
April 6, 2009 - 11:43am — Anonymous
function
_phptemplate_variables
(
$hook
,
$vars
=
array
(
)
)
{
switch
(
$hook
)
{
case
'page'
:
$css
=
drupal_add_css
(
'sites/all/themes/madebynikki/cmspros.css'
,
'theme'
)
;
5.x
drupal
template.php
theming
Read more
Theme links - print descriptions of primary menu items
March 19, 2009 - 1:39pm — Anonymous
<?php
/**
* Return a themed set of links.
* An override of theme_links()
* Modified to use simple text styling instead of HTML & CSS
*
* @see theme_links
*/
primary links
template.php
Read more
template.php from review site
March 15, 2009 - 1:29am — Anonymous
function
review_preprocess_node
(
&
$vars
,
$hook
)
{
//print_r($vars); exit;
if
(
$vars
[
'type'
]
==
'article'
)
{
$vars
[
'title'
]
=
str_replace
(
'&#1'
,
''
,
$vars
[
'title'
]
)
;
}
}
template.php
User roles as body classes
January 8, 2009 - 10:54am — Anonymous
**
*
Override or insert variables into the page templates.
*
*
@
param
$vars
*
An
array
of variables to pass to the
theme
template.
*
*/
function
phptemplate_preprocess_page
(
&
$vars
)
{
body_classes
template.php
theme
Read more
Example of your custom template variable
January 7, 2009 - 10:02am — Anonymous
function
MIPLANTILLA_preprocess_node
(
&
$vars
,
$hook
)
{
$node
=
$vars
-
>
$node
;
if
(
$node
-
>
type
==
'MITIPODECONTENIDO'
)
{
$vars
[
'texto'
]
=
$node
-
>
field_texto
[
0
]
[
'view'
]
;
}
}
CCK
template.php
Body classes for css
September 27, 2008 - 1:37pm — Anonymous
switch
(
$hook
)
{
case
'page'
:
// Check for logged in or anonymous user
$vars
[
'logged_in'
]
=
(
$user
-
>
uid
>
0
)
?
TRUE
:
FALSE
;
body classes
layout
Panels
template.php
theming
Read more
1
2
3
next ›
last »