Tag: Drupal7

  • Configure Microsoft Live Writer to work with Drupal

    Hey! I’ve managed to configure Microsoft Live Writer to work with my Drupal install (see this URL).

    I had a minor issue configuring Microsoft Live Writer, where I couldn’t login as my non-administration user. Initially, I worked that that returning the edit privilege in Drupal “Authenticated Users” made it work. Since then I had a more detailed look at this issue. It seems that rights to the Blog API needed to be granted. After that, I managed to restrict the rest of the rights to more or less where they were before.

    So, now I might actually start using Live Writer… it’s much easier to blog this way (yes, I like to do things the easy way were ever possible).

  • Using drush with drupal

    Using drush has been remarkably simple.

    I downloaded it as instructed on their site, and it almost works straight away. It was annoying to keep having to tell drush the site to use with the -l flag though, so I have configured it for my needs.

    I did this by making a .drush directory, and copying the example aliases.drush.php and drushrc.php in. I then amended drushrc.php to refer to my site and install directory.

    Having done that I have then began to use it.

    I think being able to update the core using:

     drush up drupal 

    to be very cool!

    Similarly I can check the module status using:

     drush ups 

    Individual modules can be done using:

     drush up <module>

    And then I can download modules using (make sure you are in the right place!):

     drush dl <module>

    And then enable and disable modules using:

     drush <en|dis> <module> 

    In short, I really like drush!

  • Updating Language of postings in Drupal.

    Everything said it was undefined language (very weird).

    Found this post so I ran this update:

    UPDATE node SET language = 'en' WHERE language = 'und';

    And it did exactly what it says on the tin (turned everything set to und to en).

    Perfect!

  • Linking Drupal to QNAP LDAP

    This was way more simple than I expected.

    For reference, I have a separate server running my Drupal Installation. The QNAP sits along side it (but not accessible to the web). 

    I basically just added the LDAP module to the Drupal installation. I also had to install the Entity module for LDAP to use. Then I enabled LDAP functionality bit by bit, testing as I went. The first module was LDAP Servers. 

    Enabling this resulted in a request to install the PHP LDAP module on the server. Once that was in place, the module would enable. I then set up links back to my LDAP server. The only additional thing I needed on the LDAP server, was a service account for Drupal to bind with (which I created).

    Setting up the user relationship was easy:
    I set the base DN to my domain name.
    Then I set AuthName to be UID AccountName is also set to be UID
    The Email attribute is mail
    I then set the “Expression for the user DN” to “uid=%username,ou=people,%basedn”

    Setting up the group configuration proved the biggest stumbling point. The important bit to get right it that it asks for the Group Object Class, and not the name thing that holds the group. I miss understood the question here initially, especially as my container is called group, and that was one of the examples. What I needed to put in here was posixGroup.

    Then I told it only that LDAP Group Entry Attribute was memberuid and the this field actually held the UID.

    Once this was done, I could turn it on and test it.

    Now I enabled the LDAP User and LDAP Authentication modules.

    In the LDAP User module, I just told it to associate accounts together if an LDAP one existed (second option).
    I didn’t want two way provisioning, so I have left that unset.

    In the Authentication module, I initially left it mixed mode until I was confident it worked, at which point I have moved it to the second authentication option. The rest of this section I have left default. 

    It was after setting this up that I did my first proper test of everything using another browser to prevent cookie clashes etc.

    Once i was 100% sure that I could login as administrator still, and also login as my proper user. Once I was happy with this, THEN I altered authentication to the second mode. 

    Now I moved on to LDAP Authorization. I enabled this module went to configure it, and found that without a module to use it with it didn’t do much. 

    So I enabled the LDAP Authorization – Drupal Roles module too. The setup of this module was also very simple. I simply told it to use my LDAP server, and then explained how to map my LDAP groups to the Drupal groups.

    The only real fly in the ointment was that I was initially not looking to the groups correctly, as I thought that it was looking for the container of the groups, and not the Object Class of the group.

    Once I resolved that all the test worked properly and I have a working system that automatically adds people to drupal if they exist in the LDAP, and also correctly sets up their groups for them.

    Very pleased.