the official blog of webthingee.com
blogthingee logo
  • to webthingee.com
  • DRUPAL BLOG
  • LOGIN
  • CONTACT
Home

snippet

Maybe I Don't Want that in my Form

  • drupal
  • module
  • snippet
  • theme
Sometimes... most of the times... I don't want the "split summary at cursor" option on the sites I develop. There are any number of reasons I don't want it. Most of the times, it just isn't relevant and others... I just don't want the users asking a milion quesitons.


And inevetibally, there is more stuff I don't want in my forms, want differently, or want moved.


My solution has been that on all the sites I develop I have a custom module. In this modules is one of my most used hooks... form alter. I have it all set up and commended out some of the lines but leave them in for quick reference...


I'll show it to you, then explain a little more....My module name is theme_thingee, and here's how I have it set up.
  • webthingee's blog
  • 75 comments
  • Read more

Get Rid of Split at Cursor

  • code
  • drupal
  • snippet

unset($form['body_field']['teaser_include']);

http://drupal.org/node/225955

I place this in a module.
use hook_form_alter to apply.

Cron in cPanel

  • code
  • drupal
  • snippet

php /home/INSERT+DIR+NAME+HERE/public_html/cron.php

http://drupal.org/node/81380

Preprocess for some Shortcuts

  • development
  • drupal
  • php
  • snippet
  • theme
I came across this little extra nugget while looking for some stuff for preprocessing. How many times have I typed out base_path and path_to_theme... With this little gem I am just a few keys faster, and lovin it.



function themename_preprocess(&$vars, $hook) {
$vars['theme_path'] = base_path() . path_to_theme() .'/';
}


  • webthingee's blog

Page + Path * Template = Pleasure

  • drupal
  • node
  • page
  • snippet
This little snippet saved my bacon today. I decided it was worth a blog post. Sometimes finding the right code is a matter of googling the right words. So I will describe this is making a page template based on the node type you want to present, but you don't you know how to do it on a node, and now you want it on a page. :) Hopefully that will help some SEO.
  • webthingee's blog
  • 85 comments
  • Read more

Did you forget your Drupal User 1 password?

  • drupal
  • mysql
  • snippet
article image

After a long day of work and more work I decided to do a little more work... I was just getting started in a project for a new client with a Drupal site that was in development (almost done). I was given all of the access information, however; I was not able to access the site as user1.

Well, if I can't access the site as user1, then I'm pretty stuck.

The problem was not the username that I was provided, I know this because I could see the name in the database table. It was the password, it wasn't the right one.

  • webthingee's blog
  • 45 comments
  • Read more

Unique Class for Cool Drupal Menu Items

  • drupal
  • php
  • snippet
  • theme

I spend the majority of my time around Drupal in the areas of website building and in the theme layer. Anytime I can find things to make my theming life easier in either... I take it.

One of the 'limitations' (using that friendly) is the options for theming. IMPORTANT to note... Drupal 6 ROCKS!! THEMING!!. One of the important 'additions' I try to create when working in the theme layer is to improve my ability to use CSS. Some sites require fancy, creative, and/or custom stuff revolving around menus.
newlinks.png

  • webthingee's blog
  • 39 comments
  • Read more

Tagthingees

build code css design development drupal gmap how to jQuery module mysql php seo snippet software test text editor theme training trigger views views2 webform workflow
more tags

Recent blog posts

  • Change that Form Element - Give a fieldset a class
  • More Bigger Again - Preprocess - this time to get some Class
  • Too Much?! more power from your node.tpl
  • It's hook_link_alter over jQuery or CSS alone
  • Takeaways From Do It With Drupal
  • Cron run ?!? I can't get it to crawl!
  • Maybe I Don't Want that in my Form
  • This Themer's Path to a Pane
  • Module Shout Out! Semantic Views
  • Preprocess for some Shortcuts
more

Snippet-thingee

  • Get Rid of Split at Cursor
  • Cron in cPanel
  • .htaccess for PHP Memory Limit Increase
  • Drupal Set Message - short
  • Embed Webform (or node) into a Node
  • {View All Snippets}
Syndicate content