DrupalBin
Submit Code
About
Recent Posts
Serializable closures
Closures in menu item arguments
dpr($content['field_headshot'])
Fix for Git push error
Проверка
Code
$item['title'] = $item['title'];
Loading specific field
expire give non-aliased paths
Fix for 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
taxonomy
test
theme
views
more tags
Home
hack
Worst preprocess code EVER, fixed by worst HACK ever
March 26, 2011 - 6:03pm —
wizonesolutions
/* Dear people just joining us - the original code was:
* ---------------------------
* $vars['classes'] = $hook;
* ---------------------------
* Yes, I'm serious. That was the original code.
bad code
fail
hack
Read more
Hacked "Google Pump"
February 16, 2011 - 12:10pm — Anonymous
(
root
@
vicbc:
/
home
/
www
/
html
/
model
/
.news
)
# pwd
/
home
/
www
/
html
/
model
/
.news
(
root
@
vicbc:
/
home
/
www
/
html
/
model
/
.news
)
# ls -al
total
12
drwxr-xr-x
2
apache apache
4096
Feb
15
03:
10
.
drwxrwx---
5
apac
hack
Read more
KISS, chx, KISS!
February 28, 2010 - 3:47pm —
sun
Index: includes/database/mysql/schema.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/mysql/schema.inc,v
retrieving revision
1
chx
dbtng
hack
Read more
CiviCRM hook_user to not set an empty $_SESSION["civicrm"] for anonymous users - needed for Pressflow
January 15, 2010 - 3:33pm —
EvanDonovan
function
civicrm_user
(
$type
,
&
$edit
,
&
$user
,
$category
=
NULL
)
{
$current_user
=
$_GLOBALS
[
"user"
]
;
if
(
$current_user
-
>
uid
== 0
&&
(
arg
(
0
)
==
"user"
&&
is_numeric
(
arg
(
1
)
)
)
)
{
retur
civicrm
cookie
hack
hook_user
pressflow
session
Read more
Fix for CiviCRM hook_user to not set an empty $_SESSION["civicrm"] for anonymous users - needed for Pressflow
January 15, 2010 - 3:32pm —
EvanDonovan
function
civicrm_user
(
$type
,
&
$edit
,
&
$user
,
$category
=
NULL
)
{
$current_user
=
$_GLOBALS
[
"user"
]
;
if
(
$current_user
-
>
uid
== 0
&&
(
arg
(
0
)
==
"user"
&&
is_numeric
(
arg
(
1
)
)
)
)
{
retur
civicrm
cookie
hack
hook_user
pressflow
session
Read more
page_get_cache disable hack
June 18, 2008 - 6:06pm — Anonymous
/**
* Retrieve the current page from the cache.
*
* Note: we do not serve cached pages when status messages are waiting (from
* a redirected form submission which was completed).
*
disable
hack
page_get_cache
Read more
4.6 custom table -> 5.x filefield migration code
May 29, 2008 - 12:43pm — Anonymous
$result
=
db_query
(
"SELECT * FROM {cv_files} WHERE uid = %d"
,
$user46
-
>
uid
)
;
$i
=
0
;
while
(
$row
=
db_fetch_object
(
$result
)
)
{
$old_filepath
= PK_46_PATH .
'/'
.
$row
-
>
filepath
;
filefield
hack
migration
Read more
Triggerblock module which may be nice to create?
January 20, 2008 - 9:12pm — Anonymous
<?php
/**
Triggerblock allows you to trigger when the triggerblock is shown.
It also adds a new action which will publish old posts that are both sticky and promoted.
hack
module
proposal
Read more