DrupalBin
Submit Code
About
Recent Posts
message i get when running openssl s_client -connect 150.203.86.21:443
Fix for Code
Code
add_to_cart_by_sku_contents()
Fix for page.tpl.php
Page.tpl
foreach is beeing disregarded dispite variable is array. Please help. Outside Drupal it works as standalone.php file
foreach is beeing disregarded dispite variable is array inside drupal. Please help. Outside Drupal it works as standalone.php
Fix for filefield implementation in an admin page. "An HTTP error 0 occurred. /drupal/?q=filefield/ahah///"
PHP Code custom.module
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
›
Sheppard
›
Recent Posts
Sheppard
View
Posts
Fix for taxonomy_node_get_terms_by_vocabulary ain't workin dammit
March 2, 2012 - 8:49am —
Sheppard
function
company_tracker_sector_activity_view
(
$nid
)
{
$output
=
''
;
$sector_vocab
=
2
;
$result
=
db_query
(
"SELECT node.nid AS nid,
node.vid AS vid,
node_revisions.teaser AS node_r
taxonomy
taxonomy_node_get_terms_by_vocabulary
Read more
taxonomy_node_get_terms_by_vocabulary ain't workin dammit
March 2, 2012 - 7:55am —
Sheppard
function
company_tracker_sector_activity_view
(
$nid
)
{
$output
=
''
;
$sector_vocab
=
2
;
$result
=
db_query
(
"SELECT node.nid AS nid,
node.vid AS vid,
node_revisions.teaser AS node_r
taxonomy
taxonomy_node_get_terms_by_vocabulary
Read more
Aegir installation debug output on Arch linux
December 6, 2011 - 8:21am —
Sheppard
[aegir@tonga ~]$ drush hostmaster-install --web_group=http --debug
Bootstrap to phase 0.
aegir
arch linux
debug
Read more
Fix for Same field names in query need aliasing to differentiate :-)
October 11, 2011 - 9:32am —
Sheppard
/**
* Because the field names are both called 'name', this is why the results are borked.
* By aliasing the fieldnames, the problem is circumvented:
* e.g.
sql
Read more
Same field names in query need aliasing to differentiate :-)
October 11, 2011 - 9:22am —
Sheppard
function
qube_companies_per_role
(
$roles
=
''
)
{
$result
=
db_query
(
"SELECT r.name, d.name
FROM {role} r, {term_data} d, {term_access} a
WHERE d.vid = 1
AND a.rid = r.rid
AND a.ti
sql
Read more
sql to update created and changed dates
September 30, 2011 - 10:28am —
Sheppard
UPDATE
node
SET
node
.
created
=
1317390787
,
node
.
changed
=
1317390787
WHERE
node
.
type
=
"market_report_item"
AND
node
.
nid
IN
(
SELECT
nid
FROM
term_node
WHERE
tid
=
332
)
aegir upgrade transcript (alpha8 to rc1)
February 23, 2011 - 7:09am —
Sheppard
aegir@tonga-deploy:~$ sh upgrade.sh.txt
==> Aegir 0.4-rc1 automated upgrade script
==> This script makes the following assumptions:
* you have read UPGRADE.txt and prepared the server accordingl
aegir
Read more
This works for me
January 13, 2011 - 12:20pm —
Sheppard
<?php
if
(
arg
(
0
)
!
=
"blog"
&&
arg
(
1
)
)
{
print
'<a href="/blog" class="active"><-- Back to blog front page</a>'
;
}
?>
Fix for Fix for Fix for Fix for blogsanity conditional code
January 13, 2011 - 12:01pm —
Sheppard
<?php
if
(
arg
(
0
)
!
=
"blog"
&&
arg
(
1
)
)
{
print
'<a href="/blogsanity" class="active"><-- Back to blogSanity</a>'
;
}
?>
Fix for Fix for Fix for blogsanity conditional code
January 13, 2011 - 12:00pm —
Sheppard
<?php
if
(
arg
(
0
)
!
=
"blog"
&&
arg
(
1
)
)
{
// print '<a href="/blogsanity" class="active"><-- Back to blogSanity</a>';
print
'<a href="/blogsanity" class="active"><-- Back to blogSanity</a>
Read more
Fix for Fix for blogsanity conditional code
January 9, 2011 - 2:07pm —
Sheppard
<?php
if
(
arg
(
0
)
!
=
"blogsanity"
)
{
// my mistake, shouldn't have used square brackets
// print '<a href="/blogsanity" class="active"><-- Back to blogSanity</a>';
print
'<a href="/blogsanity
Read more
Fix for blogsanity conditional code
January 9, 2011 - 2:01pm —
Sheppard
<?php
if
(
arg
(
0
)
!
=
"blogsanity"
)
{
// my mistake, shouldn't have used square brackets
print
'<a href="/blogsanity" class="active"><-- Back to blogSanity</a>'
;
}
?>
blogsanity conditional code
January 9, 2011 - 1:57pm —
Sheppard
<?php
if
(
arg
[
0
]
!
=
"blogsanity"
)
{
print
'<a href="/blogsanity" class="active"><-- Back to blogSanity</a>'
;
}
?>
updated terminal output from drush/aegir hosting-cron
June 23, 2010 - 5:54am —
Sheppard
aegir@aonix:~/hostmaster-0.4-alpha8/profiles/hostmaster/modules/hosting/cron$ /usr/bin/php /var/aegir/drush/drush.php hosting-cron --root
=
'/var/aegir/hostmaster-
0.4
-alpha8' --uri
=
'sandbox.aroq.com' --
aegir drush debug
Read more
terminal output from drush/aegir hosting-cron
June 23, 2010 - 5:49am —
Sheppard
aegir@aonix:~/hostmaster-0.4-alpha8/profiles/hostmaster/modules/hosting/cron$ /usr/bin/php /var/aegir/drush/drush.php hosting-cron --root
=
'/var/aegir/hostmaster-
0.4
-alpha8' uri
=
'sandbox.aroq.com' --de
aegir drush debug
Read more
webform additional processing
June 22, 2010 - 10:04am —
Sheppard
<?php
$node
-
>
webform
[
'confirmation'
]
=
'http://'
.
$_SERVER
[
'HTTP_HOST'
]
.
base_path
(
)
.
'node/'
.
$form_values
[
'submitted_tree'
]
[
'brochure_requested'
]
;
?>
webform
older version of aegir crontab
June 22, 2010 - 6:48am —
Sheppard
SHELL
=
/bin/bash
PATH
=
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
*/1 * * * * /usr/bin/php /var/aegir/drush/drush.php --php
=
/usr/bin/php hosting-dispatch --root='/var/aegi
aegir crontab
Read more
aegir crontab
June 22, 2010 - 6:42am —
Sheppard
SHELL
=
/bin/bash
PATH
=
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
*/1 * * * * /usr/bin/php /var/aegir/drush/drush.php hosting-dispatch --root
=
'/var/aegir/hostmaster-
0.4
-al
aegir crontab
Read more
Fix for views exposed filter mods
June 14, 2010 - 11:11am —
Sheppard
<?php
// $Id$
/**
* @file
* A module to redo the form action with hook_form_alter for what's new views.
*/
/**
* Implementation of hook_form_alter()
*/
function
exposed_filter_mods_for
views hook_form_alter
Read more
form alter for web form - to get the date order right - not sure why it's not working right in the first place
February 6, 2009 - 9:27am —
Sheppard
<?php
/**
* Theme override for node/24 webform.
*
* The function is named themename_formid.
*/
function
themename_webform_client_form_24
(
$form
)
{
#drupaluk
davetarmac
webform
Read more
1
2
next ›
last »