drupal
Spotted at DrupalCon, Barcelona
Submitted by AE on Wed, 2007-10-17 20:18.Drupal Tip #7: User 1
Submitted by AE on Fri, 2007-06-15 14:08.Drupal version: all
Module: n/a
Using user 1 as the admin user of a site during development seems convenient, but I've found myself overlooking and forgetting tiny things. Eventually, going back to a live site to set permissions, or change input formats, etc overrules the amount of time spent setting up a decent administrator role.
User 1 has permission to do absolutely anything on the site - so testing can have inaccurate results.
Some internet bad-guys can do some nasty things to the website, or even webserver, should they get their grubby paws on the identity of user 1, which is why I am a bit of a full-HTML-nazi. Also why I don't trust WYSIWYG editors as far as I can throw them. Best make sure there's no chance the user 1 username doesn't have a chance to be published anywhere, by forgetting a posted by, or allowing access to profiles for anonymous users.
Use your power for good and not for evil!
The Cobbler's Brother
Submitted by AE on Wed, 2007-05-23 18:04.The cobbler's son might have no shoes, but the youngest can live on hand-me-downs. ÜberEllis.com presents a new theme (yet to be named, see below):

Yeah, I know - not exactly the best theme for a blog.. I've developed this theme for SWiTCH WebStart.
The theme utilizes the color.module, that comes with core of drupal 5 (Seen in the likes of "Garland" and "Minelli"). The aim is to speed up the design process for new clients. This way, implementation of functionality and "theming" can run concurrently for rapid deployment. :)
Here are screenshots of some of the presets in Unnamed.Theme:

The concept of Color.module is quite ingenius. It uses a simple php file to render some areas of solid colour and a gradient fill. Overlayed with a transparent .png file to make a composite, which is then sliced to create the images needed for the theme.
Despite a couple of limitations (I'm assured color.module 2 will eradicate these), it can be planned well, and certainly is a whole lot of fun to play with.
The cobbler's son
Submitted by AE on Fri, 2007-05-11 10:01.I've finally upgraded the ÜberEllis.com platform to Drupal 5. The jump from 4.7 does have some impact on some of the theme functions, and thus I'm running the new Garland theme that comes standard with Drupal 5 and up. When my career leaves me some free time again, I'll upgrade all the ÜberThemes to be compatible with 5, so apologies to all registered users who may have selected an older theme.
In the meantime, the cobbler's son will have to go barefoot ;)
Presenting: UberWeiss 2 - A qub based theme
Submitted by AE on Sat, 2006-11-04 20:08.By popular demand - the next release of UberWeiss - A new base theme for drupal.
This release has a far more condensed style (a little better planned). Also now supports secondary link action and a header block area.

If you base a theme on this one, please leave the credit at the bottom of the page.
Drupal Tip #6: MySQL 4.0 and MySQL 4.1
Submitted by AE on Tue, 2006-08-01 10:18.Drupal version: n/a
Module: n/a
I've run into several issues running different versions of MySQL between development server and live server.
The following tip from a thread on drupal.org:
dump 2 versions of the database
For version 4.0, it would be:
mysqldump --opt --compatible=mysql40 -v -u DATABASE_USER -p DATABASE_NAME > database.40.mysql
For version 4.1, use:
mysqldump --opt -v -u DATABASE_USER -p DATABASE_NAME > database.mysql
I've learnt something new with regards to dumping databases for different versions of MySQL - A source of many grey hair in the past..
Often, once a 4.0 database has been imported into a 4.1 server, the following error message is common:
Warning: Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation 'like' query: SELECT * FROM access WHERE status = 1 AND type = 'host' AND LOWER('IP Address') LIKE LOWER(mask) in \includes\database.mysql.inc on line 120
To get by this, you need to convert the character set of each of the tables (this solution courtesy of Willie):
ALTER DATABASE {DATABASE_NAME} DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
And then:
ALTER TABLE {TABLE_NAME} CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
for each table in the error message.
For the reverse, editing the dump file can have pleasing results:
- Search for ENGINE=MyISAM and replace with TYPE=MyISAM
- Search for DEFAULT CHARSET=latin1 and replace with nothing Note: the character set might be something else, like "utf8"
- Search for character set latin1 collate latin1_bin and replace with nothing Note: the character set might be something else, like "utf8"
Drupal Tip #5: Primary links ++
Submitted by AE on Wed, 2006-07-26 21:49.Module: menu.module
Drupal Version: 4.7.2
Drupal version 4.7's menu module (core) allows context menu's as Secondary links.
To do this, set the menu settings (admiinister > settings > menu) to "Primary links" for both primary links and secondary links. A child link of a Primary link will become a secondary link when the primary link is active.
Drupal Tip #3: 403 and 404 errors
Submitted by AE on Tue, 2006-07-25 19:58.Module: Drupal core
Drupal Version: 4.7.2
Instead of using the default drupal error handling settings (administer > settings > error handling), consider using user/login as the default 403 page (instead of a node), or consider writiing a script that uses the referrer of the error (for 404) and passing onto the search module.
This tip brought to you from DrupalCamp.
Drupal Tip #4: Crontab
Submitted by AE on Tue, 2006-07-25 19:34.Running "crontab -e" (without the quotes) opens the crontab file where you can set times cron needs to run, if you have the correct access to the server.
With crontab, one can run any command one wants - for drupal, you need to execute cron.php
e.g:
#m h dom mon dow command 00 * * * * links -dump http://www.uberellis.com/cron.php > /dev/null
where:
m = minutes
h = hours
dom = day of the month (1 ... 31)
mon = month of the n(?) (1 ... 12)
dow = day of the week (0 ... 6) - Sunday = 0
command = the command you want to run at given time
This example will run cron every hour, ie. on minute 00
Other ways include - curl and wget - Drupal includes some script files in the default tarball showing examples of what commands to use for some.
DrupalCamp starts today!
Submitted by AE on Mon, 2006-07-24 13:13.It's finally here - the first DrupalCamp in South-Africa. DrupalCamp Johannesburg
Here's a list of what will be covered in this course.


