DrupalBin
Submit Code
About
Recent Posts
Fix for Allow HTML in <i> node titles</i> for Drupal 6.x
Template Pre-proccessing
Testing Ubercart donation product
dave's menu screenshot
Code
Modify user profile page theme
Modify user profile page
Fix for Fix for Code
Fix for Code
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
php
simpletest
test
theme
user
views
more tags
Home
›
Xano
›
Recent Posts
Xano
View
Posts
Code
July 5, 2010 - 2:59pm —
Xano
<?php
$binary
=
'/user/local/bin/aspell'
;
exec
(
'which '
.
$binary
,
$output
,
$code
)
;
// $binary is in reality a variable set by an administrator.
Read more
Code
April 30, 2010 - 12:09pm —
Xano
'view modes'
=
>
array
(
'full'
=
>
array
(
'label'
=
>
t
(
'Full node'
)
,
)
,
'teaser'
=
>
array
(
'label'
=
>
t
(
'Teaser'
)
,
)
,
'rss'
=
>
ar
Read more
If it's stupid and it works, it ain't stupid
April 20, 2010 - 2:34pm —
Xano
function
mew_menu_rebuild
(
)
{
// Menu items can appear twice after overwriting them.
Read more
Code
April 6, 2010 - 6:33am —
Xano
index::__set_state
(
array
(
'iid'
=
>
0
,
'title'
=
>
'Website crew'
,
'description'
=
>
'These are all crew members of this website, sorted by their role.'
,
'cache_lifetime'
=
>
'0'
,
'lan
Read more
Code
April 4, 2010 - 7:50pm —
Xano
$foobar
=
array
(
'a'
=
>
array
(
array
(
'#title'
=
>
'foo'
,
)
,
array
(
'#title'
=
>
'bar'
,
)
,
)
,
'b'
=
>
array
(
array
(
'#title'
=
>
'froo'
,
)
,
Read more
Code
April 3, 2010 - 10:37am —
Xano
foreach
(
$layers
as
$layer
)
{
if
(
$layer
-
>
entity_type
==
$entity_type
)
{
if
(
$i
==
count
(
$selectors
)
- 1
)
{
$index
-
>
contexts
[
'page'
]
-
>
browsable_path
=
$s
Read more
Code
April 2, 2010 - 4:16pm —
Xano
.item-
list
ul.index-display-flat ul li.first
{
border:
0
;
}
/* Browsable */
.item-
list
ul.index-display-flat ul li.parent
{
background:
url
(
..
/
..
/
..
/
..
/
..
/
themes
/
garland
/
images
/
menu-collaps
Read more
Code
April 2, 2010 - 1:50pm —
Xano
$index
-
>
contexts
[
'page'
]
-
>
path
=
'browse'
;
$_GET
[
'q'
]
=
'browse/node_type-page'
;
if
(
$path
=
trim
(
ltrim
(
$_GET
[
'q'
]
,
$index
-
>
contexts
[
'page'
]
-
>
path
)
,
'/'
)
)
// $path is 1
trim
(
ltrim
(
$_GET
[
'q'
]
,
Read more
Code
February 23, 2010 - 7:20am —
Xano
$
(
'#index-contexts'
)
.addClass
(
'index-vertical-tabs'
)
.find
(
'fieldset'
)
.hide
(
)
.wrapAll
(
'<div id="index-contexts-panes"></div>'
)
.first
(
)
.show
(
)
;
Code
January 9, 2010 - 11:27am —
Xano
if
(
!
$postcal_code
||
!
db_result
(
db_query
(
"SELECT COUNT(*) FROM {zipcodes} WHERE zip LIKE '%s'"
,
$postal_code
)
)
)
{
form_error
(
$a3
[
'postal_code'
]
,
t
(
'This postal code does not exist.'
)
)
;
}
Code
December 23, 2009 - 9:03am —
Xano
class
indexCallback
{
public
$function
=
NULL
;
public
$file
=
NULL
;
public
$module
=
NULL
;
function
__construct
(
$function
,
$file
=
NULL
,
$module
=
NULL
)
{
$this
-
>
function
=
$functio
Read more
Code
December 7, 2009 - 3:44pm —
Xano
indexLayer Object
(
[
index
]
=
>
index Object
(
[
iid
]
=
>
1
[
title
]
=
>
Test index
[
description
]
=
>
[
layers
]
=
>
Array
(
Read more
Code
December 7, 2009 - 9:13am —
Xano
<?php
class
indexEntity
{
public
$children
=
array
(
)
;
public
$children_count
=
0
;
public
$depth
=
NULL
;
public
$data
=
NULL
;
function
__construct
(
stdClass
$data
,
$depth
)
{
$this
Read more
Code
November 29, 2009 - 4:56pm —
Xano
<?php
function
index_preview
(
index
$index
,
$type
)
{
if
(
$index
-
>
$type
[
'enabled'
]
&&
$index
-
>
$type
[
'mode'
]
)
{
return
$index
-
>
view
(
$type
)
;
}
return
NULL
;
}
/*
$index = index Object
Read more
Code
November 15, 2009 - 4:05pm —
Xano
$form
[
'create'
]
[
'block_mode'
]
=
array
(
'#type'
=
>
'select'
,
'#title'
=
>
t
(
'Display mode'
)
,
'#options'
=
>
$block_modes
,
'#default_value'
=
>
$index
-
>
block_mode
,
'#prefix'
=
>
'
Read more
Code
November 15, 2009 - 4:02pm —
Xano
$form
[
'layer_type_'
.
Read more
Fix for Code
November 11, 2009 - 12:09pm —
Xano
/**
* Get a layer's children.
*
* @param $layers array
* The layers to search.
* @param $parent_lid string
* The layer ID of the layer to get the children for.
*/
Read more
Code
November 11, 2009 - 11:58am —
Xano
/**
* Get a layer's children.
*
* @param $layers array
* The layers to search.
* @param $parent_lid string
* The layer ID of the layer to get the children for.
*/
Read more
Code
November 7, 2009 - 7:34pm —
Xano
function
theme_index_form_add
(
array
$form
)
{
$rows
=
array
(
)
;
for
(
$i
=
0
;
$i
<
$form
[
'layers'
]
[
'layer_count'
]
[
'#value'
]
;
$i
++
)
{
$layer
=
&
$form
[
'layers'
]
[
'selectors'
]
[
$i
]
;
$required
Read more
Code
October 6, 2009 - 7:30pm —
Xano
<?php
for
(
$i
=
$length
[
0
]
- 1,
$j
=
$length
[
1
]
-
1
;
$i
>
= 0,
$j
>
=
0
;
$i
--,
$j
--
)
{
// Check if the current token has changed or not.
if
(
$tokens
[
0
]
[
$i
]
[
'string'
]
!
==
$tokens
[
1
]
[
$j
]
[
'str
Read more
1
2
3
4
5
6
next ›
last »