Planet Drupal

Customizing "View More" Links In Views 1 For Drupal 5

CivicActions - 4 hours 1 min ago

A short, quick and easy tip for views theming and customization.

To customize the text or the destination path/url of a 'view more' link in Views. Add this to template.php in your phptemplate theme and add cases.

<?php
/**
* Override theme_views_more() to set custom link texts and destinations.
* @param $path String
*   The destination of the more link.
*/
function _phptemplate_views_more($path) {
  $text = 'more';
  switch ($path) {
    case 'foo/bar':
      $text = 'doh';
      break;
  }
  return "<div class='more-link'>" . l(t($text), $path) . "</div>";
}
?>

read more

Categories: Planet Drupal

Sun using Drupal

Dries Buytaert - 4 hours 9 min ago

Sun Microsystems recently launched another cool Drupal site: Sun Learning Exchange. The site enables Sun employees to easily publish rich media training content such as videos, podcasts, and documents to be accessed by all Sun employees and customers. Media can be rated, sorted, and tagged by site members and is automatically transcoded and hosted on LimeWire. The site was built with the help of our friends at Chapter Three. Sweet!

Sun learning exchange
Categories: Planet Drupal

Dries is a "World's Top Young Innovators for 2008"

Bert Boerland - August 19, 2008 - 20:48

Just as the internet is bigger then 127.0.0.1,Drupal is bigger then Dries. However, every hurd needs a leader and within the Drupal community, Dries has proven that he is not just a good coder but a very wise project lead creating a very rich community around his product, not just around him.

It is the community what makes an Open Source project successful, not the code perse. Bad code can be used in a creative way by a smart community, good code without a community is just same as proprietary software.

And that is why it is good to see that Dries has been chosen as a "Young Innovator". Read the press release at prweb:

"The TR35 honors young innovators for accomplishments that are poised to have a dramatic impact on the world as we know it," said Jason Pontin, editor in chief and publisher of Technology Review magazine. "We celebrate their success and look forward to their continued advancement of technology in their respective fields."

You can see all the Top35 Young Innovators in the infotech section over at technologyeview.com and Dries profile as well. Congrats Dries! But remember -and this is note to self-, there is no "you" in Drupal Smiling

Categories: Planet Drupal

Build An Aggregation Site With Drupal (Part 1)

Laurence Mercer - August 19, 2008 - 19:08

This tutorial will be split into three parts - part 1 (this part) will explain how to set up the aggregation and import feeds, part 2 (to be published next post) will explain setting up cron to handle auto updating the feeds and will also cover using views to create some different site sections, and part 3 (to be published the post after that) will explain how to theme everything. In the tutorial I will be building a Drupal based sports news aggregation site, but you can obviously tailor this to whatever type of news items you'd like.

The goals:

  • Create an aggregation site which aggregates RSS feeds and outputs them in river of news style pages with the most recent news items first.
  • Create some different site sections (football and baseball) which only show news items related to that topic.
  • Allow users to filter news items by source (e.g. ESPN, BBC etc.).
  • Create RSS feeds of our aggregated pages which are available for our users.

You can check out the finished aggregation site (part 1) here.

The set up:
For this tutorial I'll be using the following:

  • A clean install of Drupal 5.10 (using Garland)
  • SimpleFeed 5.x-2.2
  • Views 5.x-1.6


A quick word on SimpleFeed vs other aggregation modules:
There are a number of other aggregation modules available for Drupal. From my own experience the two best are SimpleFeed and FeedAPI. FeedAPI has excellent functionality and can do some very cool stuff (for example, check out this video on drupaltherapy.com which shows how to use FeedAPI and feed element mapping). However, in this case I've chosen to use SimpleFeed because I don't require any of this extra functionality and SimpleFeed is, well, the simplest to use.

Step 1: Set up the site and modules
Set up your Drupal site and then download and install the SimpleFeed module and the Views module. Select the following options for each module:

Drupal SimpleFeed and Views module options

Step 2: Install the missing simplepie.inc file
In order for SimpleFeed to work correctly it requires that we place the simplepie.inc file from the SimplePie library into our SimpleFeed module directory. If you currently go to your status report (admin/logs/status) you'll see the following error alerting you to this fact:

