drupal
Drupal is a mighty fine Content Management System which we at Leafish both use and contribute to regularly.
This section contains ideas, code snippets and modules which I thought may come in useful for Drupal admins and developers. I won't be officially supporting this code, but feel free to contact me if you have any problems or suggestions.
See also the list of my official projects on drupal.org (requires you to be logged in to drupal.org).
Simple permissions for uploads per node type
Simple bit of Drupal module code from yesterday: permissions are provided for each node type which can have attachments, providing a more granular permission set based on node type. Then, we alter any node add/edit forms and set the #access property for the attachments part of the form based on these new permissions.
Check the code out after the break, hope its of some use somewhere. Does anyone have any thoughts on Cheers to those who commented, I've modified the snippet accordingly.unsetting form elements like this? Is it a wise thing to do, or is there a better way?
Listing authenticated users without roles
Sometimes we'd like to list users who have registered with a Drupal site, but haven't been placed into any proper roles yet via subscriptions, purchases, membership approval or whatever.
Try this join query to get started:
SELECT users.uid, name, created, access, login, status FROM {users} LEFT OUTER JOIN {users_roles} ON users.uid = users_roles.uid WHERE users_roles.uid IS NULL AND users.uid != 0
On "subscribing" to module porting/updating issues
Come on people, STOP IT! You know who you are. "Subscribing" to an issue on a drupal.org project (can we guess which ones, people?) simply fills the thread full of useless comments, cluttering up any valid discussion enough to make any maintainer cry.
So, again, please stop. Bookmark the issue. Use RSS. Visit the Contributed Module Status group on groups.drupal.org, and help maintain the current branches status list - get some links to the relevant issues in there for us all to "subscribe" to!
And of course, if you really want the issue to enter into your "My Issues" queue, then contribute something more worthwhile than "subscribing" or "..."
/rant
Embedding Views in PHP snippets with Views 2
Just a quickie - embedding views in PHP snippets etc. Sometimes blocks or panels don't quite cut the mustard and we need to directly insert a view via some PHP.
I started off here - the method I've used before to achieve this. There's another howto on Innovating Tomorrow. However, views_build_view, and indeed theme_view, are both no longer part of Views...
After a bit of searching I found mention of a new function; its also mentioned in the Views 2 documentation (work in progress).
So, the resulting PHP is wonderfully simple:
print views_embed_view($view_name, $display_id = 'default');
I was tearing my beard out, so I hope this helps someone.
6 is the Magic Number
At last! There were a couple of sacrifices, but I've gone all 6.2! This is the first Leafish site to go live with Drupal 6 (although we do have a big Drupal 6 project in the works) so I've made some notes on the process, and a couple of hurdles I not so much overcame as simply ignored for the time being. Props to all those that have helped get the working modules below up to date.
Resources used:
- Converting 5.x modules to 6.x documentation.
- Converting 5.x themes to 6.x documentation.
- List of contributed modules status - version 6.x.
- Drupal 6 API documentation.
Read past the break to see how I got on...
Drupal 6 and ting
First up, congratulations everyone on the release of Drupal 6.0! Its a biggy - so many others have already beat me to it listing new features and pointing out some interesting reading involving the release, so I'll not repeat it all over. Here's a few links I found worth a read:
- Introductory screencast to the new features in Drupal 6
- Great overview on Raincity Studios
- Wim Leers' Overview, complete with links for further reading and a couple of screenshots
- Something I'm really looking forward to putting into practice: Theme developer module for Drupal 6
And for those who want to turn their attention to what's in store for Drupal over the next twelve months, development is now open for Drupal 7. Make sure you also take a look at Dries' State of Drupal presentation in Barcelona.
So, as we at Leafish start to play with the latest and greatest release and think about upgrading our sites, our attention shifts from core to contrib... Ooh, the excitement! There's already some early birds and there's certainly some concerns over the state of key modules like CCK, Views and Image.
Last time round for Drupal 5.x I had a whopper of a table which I didn't maintain once sepeck pointed out the fantastic effort Michelle put into a similar list on groups.drupal.org. Once again, there's a pretty comprehensive list over there: check out the Contributed modules status - 6.x page. Its a wiki page, so if you're a module maintainer or are already getting your hands dirty with Drupal 6 patches/ports get updating! And if you're not getting your hands dirty, why not?
Tagadelic for Drupal 6 patch - help test!
jgoldberg, Rob Loach and I have been tweaking a patch to get the Tagadelic module working with Drupal 6.x. We're almost there, so this is a call out to get some more peeps testing before we poke Bèr to get it committed. One down?
Some tweaks for a Drupal WoW guild site
The Tempest is was a World of Warcraft guild site built initially on Drupal 4.7 and recently upgraded to Drupal 5. It provides guild membership management via user accounts and roles, forums with public and private access, raid listings with sign-ups and other groovy stuff like private messaging, image galleries and a links/resources directory.
For managing raids and sign-ups we use a CCK type called 'raid' which includes fields for:
- Date using the Date API;
- Instance as a drop-down list (see the attached instance_list.txt for the values we use);
- Notes for anything else, eg what the goals of the run are.
A slighty tweaked Sign Up module allows guild members to sign-up for raid nodes. We also use the Calendar module along with trusty Views to provide both an Upcoming Raids List and a Raids Calendar.
articles
latest comments
latest tweets
- Nursing a bruised wrist and listening to some random Russian feller's choons: http://www.last.fm/user/liago0sh — 7 weeks 1 hour ago
- Blimey. Take a break for a weekend and a whole bunch of sites get a facelift. — 8 weeks 6 days ago
- thinks every cloud... last minute tickets get for Radiohead at Manchester (http://hellotxt.com/l/T7N1 Gutted Andy... — 14 weeks 21 hours ago
- Loving Unison (http://tinyurl.com/6muvj) — 14 weeks 3 days ago
- Moving large Drupal e-commerce sites with corrupted DB tables = ++unfun. — 15 weeks 2 days ago
some news of interest
recently bookmarked
recent code
news from friends
Amazee - Drupal powered social collaboration. A redesign case study.
Leadel - A Drupal & Flash intensive site
Student Activities Supports 170 Drupal 6 Sites at Texas A&M
Acquia out of beta
When Cold Water Attacks!
October 2 -- Knight Drupal Initiative review meeting
Announcing the new Getting Involved handbook
Davis Applied Technology College Drupal Case Study
Everyone’s an expert

GIMP 2.6 released, one step closer to taking on Photoshop
GeeXboX uShare UPnP A/V Media Server HomePage
Discounts not applied in e-mail templates?















