University of Oregon

Mailman as a bulk mailer – imported member managment tips

I have 20000 email subscribers for two email lists (cjobs and ucjobs). These were all imported into our new Mailman service.
I had a few settings I needed to change to accommodate using Mailman as a bulk mailer. And it’s going pretty well.
First there were normal things like pre-pending the default email subject, updating the list name and bounce protocols, making sure no-one can post to the list except the one authorized user (bulk moderate every user).
That was easy.

But then there’s a default setting where any list member can view all the other members of the list… not good.
First I updated the html docs, removing the relevant info.
Then I needed update all the users; but there’s no bulk operation for that.
Instead there’s a Member Mgmt screen with columns of check boxes. CheckBoxMate to the rescue…
Almost; Mailman displays a max of 30 members at a time… (20000 / 30 = ouch), that’s a lot of clicking and dragging. (more…)

Bookmarklets for expanding, collapsing items in activeCollab

There’s a follow up post here: Adding a button for toggling nested items in activecollab.

I just put together a couple of bookmarklets that I thought I’d share.

They allow you to open/close/toggle nested menu items like checklists. (more…)

Drupal Bookmarklet to display a list of alpha and beta modules installed

I read a great post by Joel Sackett about a site they created for PBS using Open Atrium and Open Publish: Spreading The Love: Utilizing 2 Drupal Distributions To Achieve Efficiency
I wondered if there were any new Open Atrium releases that I missed and wanted to know just how ‘beta’ Open Atrium still is.
So I threw together a bookmarklet to display a list of alpha and beta modules installed.
I used it on the Available updates page in Drupal 6 (admin/reports/updates) in an installation of Open Atrium that I use to keep my custom modules arranged.
I ran the bookmarklet and it appended this to the bottom of my node. (more…)

Drupal6 VBO Open all Edit Links Bookmarklet

I needed to edit some custom content in a large number of nodes and while Views Bulk Operations (VBO) allowed me to filter down to those nodes there isn’t a custom operation to edit text in custom fields. Not that I would expect there to be one.
So I wanted to open all the edit links in one fell swoop. I have a bookmarklet: ‘Open Selected Links’ which would work OK if the edit link was the only link for each node but it’s not. So I thought Why don’t I update the script to use just the edit links.
And so I did.
The working script is all JS with one line of jQuery.
The line in question previously set the available links using

dl = document.links;

and now uses:

dl = $('#views-bulk-operations-form--1 .views-field-edit-node a');

Which is a collection of all the edit links on the page.

I could probably keep in the old default and prompt the user to use just the edit links but quick and dirty is the name of the game right now.
(more…)

New bookmarklet: Alphabetize

Here’s a time saver:
Check selected / all boxes
One click and you can check or uncheck all the checkboxes on the page. That is unless you have a selection of checkboxes highlighted; then it only operates on your selection. It works across frames too.

It’s based on the check all boxes bookmarklet which is a number of years old now. I’ve never needed to restrict my checking to a selection until today when setting permissions in drupal.
(more…)

Drupal & shell bookmarklet for updating modules 5 (updated – mulitple dbs, backup only option)

*Note: This is a follow up to the posts:

First off: here is the bookmarklet:
This first one is bare-bones; you get prompted for every var:
Install Mods Prompt

This next one needs to be customized to contain your directory and server data but then you don’t have to answer questions every time:
Install mods mysite
You can use http://subsimple.com/bookmarklets/jsbuilder.htm to edit the bookmarklet and set the defaults before saving it.

Now for the details:
I’ve refined the module install bookmarklets once again.
As with the previous versions: click the bookmarklet on a Drupal project page, pick the module and get the ssh script to install it.
Click the bookmarklet on your admin/reports/updates and get the code to install all the recommended updates.
This is tailored to work on our server and doesn’t work on our shell environment. Although it could with some modifications.
At this point you need to cut and paste the file and database backup lines independently because they each require passwords.
I’ll work towards a version that allows a single cut and paste.
(more…)

Check selected / all boxes bookmarklet

Here’s a time saver:
Check selected / all boxes
One click and you can check or uncheck all the checkboxes on the page. That is unless you have a selection of checkboxes highlighted; then it only operates on your selection. It works across frames too.

It’s based on the check all boxes bookmarklet which is a number of years old now. I’ve never needed to restrict my checking to a selection until today when setting permissions in drupal.
(more…)

Drupal & shell bookmarklet for updating modules 4 (updated – bookmarklet w/ base code)

*Note: A new post is available here: Drupal & shell bookmarklet for updating modules 5 (updated – mulitple dbs, backup only option)

This is a follow up to the posts:

Here they are.
This first one is bare-bones; you get prompted for every var:
Install Mods Prompt

This one needs to be customized to contain your directory and server data but then you don’t have to answer questions every time:
Install mods mysite
You can use http://subsimple.com/bookmarklets/jsbuilder.htm to edit the bookmarklet and set the defaults before saving it.