Drupal SimpleFeed SimplePie missing error message

So, to sort this out do the following:

  • Go to simplepie.org and download the latest version of SimplePie by clicking on the big 'Download' button (at the time of writing this is SimplePie version 1.1.1).
  • Extract the contents of the download, which will create a folder named 'SimplePie 1.1.1'.
  • Open this folder, locate the simplepie.inc file, and copy it into your SimpleFeed module folder. So you should have 'sites/all/modules/simplefeed/simplepie.inc'.

Now when you check your status report page you should not see any errors.

Step 3: Set up a vocabulary
In order to theme our news items more effectively, and to help us with filtering and sorting news items, we're going to assign taxonomy terms to them. SimpleFeed includes auto-assign functionality for taxonomy terms which will be very helpful here.

First, go to the 'Add vocabulary' subsection of the 'Categories' admin section (admin/content/taxonomy/add/vocabulary). Then create a vocabulary with the following settings:

  • Vocabulary name: Source
  • Types: check 'Feed' and 'Feed Item'
  • Check 'Free tagging'

Drupal vocabulary settings

Step 4: Configure your SimpleFeed settings
There are a few places where we can configure settings for SimpleFeed:

  • SimpleFeed settings page (admin/settings/simplefeed)
  • Access control 'simplefeed module' settings (admin/user/access)
  • 'Feed' content type settings page (admin/content/types/feed)
  • 'Feed Item' content type settings page (admin/content/types/feed-item)

SimpleFeed settings page
The SimpleFeed settings (admin/settings/simplefeed) are fairly self explanatory. In this
case we will use the following settings:

Drupal SimpleFeed settings

'Discard feed items older than:'
we always want our feed items to be available to users so we set this to 'Never'.

'Check feeds every:'
1 hour is good here as sports news is quite frequent, so we want to check for updates
often.

'Default input format:'
we'll start be leaving this as the default 'Filtered HTML' option which will filter out
any HTML tags that are not specified in the input format settings (admin/settings/filters).
However, with RSS feeds you can find that unclosed tags in a feed item will have an
adverse effect on the rest of your page so you may need to remove further tags options
after some testing.

'Vocabulary'
set this to 'Source' which was the vocabulary we set up in the previous step. This will
allow feed items to automatically inherit their parent's taxonomy terms.

'Automatically add categories set by external feeds to the vocabulary above'
we will leave this unchecked as we want to tightly control the taxonomy.

'Cron throttle'
the default 50 will be plenty for now!

Access control 'simplefeed module' settings
For this tutorial we're not going to change anything here, but you may want to depending upon the site usage.

'Feed' content type settings page
By default both the 'Feed' content type and the 'Feed Item' content type have their 'Default comment setting:' option set to 'Read/Write'. In this case we don't want users commenting on either so we'll change them to 'Disabled'.

To do so, first go to the 'Feed' content type settings page (admin/content/types/feed) and
scroll down to the 'Workflow' section. Then just change the 'Default comment setting:'
option to 'Disabled'.

Drupal SimpleFeed settings

'Feed Item' content type settings page
Do the same as for the 'Feed' content type and set the 'Default comment setting:' option to
'Disabled'.

Step 5: Find some RSS feeds
As this is going to be a sports news aggregation site I've gathered together the following RSS feed URLs and chosen a taxonomy term for each:

Just remember to check the terms of use sections on each of the websites regarding the republishing of feed content.

Step 6: Add your RSS feeds
Now everything is set up, let's add some feeds!
Go to 'Create content > Feed'. We'll start by adding the BBC sport front page feed with the following settings (the feed URL and taxonomy term are taken from Step 5 above):

Drupal - add a SimpleFeed feed

We've already taken care of all of the other settings (like input format, comment settings), so hit 'Submit'. The feed will be created and you should get the following confirmation screen:

Drupal - SimpleFeed feed created

Now we need to actually import the feed items.

