DrupalBin
Submit Code
About
Recent Posts
Fix for Allow HTML in <i> node titles</i> for Drupal 6.x
Template Pre-proccessing
Testing Ubercart donation product
dave's menu screenshot
Code
Modify user profile page theme
Modify user profile page
Fix for Fix for Code
Fix for Code
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
php
simpletest
test
theme
user
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