Add a Koha login form to your web site

opac-login-on-library-site

This question came up on the Koha mailing list today: How can I add a Koha login form to my library’s web site? Luckily it’s really simple. The image here is of the one we added one to our site.

Everything you need to know about how to do it is right on your Koha OPAC home page. Just view the source for the login box and copy it! Here’s the simple version, adapted right from the source:


<form method="post" action="http://path.to.your.opac/cgi-bin/koha/opac-user.pl">

<label for="userid">Login:</label>
<label for="password">Password:</label>

</form>

The only thing you’d need to change to make that snippet work for you is the path.to.your.opac part. Replace that with the full URL of your Koha OPAC, e.g. http://acpl.kohalibrary.com.

You could even do the same for the staff client, for instance if you wanted your users to be able to log into the Koha staff client from your library’s intranet:


<form method="post" action="http://path.to.your.staff.client">

<label for="userid">Username:</label>
<label for="password">Password:</label>

</form>

Of course I wouldn’t recommend putting a login form for your staff client anywhere in public view. Note that using that form will log you in to your default library. If you wanted to give your users the option of logging into a different library you’d have to reproduce the full <select> tag from your staff client’s login page.  View the source to find it.

2 thoughts on “Add a Koha login form to your web site

  1. Pablo

    Excellent post! What I wish to know if is very difficult to unify the login of Koha with other software, in my case por example with this one, Brushtail:
    http://www.webwired.com.au/brushtail.php
    Perhaps a possibility is to extract part of code of that project and add it like a plugin to Koha….?
    Other thing: Your link to Koha 3 Manual is deprecated, now it is on koha.org (now with Drupal CMS!).

    Reply
  2. oleonard Post author

    Your question is far beyond the scope of this blog, and I don’t know enough about Koha (or Brushtail) authentication to advise you about the issue. It would be something you could bring up on the Koha mailing list.

    I followed the link to the Brushtail software, and I notice they say it’s open source but don’t provide a download link. The definition of “Open Source” on their site neglects to mention that open source software is freely distributable. That raises serious questions about their real commitment to open source, not to mention their general ethics.

    Lastly: thanks for the reminder about my Koha manual link. And by the way, it’s not Drupal, it’s Plone 🙂

    Reply

Leave a Reply to oleonard Cancel reply

Your email address will not be published. Required fields are marked *