We could wait for our cron job (which we'll set up in part 2 of the tutorial) to fire and trigger the auto update of the feed for us, but for now we'll do it manually.

So, click on the 'Refresh this feed' link and SimpleFeed will look for, and import, the new feed items. SimpleFeed imports each feed item as a node. After a second or two it should have found the new items, created the nodes, and output the following success message:

Drupal - SimpleFeed feed items created

One quick thing to note here is the first line 'The directory files/cache_simplefeed has been created'. If file permissions for this folder are not set correctly on your server it can cause cron errors, but we'll deal with this later on if it's a problem.

Finished! (Part 1)
If you now check the front page of your site you should see all of the feed items from the BBC front page RSS feed. Go ahead and add the other feeds the same way as the BCC feed (using the feed URLs and taxonomy terms from Step 5 above). The site won't do a lot yet, though, so we'll sort that out in part 2.

Coming soon...
In part 2 we'll set up cron to handle auto updating the feeds and also use views to create some different sports sections (football and baseball) and RSS feeds.

In part 3 we'll get to theming everything.

Categories: Planet Drupal

Getting Rich Fast ?

Kris Buytaert - August 19, 2008 - 18:19

Lukas Kahwe Smith has an awesome post titled "Open Source is not making enough rich people richer" .
Indeed, there is much talk that the VC's , the Investors and different others aren't seeing the big money fast enough, according to them that is.
Does that mean that the open source industry is going bad ? Does that mean you can't make a living when working in the Open Source industry ?

Absolutely not, as he points out there are uncountable people gaining a good living with Open Source, developers working on the different projects as their day job, system administrators managing open source platforms. We are helping out customers to implement Open Source and Free Software. And there are numerous other Drupal, Mysql, Xen, shops out there. Some have their own open source products and create a business on top of that , others are supporting popular platforms locally.

Lots of other companies are innovating on top of Open Source, they are using the LAMP stack or just Linux as an OS to build their products on they need the stability and the features an Open Source stack provides them with and only in this way they can deliver their customers with a stable and cost effective platform. Lots of these companies contribute back to the open source community (sadly some don't ..yet) .

But at the end of the day there is much more money involved in the Opensource world than the money the Open Source product vendors like RedHat, Alfresco, Zimbra, Zenoss and are getting from selling their products.

And that's what counts !!

Categories: Planet Drupal

A graphical progress bar widget for FormsAPI

Frederic Marand - August 19, 2008 - 17:44

A graphical progress bar widget for Forms API In the previous post, we saw how to create a XHTML progress bar widget for Forms API, using theme_progress_bar. The next logical step is now to create a graphical equivalent to that progress bar, as an example for far more advanced fully graphical widgets made possible using a similar mechanism.

read more

Categories: Planet Drupal

Fresh Paint

Aten Design Group - August 19, 2008 - 15:50

The Aten Design Group website has a new look. Well, maybe not an altogether new look, but a revised look. We’ve modified the typography, adjusted the layout, and made some color changes. The blog sports a reversed color scheme, with syntax highlighting for code examples.

read more

Categories: Planet Drupal

How To Rebuild The Menu In Drupal 6

CivicActions - August 19, 2008 - 15:17

To rebuild the menu in Drupal 6 you have to go to admin/build/modules.

In drupal 5 the menu is cached in the cache_menu table, so it is easy to invoke a menu-rebuild by emptying the table with a simple mysql command like TRUNCATE cache_menu;. (I have a handy script that empties all tables starting with cache_).

read more

Categories: Planet Drupal

5 reasons why not to use panels (and 4 reasons to use them)

Bèr Kessels - August 19, 2008 - 15:15

Drupal’s block system is far from ideal. It was designed back in the threecolumn-era, was improved to work beyond three-columns-content-in-middle layouts, but is still unsuited for more complex layouts.

If you want real complex layouts, you will have to turn to Panels, or Panels2. Or so they say.

A client of mine, a large Dutch media company uses Drupal for all its new sites -about four, five each month-, and untill today used panels in these sites.

read more

Categories: Planet Drupal

Sharing content with Domain Access

Trellon.com - August 19, 2008 - 14:37

We were recently approached by a client who wanted to create two sites to serve different audiences but with vast amounts of common content. The same group of people would be responsible for the upkeep of both sites and the desired solution would allow content to be shared with great ease.

read more

Categories: Planet Drupal

Simple permissions for uploads per node type

Paul Byrne - August 19, 2008 - 13:56

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 remove (using PHP's unset) 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 unsetting form elements like this? Is it a wise thing to do, or is there a better way?

read more

Categories: Planet Drupal

Drupalcon Szeged wifi and code sprint sponsors help us get stuff done

Drupalcon Szeged 2008 - August 19, 2008 - 12:26

Finding a conference venue with good wifi for hundreds of Drupal geeks is not easy. Since these conferences grew big, it was always a challenge to work out. This year, we also started planning early on ensuring good wifi coverage for the event. Our venue has some wifi coverage, but it was not adequate in itself. We asked for cable based internet for speakers, we set aside a BoF area with switches so if you bring your ethernet cables, you'll be able to plug in and we even ordered a computer cabinet with English speaking setups for those without their laptops.

But to solve good wifi for the Drupal crowd, we needed a professional partner. Thanks to university connections, and our venue's dedicated people, we managed to strike a sponsorship deal with Cisco, so we get the equipment to set up on the broadband university network. People at the university are working hard on configuring the network for us to ensure a good experience over all days of the event.

We also have some surprises for those staying for the code sprint this time. You might have heard that the second edition of Pro Drupal Development is out. We will hand out 15 free copies of the e-book version for code sprinters thanks to the publisher Apress! Another natural fit for code sprint sponsorship is ActiveState, makers of the popular Komodo IDE. They provided two Komodo IDE licenses and some Komodo shirts for hard working coders.

I'd like to hereby thank all three for their support for the conference and for helping us get stuff done at this Drupalcon again.

read more

Categories: Planet Drupal

But there are remedies

Károly Négyesi - August 19, 2008 - 10:20

This is more a comment to Nedjo's recent post than anything else. Currently http://drupal.org/node/271216 blocks a lot of work -- it is indented to lessen the hardwiredness mentioned in the article and also further testing.drupal.org . It'd be great if people would help with testing the patch -- I admit, not easy but the Drupal.org Testing profile helps you. As the functionalit is mostly API, we need code reviews and coders to write some PHP and see whether they can indeed change the various properties of an issue with a single function call as the patch purports.

read more

Categories: Planet Drupal

Confessions of a one-time Project Module contributor

Nedjo Rogers - August 19, 2008 - 09:07

Or, The Project Module and the Deadly Sins of Drupal Development

Forgive me, Drupal, for I have sinned. It's been many months since my last confession.

At the Drupal Association we've set upgrading drupal.org as our top priority this year, and much of that work depends on project.*.

The Project module and kin are some of the most important pieces of drupal.org--and some of the most difficult. Six months after Drupal 6 came out, drupal.org still is still running Drupal 5, in large part because project.* is not yet upgraded.

The project modules deliver critical functionality used every day by thousands of Drupal site administrators and developers. The module set has got a lot of great work from maintainers Derek Wright and Chad Phillips and others, notably Adam Light. But - despite significant progress - the codebase is large, uneven, and difficult to maintain.

How did we get to this place? What can we learn from the experience?

I spent a few months some time back contributing to the project module. If the module set is a challenge, I can claim a portion of the credit. Here are my confessions.

The sin of hoarding

I have committed the sin of piling up too much in one place.

Lots of us have.

It's kinda like the cardinal sin of gluttony.

Project pioneered a lot of functionality in Drupal--automated mail advisories, file attachments ... the list goes on. In my case, the functionality included a query builder. We needed the ability to browse projects by multiple criteria (date, name, category...). So I coded a query builder--great idea, no?

Except that the limited and rudimentary query builder I wrote was just for Project module. What would it have looked like if, instead, we had worked on or supported a generic query builder, one that could be used in Project but equally in any other case where there was a need to filter and present lists of items?

"You mean, like Views," you ask? Yes, like Views. And, in fact, a month before I committed the query builder patch to project module, the first version of Views was posted. So, big mistake, and years later we're still paying for it. And, Project has tons of specialized hard-coded fields (CCK, anyone?), special case handling (actions and triggers?), and so on.

The sin of being wedded to a single site

I have committed the sin of site-specific code.

Maybe this is the sin of lust? "Drupal.org, I love you above all others!"

Over and over again, we wrote Project module code for the single, very specific use case of drupal.org. Various areas of functionality are so site-specific that they're at best useless clutter on any other site running the codebase. At worst, they render the solution unusable.

To take a fairly random example: on cron, we take all project issue comments of a certain age with a status of 2 and set them to 7.

Great, if like on drupal.org you want to close old issues. And assuming 2 is 'fixed', and 7 'closed'. But if you've changed 'fixed' to 'pending' and 'closed' to 'installed', you're gonna be mighty surprised.

Piling in site-specific functionality for drupal.org has provided short-term gains--we get the tools we want. But it's limited the usefulness of the module set to other projects. It's reduced the scope for contributions and improvements. And it's made the code hard to work with and maintain.

Penance

There are lessons for all Drupal developers in the history of Project module. Early design decisions have long lasting implications.

Here's my personal penance.

  1. If it's a generic need, I will code it generically. Much better to introduce a dependency or factor out a helper module than to hack in a solution that only your module can use.
  2. I will not worship my site above all others. Just because it's something wanted on site X doesn't mean it belongs in the module--even if site X is the primary user or the funder of the module.

Of course, these lessons don't help much with the immediate problem of how to move forward with updating and expanding on the key functionality provided by project.*. But the Project module maintainers are well aware of the challenges they're working with. Productive work is underway on updating and improving the Project codebase.

The discussions and debates continue about how best to meet our very specific needs on drupal.org without increasing the problems of site specific and customized code.

We may all have a bit of penance to do, but with any luck it'll be the good kind that leaves you refreshed and ready for new challenges.

[Disclaimer: blame this reflection about sin and penance on Dante's Inferno, my current summer reading....]

Categories: Planet Drupal

Creating a Template File Via a Form Element

Nick Lewis - August 19, 2008 - 07:35

If there is one thing I hate more than breath and martial arts (all kinds...), its writing copy within a php array. So for a recent project that required text-heavy forms, and a bunch of emails, I created an element that mimics php template. The usage and theme function are rather simple: (and rather stolen from phptemplate_render().

read more

Categories: Planet Drupal

Running groups of Drupal tests from the command line

Sacha Chua - August 19, 2008 - 07:26

I've written about using drush to evaluate PHP statements in the Drupal context using the command line before, and it turns out that Drush is also quite useful for running Simpletest scripts. Drush comes with a module that allows you to display all the available tests with "drush test list", run all the tests with "drush test run", or run specified tests with "drush test run test1,test2".

'Course, I wanted to run groups of tests and tests matching regular expressions, so I defined two new commands:

drush test run re regular-expression
Run all tests matching a regular expression that uses ereg(..) to match.
Ex: drush test run re Example.*
drush test run group group1,group2…
Run all tests matching the given groups
Ex: drush test run group Example

Here's the patch to make it happen:

Index: drush_simpletest.module
===================================================================
--- drush_simpletest.module	(revision 884)
+++ drush_simpletest.module	(working copy)
@@ -12,9 +12,13 @@
 function drush_simpletest_help($section) {
   switch ($section) {
       case 'drush:test run':
-        return t("Usage drush [options] test run.\n\nRun the specified specified unit tests. If  is omitted, all tests are run.  should be a list of classes separated by a comma. For example: PageCreationTest,PageViewTest.");
+        return t("Usage drush [options] test run .\n\nRun the specified unit tests. If  is omitted, all tests are run.  should be a list of classes separated by a comma. For example: PageCreationTest,PageViewTest.");
       case 'drush:test list':
         return t("Usage drush [options] test list.\n\nList the available tests. Use drush test run command to run them. ");
+      case 'drush:test group':
+        return t("Usage drush [options] test group .\n\nRun all unit tests in the specified groups. For example: drush test group Group1,Group2");
+      case 'drush:test re':
+        return t("Usage drush [options] test re .\n\nRun all unit tests matching this regular expression. For example: drush test re Page.*");
   }
 }

@@ -30,10 +34,18 @@
     'callback' => 'drush_test_list',
     'description' => 'List the available Simpletest test classes.',
   );
+  $items['test re'] = array(
+    'callback' => 'drush_test_re',
+    'description' => 'Run one or more Simpletest tests based on regular expressions.',
+  );
+  $items['test group'] = array(
+    'callback' => 'drush_test_group',
+    'description' => 'Run one or more Simpletest test groups.',
+  );
   return $items;
 }

-function drush_test_list() {
+function drush_test_get_list() {
   simpletest_load();
   // TODO: Refactor simpletest.module so we don't copy code from DrupalUnitTests
   $files = array();
@@ -60,6 +72,11 @@
       $rows[] = array($class, $info['name'], truncate_utf8($info['desc'], 30, TRUE, TRUE));
     }
   }
+  return $rows;
+}
+
+function drush_test_list() {
+  $rows = drush_test_get_list();
   return drush_print_table($rows, 0, TRUE);
 }

@@ -75,3 +92,31 @@
   }
   return $result;
 }
