Archive for the “Internet” Category

While working on a couple of WordPress projects for two sites I host (www.cambridgerepeaters.net & www.cambridgeshire-raynet.net) I had the need to do mass account creation.  These were 30+ accounts at a time, not a thrilling prospect to do that via the normal admin interface.  Searching the net was nearly useless, until I found a WP plugin called “Import Users Plugin for WordPress”.  This worked, but was very simple and didn’t suit my needs.

So, after looking at the script and figuring out how it worked (I’m not PHP coder but I can get by in a pinch), I managed to hack the script to do what I wanted.  The script as provided above only allows for the email address and login name, the 2 required bits of info to create a new account on a WP system.  However, I needed to be able to specify:

  • first name
  • last name
  • password

Another nice thing to have on the import is being able to set the WordPress user role (access level), so I shoved that in as well.  On the plugin page I posted a comment about my updates and a link to the new modified script:

I’d like to submit another modified version of this great script. The changes I’ve made to the script allows for adding first and last names, setting a password and setting the role for the imports. I’m also using the more powerful method of account creation, “wp_insert_user” this allows a lot more in the way of adding nice things to the script and new account.

The import file or manually entered format is:

username|firstname|lastname|password|email|role

All fields except username and email are optional, but all fields must be delimited, ie:

fred|Fred|Rivers|mypassw0rd|fred@rivers.com|Editor
sam|Sam||sam@mypress.com|

Fred has everything assigned while Sam will be emailed his generated password and his role will be set to whatever was selected from the drop down box on the form.

I’d be interested in any comments on my changes. There have been quite a few changes, I suggest a diff of mine and the latest modified one.

My modified version can be found at:

http://www.uk-experience.com/scripts/dd-import-users-mod_wp27.txt

I hope people find this useful, I think it’s a function that’s needed by far more people then you might expect.  In my mind, it’s something that should be part of the core code for WordPress.  I can see more modifications coming to this script as my projects progress.  While looking into changes for the script I’ve found other things that would be nice to have at the time of import too…

Watch this space…
Updated script

2009.06.17 @ 2013GMT

Version 1.1.13 – Added user URL to be imported into user details (not the default assigned blog for WPMU)

dd-import-users-mod_wp27_v1.1.13.txt

Note the new format when using this version:

The import file or manually entered format is:

username|firstname|lastname|password|email|role|URL

All fields except username and email are optional, but all fields must be delimited, ie:

fred|Fred|Rivers|mypassw0rd|fred@rivers.com|Editor|http://blah.com
sam|Sam||sam@mypress.com||

Comments 46 Comments »

I’ve been searching the net for ages looking for the wiring diagram of the 12VDC power cable for my Respironics REMstar Plus CPAP machine.

 

Not having any luck at all on the net finding the information I needed to build a cable, I’ve finally broken down and paid £26.00 (including shipping) to buy one.  I’ve wanted a DC cable mostly so that I could a) go camping without the need to have a tent pitch that was powered (extra cost), and b) be able to power my CPAP should we have a prolonged power outage at home (fairly low risk of this, but a risk none the less).

 

Click on the image below to see the full sized one.  This is a page from the manual that came with my cable.

Basically, should someone have posted something like:

 

To make your own Respironics Shielded DC Cord, Part number 1001956, you will need the following:

  • 1 x 2.1mm (5.5mm outside) X 15mm Coaxial DC plug
    Such as: Maplin’s Part number HH61R (www.maplin.co.uk)
  • 2-3m of suitable wire for a max of 7amp DC (depending on your CPAP model)
  • 2-4 Clip on Ferrite suppressors, such as Maplin’s part N89AB
  • 1 x 12VDC cigarette plug, suitable for upto 7amp DC

The construction of a DIY Respironics CPAP DC Cable, model number 1001956 is quite simple.  Wire up the cigarette plug to the DC plug that will go to the CPAP, be sure to wire the tip of the cigarette plug (Positive 12V, I suggest a multi-meter to confirm this in your car or battery pack you intend to use) to the centre connector of the 2.1mm DC plug.  Wire the negative to the other remaining connections. 

At both ends of the cable, as close as possible to each of the plugs, leave not much more then 3-4cm of cable “exposed” put a couple of the clip on ferrite RF suppressors.  These are quite important as they will ensure the dc is free of RF (Radio Frequency) or Electromagnetic noise.  These, should they get into the machine, could cause damage.  You can likely get away without them, but frankly for the extra £5 it will cost for these it’s worth saving your £500+ CPAP.

 

That’s all there is to it.  I really hope people find this useful, for some reason there has been a black hole of info about these cables, and I’m not sure why.

 

**DISCLAIMER** This information has been provided purely for theoretical and personal information.  I will not, nor can not, be held responsible if you are not competent enough to build this simple cable and end up damaging or destroying your CPAP.  I’m pretty sure in the wonderful lawsuit happy world we  live in it’s also most likely a violation of your warranty to attach a home made DC cable to your CPAP machine.  You have been warned, don’t come crying to me if you blow something up, also, don’t ask me to make one for you.  These are beyond simple to make.

Tags:

Comments 4 Comments »

The upgrade to wordpress 2.6 was as painless as others have reported .. haven’t really looked around much to see what the changes really are yet, but one thing I noticed is a vast improvement to the plugins area.. they now seperate the active and inactive/deactivated plugins which is nice, but they’ve also added a active all/deactivate all and you can also delete plugins now too.  About time.

Not much else to report..  Now to upgrade the other 5 WP installs I manage ..

I wish they’d do more work WP MultiUser so I could just have 1 single install on the server and then create domain/user level instances as needed (would use a lot less disk for the installs and provide a single central point to update/administer .. it’s a good looking product, but needs updating.

Tags:

Comments Comments Off

Why? Why not. I was wondering how else I could make use of Twitter for other things I thought “How could I use twitter with my Asterisk PABX?” Doing some Google searching showed I wasn’t the first to think of this (as if that would have happened). There are a few people doing various things with asterisk and twitter.

I didn’t really like much of what I found, or found it wasn’t really what I wanted to do with it .. so I decided to use some of that info and came up with something of my own.

The short story is this. When someone calls my Canadian number, my US Toll-Free number any number that ultimately rings the group of phones in the house, I will now get a direct message in Twitter from a special account I setup for this purpose, which also sends a SMS to my phone (device notifications in twitter).

Read more by clicking below… Be warned! Thar be scripts and technical stuff in them thar parts

Read the rest of this entry »

Comments 9 Comments »

I’m just testing a blogging app on my phone. so far its alright. if this posts I will update in the morning with details of the application.

Posted from moBlog – mobile blogging tool for Windows Mobile

Haha ok, well, the posting worked.  I noticed that because the server is on UTC and my phone is on BST the posting actually was “scheduled” for posting 1 hour after I actually hit the submit button.  There might be an option in moBlog for that, I’ll have to have a look.   Otherwise this is slick, I can post blog entries from my phone, including being able to attach images to postings.

Tags: , ,

Comments Comments Off