March 2012

Drupal CRON Setup and Scheduling - cron.php

From the command line, open the crontab using the default editor. You can change your default editor, just google the commands.

crontab -e

And then add the line:

30 23 * * * php /home/account/public_html/cron.php

This will run cron.php at 11:30 every day. For more configuration settings, see the drupal page or this good tutorial.

Configure LAMP Server for Drupal 7 and Migrate Development Site - No GUI, command line only

To start with, I created a tarball with bz2 compression of the dev site. Make sure to explicitly include .htaccess because the tar command, like the ls command does not include filenames with "." as the first character. Navigate to the root of your site and execute the following (-c create | -v verbose (lists files as it goes) | -j bz2 compression | -f file):

tar -cvjf nameofsite_date_of_copy.tar.bz2 * .htaccess

Also, you will need the mysqldump

Custom Drupal Views and Fields using hook_views_api() and hook_views_data()

Create a custom module to use a database table for a view.

Replace MODULENAME with the name of your module and TABLENAME with the name of your table.


Parse error: syntax error, unexpected 'TABLE' (T_STRING) in /home1/nate01/public_html/includes/ : eval()'d code on line 2