Details
I’ve refined the module install bookmarklets again.
I considered abandoning these in favor of the drush component but drush requires php 5.2 and we’re still using 5.1 at this point.
This works pretty well for me. Click it on a Drupal project page, pick the module and get the ssh to install it.
Click it on the admin/reports/updates and get the code to install all the recommended updates
(more…)

Drupal & shell bookmarklet for updating modules 3 (updated – wget bookmarklets)

*Note: A new post is available here: Drupal & shell bookmarklet for updating modules 5 (updated – mulitple dbs, backup only option)

This is a follow up to the post: Drupal & shell bookmarklet for updating modules
Also see: Drupal & shell bookmarklet for updating modules 2 ->just Recommended

I’ve refined the module install bookmarklets. These put the vars you might want to customize at the top so you aren’t changing the details every time:
For example:

  var siteDirName='site_directory';
  var siteBasePath='/var/www/html/';
  var backupBasePath='/home/yourName/drupal_backup/';
  var dbUser='drupal6-db-user';
  var dbName='drupal6-db';
  var serverName='myServer';
 

You can use http://subsimple.com/bookmarklets/jsbuilder.htm to edit the bookmarklet and set the defaults to suit your set up.

I use this first one on the admin/reports/updates page (where I know jQuery is installed) to capture all the ‘recommended’ updates and output them to a shell script that I cut and paste into terminal. Each update is fetched via wget, unpacked into my modules directory, overwriting the old module and then the zip file is removed.

After all the files have been processed, the directory is listed and the db and site is backed up.
Then I can begrudgingly go to the update page and run the script.

install all mods jQuery var

javascript:(function(){var siteDirName='site_directory';var siteBasePath='/var/www/html/';var backupBasePath='/home/yourName/drupal_backup/';var dbUser='drupal6-db-user';var dbName='drupal6-db';var serverName='myServer';var date=new%20Date();var saveDate=date.getMonth()+1+'-'+date.getDate()+'-'+date.getFullYear();var connect=confirm('Would%20you%20like%20to%20include%20the%20connection%20information?');var shellLocation=prompt('What%20is%20the%20location%20of%20your%20install%20directory?',siteBasePath+siteDirName+'/sites/all/modules/');var shellText=%22%22;if(connect){shellText='##ssh%20'+serverName;}if(shellLocation!==null){shellText=shellText+'<br />cd%20'+shellLocation;}with($('table.version-recommended%20td%20li.update-download%20a').each(function(){q=this.href.toString().split('/').pop();if(q!==%22%22&amp;&amp;this.href!=%22%22){shellText=shellText+%22<br />wget%20%22+unescape(this.href);shellText=shellText+%22<br />gzip%20-dc%20%22+escape(q)+%22%20|%20tar%20-x%22;shellText=shellText+%22<br />rm%20%22+escape(q);}}));if(connect){shellText=shellText+%22<br />wait%22;shellText=shellText+%22<br />ls%20-al%22;shellText=shellText+%22<br />sudo%20tar%20-c%20--checkpoint%20%22+siteBasePath+siteDirName+%22/%20|%20bzip2%20&gt;%20%22+backupBasePath+siteDirName+saveDate+%22.tar.bz2;%20%20##Backupfiles%22;shellText=shellText+%22<br />mysqldump%20-u%20%22+dbUser+%22%20-p%20%22+dbName+%22%20&gt;%20%22+backupBasePath+siteDirName+saveDate+%22.sql;%20%20##BackupDB%22;}if(shellText!==%22%22){if(window.clipboardData){window.clipboardData.setData('Text',shellText);}else{wnd=open('','Shell_Command','width=650,height=400,top=0,left=0,scrollbars,resizable');with(wnd.document){writeln('<pre>');writeln(shellText);writeln('</pre>');}wnd.document.close();}}/*if%20shellText!==%22%22*/})()

You’ll have to paste that in to your url bar as something about the syntax breaks the link in wordpress…
But you can grab the bookmarklet here: http://uoregon.edu/~vid/v_drupal_bookmarks.php. It’s the first one in the list.
(more…)

Drupal & shell bookmarklet for updating modules 2 ->just Recommended

Note *A new post is available here: Drupal & shell bookmarklet for updating modules 5 (updated – mulitple dbs, backup only option)

I just posted about a bookmarklet I wrote to help with processing drupal module updates.
After looking at the update (admin/reports/updates) page today. I noticed that there are occasionally more than one download link for each module. Some marked ‘Also available:’ as well as ‘Development Version’. So the new challenge is finding the recommended one.

After a bit of thinking I worked out a new bookmarklet. This time capitalizing on jQuery to grab the desired links:
Install all mods jQuery

It’s quite a bit shorter than the last version. 1164 characters vs. 2433 characters.
I would suspect that if I knew more jQuery I could replace quite a bit more as well; though most of the savings are related to the lack of selection highlight or direct entry support. The other bookmarks (wget in particular) will still be quite handy for installing from the Drupal site. (more…)