Making stuff better: the Agaric way
Agaric Design Collective uses the power of open source free software, the internet, and people to build sites that give control to our clients and their communities.
We build individual, organization, and business sites. Our passions are for community-driven sites, democratic communication in the service of human coordination, and great design.
A full service branding and web presence company, we also provide hosting on our dedicated servers, training, and brochure and business card design. Our core offerings, custom development, and consulting are based on the state-of-the-art content management framework Drupal.
Our founding principles include the goal of helping all people gain the most power possible over their own lives. We apply this to our work and build online applications that our clients can easily update and expand on their own. Agaric Design proudly uses world-class open source free software that means freedom from lock-in and always keeps our clients in control.
Our headquarters are in Natick, Massachusetts, and our members hail from several parts of the state, Rhode Island, and Germany. Thank you for visiting our site, which we will continue to improve on the rare occasions we can take time from working for you!
Making stuff better: the Agaric way.
Featured Content
Learning Drupal by Helping Others Learn Drupal: Doing Documentation on Drupal.org
Coming from the best ways to learn are by doing and teaching school of thought, Agaric encourages anyone interested in getting better at Drupal or getting more involved with Drupal to attend Add1sun's January Documentation Challenge, Saturday's at 1 p.m.
Access Drupal functions and session from a PHP script in a site subdirectory
If you want to use Drupal sessions and the logged in user object from a straight PHP script not at Drupal root but somewhere in subdirectories in a site, you will probably need to do something like I endend up doing in profiles/scf/switch.php to impersonate the Drupal site root directory.
In fact, I think the partial installation profile idea might need something like this.
The secret plan to store configuration in files
There does not seem to be any discussion about a file-based approach to saving configuration information in Drupal. Agaric comes to this conclusion after extensive Googling (see the keyword details of this post; by the way, I can confirm that word order matters when doing Google searches, even in the absence of quotation marks).
Why Spot.Us Should have used Drupal (and why it doesn't matter)
It's the one that got away. With many Knight News Challenge projects using Drupal, the dedicated Knight Drupal Initiative (reopening after DrupalCon in March), and Drupal sites for the Knight Foundation's own community, David Cohn must just be deficient in groupthink to have chosen to develop Spot.Us in Ruby on Rails.
Despite my bias, the "Why Spot.Us should have used Drupal" title is tongue in cheek. I'm pretty sure David Cohn (who is smarter, better looking, and always better dressed than me) and the Spot.Us development team will get the following enhancements in place quickly. Especially since, when it comes to winning friends and influencing people there is nothing like a polite, personal, respectful, and massively cross-posted note (but hey, I couldn't find an issue queue).
For what it's worth, here's the list of features that the Spot.Us site lacks that would be automatically or easily provided by a Drupal-based framework:
- Instant login when registering (LoginToboggan)
- Better workflow when registering in general: Currently, you are left on the registration screen after registering, and clicking on the "check your e-mail message" happens to lead to a 404 file not found error (featuring LOLcats, so it's worth registering just to see this.
- One-click e-mail confirmation instead of cut-and-paste your temporary password (Drupal core functionality)
- Ability to be alerted when pitches are added to selected categories (core Taxonomy module and Notifications). Update: The site has categories, but despite signing up as interested in everything I've yet to receive notice of anything.
- Donations to the site in general, not just specific pitches (ECommerce or Ubercart. These could be added as matching funds to others' donations. (Lots of traffic was generated in news articles about the site, and people enthusiastic about the idea with no stories matching their interests should have been able to donate, indeed set up recurring donations, to support the site and the stories chosen by others).
- Integration with other Drupal sites. Not really automatic, but if written by Drupalers there would already be a Spot.Us Drupal module (and probably a Wordpress plugin and a generic drop-in widget) for sites with a stake in a pitch on Spot.Us to solicit donations to that pitch. Drupal sites like the Bay Area's Public Press or, on the other side of the country, Open Media Boston, could pull information from Spot.Us and have one click to get their readers and members involved in crowd-funding a story.
- RSS feeds! Also related to promotion, a Drupal Spot.Us would have built-in RSS for listing of tips and pitches and every category.
- Turn-key local Spot.Us groups (Organic Groups). Instead of only encouraging other people to download the free software (though that is great), Spot.us could allow selected people to curate or manage regional editions beyond California's Bay Area. (Furthermore, people who do install the software themselves could draw on the huge Drupal ecosystem of modules to plug in all this functionality and much more.)
There, I hope that's lit a fire under some Ruby/Rails folk! Now, with all that said – and with only the dedicated few still reading – here's the real point of this post:
None of the above matters.
Just as the code language (PHP) and even quality of Drupal is secondary to its amazing community, the technology of Spot.Us is a distant second in importance to its passion, purpose, and the energy that flows from its reason for being.
As readers of IdeaLab know, Dave launched this thing with a wiki (oh, and a Drupal site of about three pages, which was undoubtedly the critical factor in Spot.Us' success).
Technology can certainly help or hinder the development of community — that is, after all, the premise of the Knight News Challenge — but tools matter far less than a sense of purpose and a drive to see it through.
Of ideas whose time has come, community-funded reporting is definitely one. Please, just to spite me, go make Spot.Us a resounding success without a drop of Drupal. The new breed of local, independent, and smart news sites it will help flourish are as likely as not to be built in Drupal anyway!
Drupal Meetup Etiquette
I've been working with drupal and have been a part of the community for a fews years now. Although I may not be the most active member around, I have attended a decent amount of drupal meetups all over Massachusetts and New York City.
Innerfade 2.0 dev snapshot
Here's the module if you need a quick fix, I'll be adding cleaned up code and a detailed set of instructions soon, stay tuned
Set higher minimum server environment requirements for a Drupal installation profile
There's a hook for that! The logically named hook_requirements lets you set requirements for each module.
To make these requirements apply to an installation profile, simply put your implementation of hook_requirements in the .install file of a module that is required by that installation profile.
Where is my Drupal? How to find a lost Drupal site on a server if you can still get to the site
Agaric Design Collective would like to stress that this note was written while working on an existing site of a client, on the client's server, before we started working with it. We at Agaric are not in the habit of using web sites.
Provide an 'Add New' link on a simple view for easily creating more content to list
It's a common situation– you create a simple view that may do little more than filter on one content type in order to get a listing of press releases or links or recipes.
Theme the Search Form in Drupal 6
So it's 1am and you want to theme the search form output of your brand new drupal 6 theme, here's the quick and easy one step guide that will get you though it. Yep, that's right, 1 step, because that's how we do it the agaric way...
Notable Blogs
Dev Talk
Theming
Ask Agaric
Hall of Fame
- How to theme (lots of) views the Agaric Way
- Purpose and initial success
- Web Development
- Transfering files directly between two servers: setting up ssh keys
- Citizen Journalism Sites
- Community Communication: Integrated Forum & E-mail List
- Collaborative Software - Wiki Wikis
- Nice Menus drop down bug
- Photoshop Resources
- Don't let this happen to you
Recent Content
Facebook and Drupal, beyond RSS
http://szeged2008.drupalcon.org/program/sessions/building-facebook-appli...
http://developers.facebook.com/documentation.php
http://drupal.org/project/fb
http://apps.facebook.com/drupalforfacebook
http://www.drupalforfacebook.org/
See also
Using Drush (experimental release) to add modules from outside a site
sudo ~/drush.experimental.6/drush.php -r /var/www/drupal-6-agaric-core/drupal pm install link
On sharing the command with an esteemed Agaric colleague, I realized that the instructions had to be tweaked slightly... for another person, even if run
on /our/ server... and the way that's written, *anywhere* on our server
SQL Reserved Words Checker
http://www.petefreitag.com/tools/sql_reserved_words_checker/
Other Resources
http://openmrs.org/wiki/SQL_Reserved_Words
http://developer.mimer.com/validator/sql-reserved-words.tml
All this to satisfy myself that "word" isn't a reserved keyword.
Open Archives style metadata exposure for Biblio module
There is a module to provide an Open Archives Initiative Protocol for Metadata Harvesting (OAI-PMH) interface to the Bibliography module.
http://drupal.org/project/oai2
http://www.openarchives.org/pmh
Drupal use schema for uninstall
Even some quality modules by very good developers are still using db_query("DROP TABLE {example_table}"); rather than the schema just defined and properly used by the update.
But sure enough, the hook_uninstall API documentation example shows the use of schema:
<?php
function example_uninstall() {
The Drupal way, in a sentence
On IRC #drupal:
webchick: What I would rather do is pimp out trigger module so we could do that kind of stuff just through configuring some actions
Shell commands for untarring (and deleting the archive) a bunch of gzip files
In the process of adding modules Agaric finds useful to Drupal development to a special git repository I did a bit of bash command line scripting that was fun for me:
After a bunch of wget's like:
wget http://ftp.drupal.org/files/projects/schema-6.x-1.3.tar.gz
I ran:
Drupal development modules
Agaric has added the following modules to our development git repository. Alphabetical order:
http://drupal.org/project/coder
http://drupal.org/project/coder_tough_love
http://drupal.org/project/deadwood
http://drupal.org/project/devel
http://drupal.org/project/enabled_modules
http://drupal.org/project/export_node
http://drupal.org/project/hooker
Learning Drupal by Helping Others Learn Drupal: Doing Documentation on Drupal.org
Coming from the best ways to learn are by doing and teaching school of thought, Agaric encourages anyone interested in getting better at Drupal or getting more involved with Drupal to attend Add1sun's January Documentation Challenge, Saturday's at 1 p.m.
Views creating blank rows? Check your node type filtering
The 'Items to Display' in Views is set to 10. The number of blank lines that show are the difference between the limit in Views and the actual number of items in the table. So in this example, there are 7 extra blank lines (odd/even coloring) in Firefox -- there are no extra blank lines in IE.
Agaric wrote:
Moving mail handling to a new server
Some quick notes from the process, captained by Stefan.
Change the MX Record:
Old Information
Domain Preference ExchangerNew Information
Domain Preference Exchanger
mtgrading.com 10 mail.agaricdesign.net
Or actually, keep the old one, but set it at a higher number (and so lower preference).
Bulk taxonomy import term-by-term is just too slow
Struggling with taxonomy import.
After stripping everything out, the conclusion is that taxonomy_save_term, by itself, without even the hooks to add extra data, is simply too slow, with a minimum of three database calls per term. (data, hierarchy, vocabulary)
Access Drupal functions and session from a PHP script in a site subdirectory
If you want to use Drupal sessions and the logged in user object from a straight PHP script not at Drupal root but somewhere in subdirectories in a site, you will probably need to do something like I endend up doing in profiles/scf/switch.php to impersonate the Drupal site root directory.
In fact, I think the partial installation profile idea might need something like this.
Have Songbird automatically organize music library; change location of library
Awaiting an update to this extension:
http://addons.songbirdnest.com/addon/8
Or other solutions here or here:
http://getsatisfaction.com/songbird/topics/automatically_organizing_musi...
http://getsatisfaction.com/songbird/topics/automatically_organise_the_mu...
songbird move files when importing to library
or even here:
Database user creation and permissions
CREATE USER '6-agaric-core'@'localhost' IDENTIFIED BY '*************';
GRANT USAGE ON * . * TO '6-agaric-core'@'localhost' IDENTIFIED BY '*************' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
CREATE DATABASE IF NOT EXISTS `6-agaric-core` ;
Git profile project in an SVN Drupal site
Note: This approach should be considered deprecated in favor of a pure Git system.
For installing the SCF profile for use as part of an existing site managed in SVN:
Git it:
http://sciencecollaboration.org/node/5
cd profiles/
git clone git@github.com:scf/scf.git
svn propset svn:ignore .git .
svn add scf
"Science Collaboration Framework (scf) profile added."
Adding tracking code via template.php
Adding custom tracking Javascript confused me on doing it the Drupal way.
When the goal was adding:
<script type="text/javascript" language="javascript">llactid=14159</script>
<script type="text/javascript" language="javascript" src="http://trackalyze.example.com/trackalyze.js"></script>How is that first one done? just a straight call and that code?
Manually add a new repository to the Agaric test server
Manually add a new repository to Agaric's test server
On the test server:
cd /srv/git/
sudo -u git mkdir agaric-devel-6.git
sudo -u git git init --bareBack home on the ranch:
cd /RCS/git/
mkdir agaric-devel-6
cd agaric-devel-6/
git init
Initialized empty Git repository in /RCS/git/agaric-devel/.git/
git add .
Disable problem module through the database via command line mysql
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2266274 bytes) in /var/www/example/profiles/scf/modules/contrib/devel/devel.module on line 1377
mysql -u example -ppassword -h agaric.example.edu
mysql> SHOW DATABASES;
mysql> USE example-dev;
mysql> SHOW TABLES;
mysql> SELECT name FROM system;
Updating a module in Git (the hard way, resolving a conflict)
(Some old notes from Stefan that I had to look up, so putting them online).
yesterday night i learnt some git. now i can tell you the meaning of fast-forward.
when you create a new branch off another one and after some time you want to merge the changes and the other branch hasn't advanced it's a fast forward merge. otherwise a merge commit will be crated.
One character patch to location module to get rid of senseless too many empty locations error
Working on the Trade Justice "site sprint" to launch this long-running and ambitious project...
alaken: I just tried to import a CCK node type from my site, and got "You can't show more empty location forms than the maximum number of locations allowed for this content type." - you know what causes this? There is no location stuff in my import.
Embed, block, or page View with Panels?
Andy Laken explains: block view uses the configuration in the block portion of the view, and embed uses the page configuration options even if page is not checked off.
The secret plan to store configuration in files
There does not seem to be any discussion about a file-based approach to saving configuration information in Drupal. Agaric comes to this conclusion after extensive Googling (see the keyword details of this post; by the way, I can confirm that word order matters when doing Google searches, even in the absence of quotation marks).
Remember to pay attention to timestamps for anything you send to RSS
Timestamps matter for content you push to RSS, especially feeds that are picked up by an aggregator.
Firefox not respecting CACert
Secure Connection Failed
mail.agaricdesign.net uses an invalid security certificate.
The certificate is not trusted because the issuer certificate is unknown.
(Error code: sec_error_unknown_issuer)
* This could be a problem with the server's configuration, or it could be someone trying to impersonate the server.
Giving more people the power to approve subscriptions or memberships to a group
Client request, regarding a an e-mail for subscription requests to 'Example Mentors' from 'newusername' which she received through the site:
> To instantly approve this request, visit
> http://www.example.com/og/approve/407/581.
> You may deny this request or manage subscribers at
> http://www.example.com/og/users/407
Batch API process silently fails if function in file not in default Drupal bootstrap isn't explicitly included
<?php
function _batch_process() {
$batch =& batch_get();
$current_set =& _batch_current_set();
$set_changed = TRUE;
if ($batch['progressive']) {
timer_start('batch_processing');
}
while (!$current_set['success']) {
// If this is the first time we iterate this batch set in the current
// request, we check if it requires an additional file for functions
Can Drupal scale to 100 users?
I was talking about SCF and Drupal yesterday with someone I'm working with on another project, and he said he finds Drupal difficult to scale. He thinks that it's not capable of handling more than 100 users. If that's true, that would be a major concern for [our project]. What has been your experience regarding scaling issues with Drupal?

