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
Recent Posts
Fix for protect staging sites with a password
March 10, 2010 - 6:14pm — Anonymous
# Match all public hosts with one or more regex.
SetEnvIfNoCase Host ^drupal\.org PUBLIC_SITE=1
# Allow everyone to see a public site
Allow from env=PUBLIC_SITE
Deny From All
# Define another
Read more
protect staging sites with a password
March 10, 2010 - 6:13pm — Anonymous
# Match all public hosts with one or more regex.
SetEnvIfNoCase Host ^drupal\.org PUBLIC_SITE=
1
# Allow everyone to see a public site
Allow from env=PUBLIC_SITE
Deny From All
# Define another
Read more
Code
March 10, 2010 - 1:54pm — Anonymous
<div id="region">
<?php
print
$region
;
?>
</div>
Code
March 10, 2010 - 1:18pm — Anonymous
function
phptemplate_menu_tree
(
$tree
)
{
return
'<ul id="jsddm">'
.
$tree
.
'</ul>'
;
}
PHP for default argument
March 10, 2010 - 11:11am — Anonymous
if
(
arg
(
0
)
==
'node'
&&
is_numeric
(
arg
(
1
)
)
)
{
$group_node
=
node_load
(
arg
(
1
)
)
;
// Need to use this AMO key to match across tables to the Organization nid
$group_amokey
=
$group_node
-
>
field_gr
Read more
imagefield in other form
March 10, 2010 - 10:10am — Anonymous
function
epvext_photos_page_form
(
$form_state
)
{
$form
=
array
(
)
;
drupal_load
(
'module'
,
'filefield'
)
;
module_load_include
(
'inc'
,
'imagefield'
,
'imagefield_widget.inc'
)
;
module_load_include
(
Read more
autocomplete
March 10, 2010 - 10:06am — Anonymous
<?php
function
example_autocomplete
(
$string
=
''
)
{
$matches
=
array
(
)
;
if
(
$string
)
{
$result
=
db_query_range
(
"SELECT dst FROM {url_alias} WHERE LOWER(dst) LIKE LOWER ('%s%%')"
,
$string
,
Read more
Code
March 10, 2010 - 9:07am — Anonymous
/**
* The jQuery.sharethis() function will process through the queue and create
* the elements.
*/
jQuery.shareThis =
function
(
)
{
// Loop through the process queue.
jQuery.
Read more
Fix for 123
March 10, 2010 - 9:05am — 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
=
"en"
lang
=
"en"
dir
=
"ltr"
>
<head
123
Read more
123
March 10, 2010 - 9:01am — 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=
"en"
lang=
"en"
dir
=
"ltr"
>
<
head
123
Read more
user has nodes of type
March 10, 2010 - 5:39am —
stborchert
$count_nodes
=
db_result
(
db_query
(
"SELECT COUNT(*) FROM {node} WHERE type = '%s' AND uid = %d"
,
'story'
,
5
)
)
Code
March 10, 2010 - 5:38am — Anonymous
<?php
if
(
arg
(
0
)
==
'user'
&&
is_numeric
(
arg
(
1
)
)
)
{
$account
=
user_load
(
arg
(
1
)
)
;
global
$user
;
if
(
$user
-
>
uid
==
$account
-
>
uid
)
{
$businessnode
=
node_load
(
array
(
'type'
=
>
'firmenprofil'
,
Read more
Code
March 10, 2010 - 5:28am — Anonymous
function
mymod_install
(
)
{
db_query
(
"UPDATE {system} SET weight = -1 WHERE name = 'mymod'"
)
;
}
function
mymod_form_alter
(
&
$form
,
&
$form_state
,
$form_id
)
{
if
(
$form_id
==
'user_profile_form'
Read more
Fix for a hook_form_alter for user_profile_form
March 10, 2010 - 4:27am —
abigoltree
function
foo_form_alter
(
&
$form
,
$form_state
,
$form_id
)
{
switch
(
$form_id
)
{
case
'user_profile_form'
:
global
$user
;
/**
* Account Info subtab
*/
if
(
is_array
(
$form
[
'account'
]
)
)
Read more
Code
March 10, 2010 - 3:39am — Anonymous
$logo
=
'<div id="logo">'
.
' <a href="'
.
check_url
(
$vars
[
'front_page'
]
)
.
'" title=" . $vars['
site_title
'] . '
">' .
' <img src="
' . check_url($vars['
logo
']) .
Read more
Code
March 10, 2010 - 3:26am — Anonymous
<?php
if
(
arg
(
0
)
==
'user'
&&
is_numeric
(
arg
(
1
)
)
)
{
$account
=
user_load
(
arg
(
1
)
)
;
global
$user
;
if
(
$user
-
>
uid
==
$account
-
>
uid
)
{
$output
.=
'Sie sind doof.</a>'
;
print
$output
;
Read more
WorksForWeb Classifieds Ads Software for online business
March 10, 2010 - 3:03am — Anonymous
WorksForWeb is a software development company specialized in Web-based applications with focus on PHP classifieds ads software.
business directory script
classified
classified ad
classified ads
classifieds ads
classifieds ads software
classifieds scripts
iAuto
iLister
iRealty
real estate script
Сlassifieds Solutions
Read more
Youtube try for IE
March 10, 2010 - 12:57am — Anonymous
<
embed src=
"http://www.youtube.com/watch?v=5FXftDcwL-w"
type=
"application/x-shockwave-flash"
wmode=
"transparent"
width=
"425"
height=
"355"
></
embed
>
Weird Views2 sql for relationship
March 9, 2010 - 6:01pm — Anonymous
SELECT node.nid
AS
nid,
node.title
AS
node_title,
node_data_field_pubmed_id.field_pubmed_id_value
AS
node_data_field_pubmed_id_field_pubmed_id_value,
node.type
AS
node_type,
node.vid A
database.mysqli.inc
relationships
views2
Read more
Code
March 9, 2010 - 4:48pm — Anonymous
/*
* Implementatino of hook_mail().
*/
function
misc_mail
(
$key
,
&
$message
,
$params
)
{
$language
-
>
message
[
'language'
]
;
switch
(
$key
)
{
case
'make_an_offer'
:
$message
[
'subject'
]
=
Read more
1
2
3
4
5
6
7
8
9
…
next ›
last »