• Category Archives web fun
  • Internet » web fun
  • WordPress Mass Account Import

    Posted on by rob

    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:

    https://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||


  • Respironics CPAP DC Cable

    Posted on by rob

    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.

     


  • Upgrade to WordPress 2.6

    Posted on by rob

    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.


  • Clifford Stoll

    Posted on by rob

    Pure genius ..

     

    About this Talk

    Clifford Stoll captivates his audience with a wildly energetic sprinkling of anecdotes, observations, asides — and even a science experiment. After all, by his own definition, he’s a scientist: “Once I do something, I want to do something else.”

    About Clifford Stoll

    Astronomer Clifford Stoll helped to capture a notorious KGB hacker back in the infancy of the Internet. His agile mind continues to lead him down new paths — from education and techno-skepticism… Read full bio »

     

    Check this site out..


  • Twitter is here to stay…

    Posted on by rob

    OK, I’m hooked on .  I was a bit dubious of it’s real usefulness to start with.  OK, there sure are a lot of mindless postings to twitter, but I suppose it depends if they are made by someone you know or not.. you’ll clearly be missing some context.  I am definitely going to be keep on using this great service.

     

    A lot of the people I follow and those following me are ham radio folks.  It’s a slick and instant way to send updates to your followers and friends.   For example, if you were sitting on the radio and calling CQ you might send a tweet¹ to say what frequency you’re on.  Another use might be if you are out working specific squares or counties or whatever you could let folks know which one you are in and what freq you are on.

     

    A lot of audio and video podcasters use twitter as well, they send out tweets to let listeners know if they are on live and a URL where to find them, or just to let their fans know when new podcasts are up on their sites.

     

    It’s also just another form of CB really, you can message with friends around the world while out and about or just at home.

     

    Access to twitter is pretty wide open.. you can use SMS text messages, the main website – http://twitter.com, the mobile website http://m.twitter.com or a host of applications for mobile phones, PC, PDA’s, etc, etc.  It’s just crazy how popular this service is.

     

    Check it out and add me to your friends 🙂

     

    ¹ – a tweet is what a twitter posting is called