+
+function drush_test_re($expression) {
+  if (!$expression) {
+    die('You must specify a regular expression.');
+  }
+  $rows = drush_test_get_list();
+  $tests = array();
+  foreach ($rows as $row) {
+    if (ereg($expression, $row[0])) {
+      $tests[] = $row[0];
+    }
+  }
+  simpletest_run_tests($tests, 'text');
+  return $result;
+}
+
+function drush_test_group($groups) {
+  $rows = drush_test_get_list();
+  $tests = array();
+  $groups = explode(',', $groups);
+  foreach ($rows as $row) {
+    if (in_array($row[1], $groups)) {
+      $tests[] = $row[0];
+    }
+  }
+  simpletest_run_tests($tests, 'text');
+  return $result;
+}

That makes running tests so much easier and more fun!

Technorati Tags: , , , ,

Categories: Planet Drupal

The problem with using a good web framework... or how to fix the Node Add form

Joshua Brauer - August 18, 2008 - 21:36

One of the problems with working on a great web framework is one makes assumptions about where the bugs lie. It is much easier to believe that the code I've written has a bug than that framework has a bug. Compounding the problem when you check out a website like Drupal.org and don't find a mention of the problem that perhaps you're the only one who has ever had the problem.

Such is the way I spent the morning. Working on a site and watching chunks of hair turn grey while searching for my mistake. Then in the latter stages of testing, having eliminated my code and all the modules that one starts to look at Drupal Core with a questioning eye. And that is when I found the bug, with comments and all, hanging out in the node module.

