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
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
›
abigoltree
›
Recent Posts
abigoltree
View
Posts
form
September 13, 2010 - 1:22am —
abigoltree
<?php
/**
* Implementation of hook_perm()
*/
function
helper_perm
(
)
{
return
array
(
'schedule Reservation'
)
;
}
/**
* Implementation of hook_menu()
*/
function
helper_menu
(
)
{
global
$user
;
Read more
conditional change $title
May 18, 2010 - 7:14pm —
abigoltree
<?php
if
(
arg
(
0
)
==
'user'
&&
is_numeric
(
arg
(
1
)
)
)
{
while
(
$account
=
user_load
(
arg
(
1
)
)
)
{
$title
=
'<h1 class="title">'
.
$account
-
>
profile_fname
.
' '
.
$account
-
>
profile_lname
.
'woot</h1>'
;
}
}
?
Read more
Fix for Fix for Code
March 27, 2010 - 2:30pm —
abigoltree
<?php
function
dmp_install
(
)
{
db_query
(
"UPDATE {system} SET weight = -1 WHERE name = 'dmp'"
)
;
}
/**
* Implementation of hook_menu()
*/
function
dmp_menu
(
)
{
global
$user
;
$items
[
'add/user/d
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
Fix for Code
March 4, 2010 - 8:40am —
abigoltree
<?php
function
mymodule_menu_alter
(
&
$items
)
{
$items
[
'user/%user_category/edit'
]
[
'access callback'
]
=
'mymodule_role_edit_perms'
;
$items
[
'user/%user_category/edit'
]
[
'access arguments'
]
=
array
Read more
hook_menu_alter
March 4, 2010 - 7:01am —
abigoltree
function
foo_menu_alter
(
&
$items
)
{
global
$user
;
if
(
in_array
(
'Administrator'
,
array_values
(
$user
-
>
roles
)
)
)
{
$items
[
'user/%user_category/edit'
]
[
'access callback'
]
=
'get_company'
;
$items
[
'user
Read more
a hook_form_alter for user_profile_form
March 3, 2010 - 4:51pm —
abigoltree
switch
(
$form_id
)
{
case
'user_profile_form'
:
global
$user
;
echo
'<pre>'
;
print_r
(
$form
)
;
echo
'</pre>'
;
//Which roles have access to Blocking and Activating users
if
(
!
in_arr
Read more
insert stuff into database table
February 22, 2010 - 2:47am —
abigoltree
<?php
/**
* User Login History
*
* The Purpose of this module is to create a database table in which to store the
* login date/time of users as they login.
* The Plan is to use hook_form_alter(
Read more
Fix for hook_schema issue
February 22, 2010 - 2:38am —
abigoltree
/**
* Implementation of hook_schema() -- defines database
*/
function
user_login_history_schema
(
)
{
$schema
[
'login_history'
]
=
array
(
'description'
=
>
t
(
'user.login storage'
)
,
'fields'
=
>
a
Read more
hook_schema issue
February 22, 2010 - 1:12am —
abigoltree
function
user_login_history_schema
(
)
{
$schema
[
'login_history'
]
=
array
(
'description'
=
>
t
(
'user.login storage'
)
,
'fields'
=
>
array
(
'uid'
=
>
array
(
'description'
=
>
t
(
'Users UID'
)
,
Read more
Fix for submit handler issues
February 19, 2010 - 7:15pm —
abigoltree
function
dealer_form_submit
(
$form
,
&
$form_state
)
{
$user_array
=
array
(
'name'
=
>
$form_state
[
'values'
]
[
'name'
]
,
'pass'
=
>
$form_state
[
'values'
]
[
'password'
]
,
'mail'
=
>
$form_state
[
'values'
]
[
Read more
submit handler issues
February 19, 2010 - 7:15pm —
abigoltree
function
dmp_dealer_form_submit
(
$form
,
&
$form_state
)
{
$user_array
=
array
(
'name'
=
>
$form_state
[
'values'
]
[
'name'
]
,
'pass'
=
>
$form_state
[
'values'
]
[
'password'
]
,
'mail'
=
>
$form_state
[
'value
Read more
Fix for Multipage User Registration
February 18, 2010 - 10:04pm —
abigoltree
<?php
/**
* Implementation of hook_menu()
*/
function
multipage_register_menu
(
)
{
$items
[
'add/user'
]
=
array
(
'title'
=
>
'Add a user'
,
'page callback'
=
>
'multipage_register_wizard'
,
'ac
drupal
form
user creation
Read more
Multipage User Registration
February 18, 2010 - 5:55pm —
abigoltree
<?php
/**
* The purpose of this module is to take the user-registration form and make it
* multipage, where the pages change depending on the options selected during
* the last step.
drupal
form
user creation
Read more