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
›
KiamLaLuno
›
Recent Posts
KiamLaLuno
View
Posts
Crazy form
September 22, 2010 - 4:34pm —
KiamLaLuno
function
book_access_permissions_form
(
&
$form_state
,
$node
)
{
$grants
=
array
(
'view'
=
>
array
(
)
,
'update'
=
>
array
(
)
,
'delete'
=
>
array
(
)
,
)
;
$grant_ids
=
array
(
'grant_vi
Form API
form builder
Read more
Fix for Fix for Custom menu items
December 25, 2009 - 4:34am —
KiamLaLuno
<?php
// Database query checking for nodes of node type personal-ad and where author matches the logged in users id.
$count
=
db_result
(
db_query
(
"SELECT COUNT(*) FROM {node} WHERE uid = %d AND type
Read more
Fix for warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /var/www/html/dccaucus.com
December 9, 2009 - 12:49pm —
KiamLaLuno
$plid
=
db_result
(
db_query
(
"SELECT mlid FROM {menu_links} WHERE menu_name = 'primary-links' and link_path = '%s'"
,
'media'
)
)
;
dsm
(
$plid
)
;
$links
=
array
(
'media/news'
,
'media/press'
)
;
$args
= arra
Read more
book_access.test
November 22, 2009 - 6:38am —
KiamLaLuno
<?php
// $Id$
/**
* @file
* Test file for Book Access module.
*
*/
class
BookAccessTestCase
extends
DrupalWebTestCase
{
/**
* Check that the current user can/cannot view/update/d
simpletest
Read more
Problematic query
November 22, 2009 - 6:35am —
KiamLaLuno
$bool
=
db_result
(
db_query
(
"SELECT 1 FROM {book_access} WHERE nid = %d AND rid = %d"
)
,
$nid
,
$rid
)
;
drupal_write_record
(
'book_access'
,
$row
,
$bool
?
db
Read more
Query without db_placeholders()
November 22, 2009 - 6:16am —
KiamLaLuno
$results
=
db_query
(
"SELECT nid FROM {node_access} WHERE realm = 'book_access' AND gid IN (%s) AND grant_update > 0"
,
implode
(
', '
,
$roles
)
)
;
db