read more

Categories: Planet Drupal

Email Newsletters and the Simplenews Module

Dale McGladdery - August 18, 2008 - 21:01

In April 2008 the Vancouver League of Drupalers featured a presentation on email newsletters by Monique Trottier of Boxcar Marketing titled: Email Newsletters: WTF?, and an overview of the Simplenews module by yours truly.

The video of Monique's presentation turned out well and can be viewed with complete show notes at Email Newsletters: WTF? (6 Mistakes to Avoid), or by watching the embedded video below. It's filled with practical information and a must-see for anyone serious about using newsletters.

My presentation didn't video so well, so here's the recreated notes:

Overview

Simplenews is a module that adds newsletters to Drupal. It has the following major features:

  • Does not require recipients to have a Drupal account
  • Has subscription verification via email
  • Uses a node as the newsletter body, allowing content integration with Drupal
  • Large mailings handled by cron
  • HTML newsletters supported if Mime Mail module also installed

Configuration/Management

All of Simplenews is managed from Administration >>> Content >>> Newsletters

The configuration and management options of Simplenews and created newsletters are available there as tabs:

Simplenews Administration Menu

General configuration is managed under the Settings tab. The Cron throttle is an important setting and one you'll need to determine based on your own requirements. Otherwise there is very little general configuration required, just your default newsletter settings.

