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
Tags
CCK
drupal
fapi
jquery
menu
module
php
simpletest
taxonomy
test
theme
views
more tags
Home
›
Recent Posts
All
Problemas com o submit
May 22, 2012 - 2:14pm — Anonymous
$items
[
'admin/structure/taxonomy/pib_categories/grupos'
]
=
array
(
'title'
=
>
t
(
'Adicionar Grupo/Subgrupo'
)
,
'page callback'
=
>
'pactum_extranet_add_group_subgroup_page'
,
'access callback
Code
Read more
Fix for extranet
May 22, 2012 - 1:22pm — Anonymous
<?php
$items
[
'admin/structure/taxonomy/pib_categories/grupos'
]
=
array
(
'title'
=
>
t
(
'Adicionar Grupo/Subgrupo'
)
,
// 'page callback' => 'drupal_get_form',
'page callback'
=
>
'pactum
Code
Read more
extranet
May 22, 2012 - 1:16pm — Anonymous
<?php
$items
[
'admin/structure/taxonomy/pib_categories/grupos'
]
=
array
(
'title'
=
>
t
(
'Adicionar Grupo/Subgrupo'
)
,
'page callback'
=
>
'drupal_get_form'
,
'page arguments'
=
>
array
(
'p
Code
Read more
Fix for drush make snippet for apachesolr library
May 22, 2012 - 11:54am —
Sheppard
; "Solr PHP" library for the Drupal contrib module "Apache Solr Search Integration" (apachesolr).
libraries
[
solrphpclient
]
[
destination
]
=
modules/contrib/apachesolr
libraries
[
solrphpclient
]
[
director
Read more
Fix for Embedding Google Maps, use object instead of iframe with XHTML Strict
May 22, 2012 - 8:33am — Anonymous
<
object id=
"map"
type=
"text/html"
data=
"
http://maps.google.com/maps?q=cyber+electronik&hl=en&sll=38.574834,-121.474957&sspn=0.006295,0.006295&ie=UTF8&view=map&cid=14202640731
Read more
Code
May 22, 2012 - 5:32am — Anonymous
function
drop_preprocess_page
(
&
$variables
)
{
if
(
$variables
[
'node'
]
->
type
=
"property_manager_registration"
)
{
$variables
[
'template_files'
]
[
]
=
"page--node--property-manager-registration"
;
}
Read more
Serializable closures
May 21, 2012 - 6:07pm —
mikey_p
<?php
class
SuperClosure
{
protected
$closure
=
NULL
;
protected
$reflection
=
NULL
;
protected
$code
=
NULL
;
protected
$used_variables
=
array
(
)
;
public
function
__construct
(
$funct
Read more
Closures in menu item arguments
May 21, 2012 - 5:54pm —
mikey_p
<?php
$items
[
'thing/new'
]
=
array
(
'title'
=
>
'New thing'
,
'page callback'
=
>
'my_thing_form'
,
'page arguments'
=
>
array
(
function
(
)
{
return
new
MyThing;
}
)
,
)
;
$items
[
'thing/%mything'
Read more
dpr($content['field_headshot'])
May 21, 2012 - 4:53pm — Anonymous
Array
(
[
#theme] => field
[
#weight] => 3
[
#title] => Headshot
[
#access] => 1
[
#label_display] => hidden
[
#view_mode] => full
[
#language] => und
[
#field_name] =
Read more
Fix for Git push error
May 21, 2012 - 3:52pm — Anonymous
ben
@
ubuntu:~
/
code
/
digio$ git push
Counting objects:
21
, done.
Compressing objects:
100
%
(
13
/
13
)
, done.
Writing objects:
100
%
(
14
/
14
)
,
8.79
KiB, done.
Total
14
(
delta
5
)
, reused
0
(
delta
0
)
error:
Read more
Проверка
May 21, 2012 - 3:50pm — Anonymous
<?php
require_once
(
'theme-settings.php'
)
;
/**
* Initialize theme settings
*/
global
$theme_key
;
if
(
db_is_active
(
)
)
{
fusion_core_initialize_theme_settings
(
$theme_key
)
;
}
/**
Read more
Code
May 21, 2012 - 2:15pm — Anonymous
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="
<?php
print
$language
-
>
language
?>
"
Read more
$item['title'] = $item['title'];
May 21, 2012 - 1:34pm — Anonymous
starting on line 94, culprit is
$item
[
'title'
]
=
$item
[
'title'
]
;
foreach
(
$items
as
$item
)
{
// Prepare the item:
foreach
(
$item
as
$key
=
>
$value
)
{
$item
[
$key
]
=
trim
(
$value
)
;
Read more
Loading specific field
May 21, 2012 - 1:07pm — Anonymous
$n
=
array
(
array
(
'nid'
=
>
1910
)
,
array
(
'nid'
=
>
1690
)
,
)
;
$formats
=
array
(
)
;
foreach
(
$n
as
$f
)
{
$e
=
new
stdClass
(
)
;
$e
-
>
id
=
$f
[
'nid'
]
;
$e
-
>
bundle
=
'bundle_name'
Read more
expire give non-aliased paths
May 21, 2012 - 7:49am — Anonymous
if
your site have the non aliased
url
no-accesible
(
or redirect with
global
redirect
)
, varnish never will have a hit on these urls
dity patch
for
expire:
expire
varnish
Read more
Fix for Code
May 21, 2012 - 5:33am — Anonymous
# dig asociaciondrupal.es A
; <<>> DiG 9.7.3 <<>> asociaciondrupal.es A
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8766
;; flags: qr rd ra; QUERY
Read more
Code
May 21, 2012 - 5:27am — Anonymous
dig +trace asociaciondrupal.es
;
<<>>
DiG 9.6-ESV-R4-P3
<<>>
+trace asociaciondrupal.es
;;
global
options: +cmd
.
104216
IN NS g.root-servers.net.
.
104216
IN NS e.root-servers.net.
.
104
Read more
About me
May 21, 2012 - 4:25am — Anonymous
Spent 2001-2007 developing strategies
for
wooden trains in Ohio. Prior to my
current
job I was short selling electric trains on the black market.
Read more
Fix for Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link,
May 21, 2012 - 4:03am — Anonymous
Warning:
MySQL
server has gone away query: INSERT INTO
watchdog
(
uid, type, message, variables, severity,
link
, location, referer, hostname, timestamp
)
VALUES
(
1
,
'php'
,
'%message in %file on line %li
log
Read more
Test
May 20, 2012 - 12:57pm — Anonymous
#include<iostream>
#include<conio.h>
using namespace std;
int main
(
)
{
cout
<<
"Hello World"
<<
endl;
cout
<<
"Test program"
;
getch
(
)
;
}
1
2
3
4
5
6
7
8
9
…
next ›
last »