Tuesday, January 17, 2017 06:21 pm EST

Welcome to Bri-Space

Bri-Space is a site that I started as a sandbox for Drupal module testing. It sat for quite some time as i only occasionally used it to test out some contributed modules before moving them to a production site. I added all kinds of stuff along the way, most of which I took down. After awhile I decided to share what I have learned along the way while tackling Drupal projects. I am in no way, shape, or form an expert on Drupal, but perhaps others can find useful tidbits.

In addition to Drupal info, I occasionally post information about general PHP, CSS, or anything that i think might be beneficial to other web developers.

Bri's picture

Ubuntu Crontab for Drupal 6 Sites

On rackspace cloud servers running Ubuntu, I have been using the following:

0 */3 * * * wget [URL to cron.php file]

to run cron at the 0th minute every 3 hours every day. To get in to the cron tab, SSH in to the server and run

crontab -e 
Bri's picture

Alter the output of Logintoboggan on User Registration Form

Recently I was faced with a problem that gave me a bit of trouble. I was using the Logintoboggan module to create a unified login form as well as to allow logins with username or e-mail address. In addition to using Logintoboggan, I had created a small helper module to remove and alter some of the cruft in the user registration form and the user profile form.

Bri's picture

MySQL Export/Import Command Line Syntax

If you are like me, occasionally you find yourself working with a database that is so large it's pretty much impossible to do any importing/exporting with the GUI tools. It doesn't happen often enough for myself to have the MySQL commands memorized, so I'm putting them here so I can find them again later.

Exporting using mysqldump

mysqldump –u mysqlUser -p DatabaseName TableName > FilenameToSaveAs 

Importing the same file

mysql –u mysqlUser -p DatabaseName < FilenameToImport 
Bri's picture

Example of Using the D7 Batch API to Process Changes to Entities From a Select Query

The other day I decided that I needed to figure out how to use the Batch API. I have had a number of times where I needed to "fix" a bunch of nodes on a site. These are usually one time fixes such as adding a new field to the user object and needing a default value to be set for all the previous users. In most cases I would just create a standard menu callback and let it process. If it was too much to do in a single page request, I would change the query to limit the results and run it multiple times. I knew the Batch API was a better choice, but I hadn't taken the time to figure it out.

Syndicate content