How to override the "formatting tips" section in Drupal's node creation

Drupal provides some "formatting tips" just before the submit button when creating nodes.

Sometimes you want to override this text to provide your own "tips" for node creation. Here's how to do this :

In your theme's template.php file, add the following function :


function phptemplate_filter_tips($tips, $long = FALSE, $extra = '') {
return 'Your tips here';
}

Also see this post : http://drupal.org/node/35122

Categories: 

Free SVG Viewer

Adobe has a free SVG viewer here :
http://www.adobe.com/svg/viewer/install/
They've apparently stopped supporting it, but you can still see the download link at the bottom of the page for WinXP.

For thumbnails from Windows Explorer, I downloaded Renesis Player from here :
http://www.examotion.com/index.php?id=product_player_download
You may have to restart Windows Explorer (or even Windows) to get SVG thumbnails generated.

Categories: 

Installing and using Drush Make

Drush and Drush Make are two great utilities for folks who use Drupal.

Here's how to setup and use Drush Make :

Create a ~/.drush directory and download Drush Make to there :


  $ cd
  $ mkdir .drush
  $ cd .drush
  $ wget http://ftp.drupal.org/files/projects/drush_make-6.x-2.0-beta6.tar.gz
  $ tar -xvzf drush_make-6.x-2.0-beta6.tar.gz
  $ cd /var/www/yoursite
  $ cat makeYourWebSite.txt
     core = 7.x 
     projects[] = drupal 
  $ drush make makeYourWebSite.txt

Categories: 

How to mount Windows (SMB) shares on Ubuntu Linux

Here's how to mount SMB (Windows) shares on an Ubuntu system. Most of this assumes you're the root user. You may have to prepend 'sudo' to many commands depending on your situation.

First, you may have to install the following :

- # apt-get install smbfs smbclient

You can do a simple interactive connect with this :

- # smbclient \\\\YOUR_SERVER\\myusername-U myusername -W YOUR_WORKGROUP

This will at least show the SMB share is reachable.

Next, to enable auto-mounting on system start, you'll want to add one of the following to your /etc/fstab file :

Categories: 

DrupalCon SF 2010 Day Two Notes

Batch vs. Queue : An API Smackdown

Drupal 7 will use OO for cache and queue systems.

- createQueue
- createItem
- claimItem
- releaseItem

SystemQueue => MySQL
MemoryQueue => in-memory one request
BatchQueue extends SystemQueue

Use Drush for cron-based batch operations

Use queue to queue for later

I think the "Batch" API is somewhat misnamed. It's intent is to "batch up" and provide feedback DURING AN INTERACTIVE SESSION (ex. upgrading a site). To really batch big jobs, use the Queue API.

Categories: 

Themes for Drupal 7

Drupal 7 (D7) hasn't been released yet, but there already are some themes compatible with D7. Here are some of them :

- Forest Floor - OK - kind of gray

- Dingus - Mostly CSS - no custom PHP

- mulpo - Clean and interesting

- Moleskine - Nice and rustic - derived from Basic theme

- NineSixty - Kind of plain

- AD Blueprint - Looks OK - clean

- AD The Morning After - Clean, spartan look

- Abessive - Unique, but a little too stark

- Basic - Based on Zen theme. Allows you to use Skinr module and SASS CSS.

Categories: 

NoSQL Data Stores - Mongo

I stumbled across Mongo the other day. MongoDB is one of the non-relational (NoSQL http://en.wikipedia.org/wiki/Nosql) data stores along the lines of CouchDB.

If you're interested, here are some links to MongoDB :
http://www.mongodb.org/
http://try.mongodb.org/
http://www.mongodb.org/display/DOCS/PHP+Language+Center

The try.mongodb.org link is especially useful. It provides a JavaScript shell and a tutorial which allows you to try MongoDB easily.

Pages

Subscribe to luhman.org RSS