DrupalBin
Submit Code
About
Recent Posts
Problemas com o submit
Fix for extranet
extranet
Fix for drush make snippet for apachesolr library
Fix for Embedding Google Maps, use object instead of iframe with XHTML Strict
Code
Serializable closures
Closures in menu item arguments
dpr($content['field_headshot'])
Fix for Git push error
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
›
Xano
›
Recent Posts
Xano
View
Posts
Code
April 30, 2012 - 5:24pm —
Xano
<?php
_menu_translate
(
)
causes an error on line 776 that says
$path_map
[
7
]
does not exist, but why?
// $link_map
array
(
0
=
>
'admin'
,
1
=
>
'config'
,
2
=
>
'services'
,
3
=
>
'payment'
Read more
Code
April 24, 2012 - 8:39am —
Xano
<?php
// Create/build an invoice and return it.
function
createInvoice
(
Payment
$payment
,
$contact_id
)
}
// Build the invoice.
mynameisbartmoneybird_include
(
'Contact'
)
;
$invoic
Read more
Code
February 6, 2012 - 3:35am —
Xano
<?php
$data
[
'example_table'
]
[
'plain_text_field'
]
=
array
(
'sort'
=
>
array
(
'handler'
=
>
'views_handler_sort'
,
'custom property 1'
=
>
'2'
,
'foo'
=
>
'bar'
,
)
,
)
;
Code
February 6, 2012 - 3:00am —
Xano
<?php
// The following code is from a hook_views_data_alter() implementation and adds a relationship to data already exposed in Entity API's hook_views_data().
$data
[
'payment'
]
[
'pid'
]
[
'relations
Read more
Code
December 16, 2011 - 9:50pm —
Xano
// $payment is a Payment object and it's default (init) status is NEW, then moves to PENDING, and it ends up in COMPLETED, CANCELLED or EXPIRED.
Read more
Code
November 22, 2011 - 7:30pm —
Xano
<?php
$element
[
'pmid'
]
=
array
(
'#type'
=
>
'select'
,
'#title'
=
>
isset
(
$element
[
'#title'
]
)
?
Read more
Code
October 30, 2011 - 4:18pm —
Xano
<?php
/**
* @file
* Pseudo code demonstrating the workflow of setting a payment's status.
*/
/**
* A Payment.
*/
class
Payment
{
/**
* The current payment status.
*
*
Read more
Code
September 2, 2011 - 2:59pm —
Xano
SELECT
users.uid
AS
uid
,
users.picture
AS
users_picture
,
users.name
AS
users_name
,
users.mail
AS
users_mail
,
node_users.title
AS
node_users_title
,
node_users.nid
AS
node_users_nid
Read more
Code
April 24, 2011 - 7:20pm —
Xano
/**
* Build XML from a JSON object.
*
* @param data object
* @param depth integer
* Optional integer used internally to keep track of the amount of indentation.
*
* @re
Read more
Code
April 17, 2011 - 2:53pm —
Xano
function
idealadmin_transaction_list
(
)
{
global
$pager_page_array
,
$pager_total
,
$pager_total_items
;
// Build the pager.
Read more
Code
April 7, 2011 - 8:00pm —
Xano
<?php
function
mew_item_type
(
$item
)
{
$item_types
= mew_item_types
(
)
;
$types
=
array
(
)
;
foreach
(
mew_item_types
(
)
as
$type
=
>
$title
)
{
if
(
$type
&
$item
[
'type'
]
)
{
$types
[
]
=
$t
Read more
Code
April 6, 2011 - 5:41pm —
Xano
version
:1
:debug:clean Attempting ln -sf
/
opt
/
local
/
var
/
macports
/
build
/
_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_db46
/
work
/
opt
/
local
/
var
/
macports
/
sources
/
rsync.macpo
Read more
Code
February 28, 2011 - 11:05am —
Xano
<?php
t
(
'this !is a @string'
,
array
(
'@string'
=
>
'Foobar'
,
)
)
;
// I need "this is a @string" and "@string" and I need to know these two belong together.
t
(
'this !is a @string'
,
array
(
'
Read more
Code
January 19, 2011 - 4:36pm —
Xano
<?php
function
render
(
)
{
if
(
!
$this
-
>
hidden
)
{
foreach
(
$this
-
>
pre_render_callbacks
as
$callback
)
{
call_user_func
(
$callback
,
$this
)
;
}
// Allow pre_render to ab
Read more
Code
January 14, 2011 - 7:40pm —
Xano
function
trevi_defuse_pcre
(
&
$string
,
$pattern_split
,
$pattern_match
)
{
$matches
=
preg_split
(
$pattern_split
,
$string
,
NULL
, PREG_SPLIT_DELIM_CAPTURE
|
PREG_SPLIT_OFFSET_CAPTURE
)
;
$string
=
''
;
Read more
Code
December 16, 2010 - 4:07pm —
Xano
#
# DocumentRoot: The directory out of which you will serve your
# documents.
Read more
Code
December 16, 2010 - 9:22am —
Xano
#
# This is the main Apache HTTP server configuration file.
Read more
Fix for Code
December 3, 2010 - 12:31pm —
Xano
$new
=
TRUE
;
if
(
$sequences
[
0
]
)
{
$key
=
count
(
$sequences
[
0
]
)
-
1
;
$last
=
array
(
&
$sequences
[
0
]
[
$key
]
,
&
$sequences
[
1
]
[
$key
]
)
;
if
(
$last
[
0
]
-
>
position
+
$last
[
0
]
-
Read more
Code
December 3, 2010 - 12:26pm —
Xano
if
(
$sequences
[
0
]
&&
$key
=
count
(
$sequences
[
0
]
)
- 1
&&
$last
=
array
(
&
$sequences
[
0
]
[
$key
]
,
&
$sequences
[
1
]
[
$key
]
)
&&
$last
[
0
]
-
>
position
+
$last
[
0
]
-
>
length
+ 1 ==
$i
&&
Read more
Fix for Code
November 23, 2010 - 8:04am —
Xano
Drupal.
behaviors
.
dutchGuideGmap
=
function
(
context
)
{
var
directionsService
=
new
google.
maps
.
DirectionsService
(
)
;
var
directionsDisplay
=
new
google.
maps
.
DirectionsRenderer
(
)
;
// Create th
Read more
1
2
3
4
5
6
7
8
next ›
last »