DrupalBin
Submit Code
About
Recent Posts
Get theme path for use inside views global text fields
Code
Fix for Code
Code
Fix for filefield implementation in an admin page. "An HTTP error 0 occurred. /drupal/?q=filefield/ahah///"
Undefined index:
searching for two different taxonomy terms - get this into views (2 on D6)?
Converting D6 to D7
error on clone same as earlier error on migrate
Reordering ORDER BY elements in selectQuery query
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
›
BrianJubal
›
Recent Posts
BrianJubal
View
Posts
removing the preview button (and delete button)
December 6, 2007 - 1:50pm —
BrianJubal
function sitehelper_form_alter($form_id, &$form) {
global $user;
switch ($form_id) {
case 'linfo_node_form':
if($user->uid != '1') {
unset($form['preview']);
form
hook_form_alter
Read more
Manually created Views
November 29, 2007 - 3:46pm —
BrianJubal
function sitehelper_views_tables() {
// view created from email column in users table
$table = array(
// name of table
'name' => 'users',
'provider' => 'internal',
CCK
module
views
Read more
looping through CCK Matrix to provide a view for each field
November 8, 2007 - 6:52pm —
BrianJubal
foreach (array(1,2,3,4) as $matrixrow) {
foreach (array(1,2) as $matrixcol) {
$matrixindex = $matrixrow.'_'.$matrixcol;
$table = array(
CCK
matrix
views
Read more
Fix for Alter code look right? (come back to #drupal-support if you want to talk more)
November 6, 2007 - 12:48pm —
BrianJubal
function chatblock_update_1() {
db_query("ALTER TABLE {chatblock} MODIFY timestamp BIGINT( 14 ) NULL DEFAULT NULL");
}
Using hook_form_alter to fill in cck fields automatically and then hiding them from users
November 6, 2007 - 11:46am —
BrianJubal
function sitehelper_form_alter($form_id, &$form) {
global $user;
switch ($form_id) {
// Only do this for the review type's form
case 'minfo_node_form':
CCK
hook_form_alter
Read more
put this in your template.php in your theme
October 31, 2007 - 12:44pm —
BrianJubal
function _phptemplate_variables($hook, $vars) {
if ($hook == 'page') {
if (arg(0) == 'user') {
$vars['tabs'] = str_replace('Edit</a>', 'Account</a>', $vars['tabs']);
}
Read more