All newsletters are managed from a single interface under the Newsletters tab. There you're given the option to list, add or edit the site's newsletters.

Simplenews Newsletter Tab

Once a newsletter is created, you can go back to the Settings tab and customize any settings that are different from the site default. In the picture below, you can see the General sub-tab for site-wide defaults and the sub-tab for a newsletter named SiWC Announce.

Simplenews Newsletter Settings

Subscriptions

The administrator can manage subscriptions directly via the administrator user interface. Users can manage their subscriptions via a newsletter subscribe/unsubscribe page or via individual newsletter subscription blocks. The blocks are created when a newsletter is created and are disabled by default, so you need configure them per your requirements.

Simplenews understands the difference between authenticated and anonymous users and handles both.

Newsletters

A newsletter is a Drupal node and so created the way any other Drupal node is created. Once created, you can view it as you would other Drupal content or use the Simplenews management menu. There are Sent Issue and Draft tabs.

Simplenews Sent Tab

The newsletter node has the standard Published and Unpublished status, and it adds a Sent status with values of Not Sent/Draft, Pending, and Sent. The newsletter management interface has tabs to view newsletter Sent and Draft issues. The sent status is also exposed to Views for building custom reports.

If your newsletter is plain text and you use HTML markup in your newsletter body, it will be converted to plain text. If the mime mail module is installed and the newsletter is configured for HTML the HTML is preserved. Images attached to the node as file attachments and referenced in the node body are included in the message body as mime attachments and the mime attachment referenced by the image tag src attribute.

A user specific unsubscribe link is automatically appended to the newsletter content.

The node's published/unpublished visibility status on the site is independent of its draft/pending/sent delivery status. This means the newsletter may be visible on the site before it has been sent to its recipients, or vice versa.

Operation

I've used Simplenews on two sites, one with a 40 subscriber newsletter and the other with a 2000 subscriber newsletter. There's only been one problem, and that was because of the cron configuration. Cron was configured to run once per day and the number of subscribers exceeded the number of newsletters sent per cron run. It appeared newsletters were getting delayed because some people received them a day or two after others. In reality the "slower" newsletters were simply waiting till the next cron run. Adjusting cron frequency and deliveries per cron run resolved the issue.

An example of Simplenews with Views integration can be found at SiWC Newsletter.

Categories: Planet Drupal

Making SMS Work For You -- Building SMS Actions for Drupal

cascadingStyle - August 18, 2008 - 18:57

At the MIT Mobile Experience Lab, we are doing a lot of interesting projects to connect people more with the places they visit, the people they know (or don't know), and information, with an emphasis on helping people while they are mobile. Since an increasing number of mobile people carry mobiles, a lot of my work has been working on ways to create connection by using a cellphone.

Lately in particular I have been working with SMS. The SMS Framework for Drupal is pretty awesome, but we needed better two-way communication. We aren't trying to just let people post to a Drupal site via SMS, we needed to be able to send commands to Drupal via SMS to trigger activity in the site and receive feedback.

I drew a lot of the design for my SMS actions from my experience working with the Services module and it functions in a very similar way. Contrib modules register their own actions (keywords which are triggered off the first word of an incoming SMS) and specify callback methods for those actions. The callbacks then process the text and can fire back responses to the user or simply just perform some action in the system.

read more

Categories: Planet Drupal

Szia Szeged! Off to DrupalCon

Development Seed - August 18, 2008 - 18:37

I’m the first of the Development Seed crew to head out for Hungary, and I have to say I’m excited. I left Washington, DC on Friday for Vienna to have a week of vacation and visiting with friends and family. Then it’s time to hit the DrupalCon circuit again.


There are many sessions I’m looking forward to. Rasmus, the creator of php, shocked us al in Sunnyvale and I’m sure he has some new surprises for us in Szeged. Robert Douglas is leading a talk I’m particularly interested in on the future of search. We’ve been looking into alternatives to Drupal’s search, and it would be great to have a better solution in Drupal itself. Other session’s that I’m excited for are:

Several of my colleagues here at Development Seed are participating in some interesting sessions. Jeff will present recent developments on the Context and Spaces modules, Jose will talk about improvements to the Messaging and Notifications frameworks, and Eric will disclose how he attracts and retains Drupal talent on a panel with Robert Scales from Raincity and Tiffany Farriss from Palantir. Also, Aron and I will explain what’s cool about the new core aggregator patch.

I’m looking forward to seeing everyone in Szeged. If you haven’t gotten tickets yet, there’s still time to register and there are some affordable travel options out there. Hope to see you in Szeged!

read more

Categories: Planet Drupal
Syndicate content
 
 

Drupal is a registered trademark of Dries Buytaert.