https://drive.google.com/file/d/1mpzmkC076I19jr5UkjGz7rVheu3HWTbS/view?usp=sharing
Dr. Muhammad Hamidullah Library
Saturday, April 25, 2026
Wednesday, April 22, 2026
Enhancing Your Koha OPAC: A Modern Book Display side by side location
Enhancing Your Koha OPAC: A Modern Book Display with Location Tracking
The default search results in Koha are functional, but they don't always offer the "at-a-glance" clarity that modern library patrons expect. By using XSLT (Extensible Stylesheet Language Transformations), we can turn standard MARC data into a clean, professional, and responsive display.
This guide will show you how to apply a custom stylesheet to Koha 25.11 that highlights book locations, call numbers, and online access buttons.
Key Features of This Customization
Two-Column Layout: Separates bibliographic info from real-time availability.
Visual Cues: Includes item type icons and clear "Online Access" buttons.
Direct Call Numbers: Shows exactly where the book is on the shelf without clicking through to details.
Responsive Design: Uses CSS Flexbox to ensure it looks great on both desktops and smartphones.
Step-By-Step Implementation
Step 1: Access the Koha Administration
Log in to your Koha Staff Interface and navigate to: Koha Administration > Global System Preferences > OPAC > Appearance.
Step 2: Locate the XSLT System Preference
Look for the preference named OPACXSLTResultsDisplay. This preference controls how search results are rendered.
Note: By default, Koha uses a built-in file. To use your custom code, you will need to host this
.xslfile on your server or paste the logic into a custom stylesheet field if your version supports it.
Step 3: Prepare the XSLT Code
Copy the code provided below. It is specifically designed to pull MARC tags:
245 a/b: Title and Subtitle
100/700: Author information
260/264: Publication details
856: Electronic links
942c: Item Type
Step 4: The Code
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:marc="http://www.loc.gov/MARC21/slim"
xmlns:items="http://www.koha-community.org/items"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
xmlns:str="http://exslt.org/strings"
exclude-result-prefixes="marc items str" extension-element-prefixes="exsl">
<xsl:import href="MARC21slimUtils.xsl"/>
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="marc:record">
<xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
<div class="record-flex-wrapper" style="display: flex; flex-wrap: wrap; gap: 15px; padding: 10px 0; border-bottom: 2px solid #f0f0f0; align-items: flex-start;">
<div class="book-info-col" style="flex: 1 1 300px; display: flex; flex-direction: column; gap: 2px;">
<div style="display: flex; align-items: center; gap: 6px; margin-bottom: 4px;">
<xsl:variable name="itype" select="normalize-space(marc:datafield[@tag='942']/marc:subfield[@code='c'])"/>
<span style="font-size: 0.8em; background: #eef1f5; color: #444; padding: 1px 6px; border-radius: 4px; font-weight: bold; border: 1px solid #ccd1d9; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; margin-top: -3px;">
📘 <xsl:value-of select="$itype"/>
</span>
</div>
<h3 style="margin: 0; font-size: 1.2em; line-height: 1.3;">
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber={$biblionumber}" style="text-decoration: none; color: #0056b3; font-weight: bold;">
<xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='a']"/>
<xsl:if test="marc:datafield[@tag=245]/marc:subfield[@code='b']">
<xsl:text> </xsl:text><xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='b']"/>
</xsl:if>
</a>
</h3>
<xsl:if test="marc:datafield[@tag=100] or marc:datafield[@tag=700]">
<div style="color: #333; font-size: 0.95em; font-weight: 500; margin-top: 2px;">
<span style="color: #777;">by </span>
<xsl:value-of select="marc:datafield[@tag=100 or @tag=700]/marc:subfield[@code='a']"/>
</div>
</xsl:if>
<xsl:variable name="publication" select="marc:datafield[@tag=260 or @tag=264][1]"/>
<xsl:if test="$publication">
<div style="color: #666; font-size: 0.85em; line-height: 1.4; margin-top: 2px;">
<span>
<xsl:if test="$publication/marc:subfield[@code='a']">
<xsl:value-of select="$publication/marc:subfield[@code='a']"/>
<xsl:text> </xsl:text>
</xsl:if>
<xsl:if test="$publication/marc:subfield[@code='b']">
<xsl:value-of select="$publication/marc:subfield[@code='b']"/>
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:if test="$publication/marc:subfield[@code='c']">
<xsl:value-of select="$publication/marc:subfield[@code='c']"/>
</xsl:if>
</span>
</div>
</xsl:if>
<xsl:if test="marc:datafield[@tag=856]">
<div style="margin-top: 8px;">
<xsl:for-each select="marc:datafield[@tag=856]">
<xsl:variable name="url" select="normalize-space(marc:subfield[@code='u'])"/>
<a href="{$url}" target="_blank" style="display: inline-block; font-size: 0.75em; background: #28a745; color: #fff; padding: 4px 10px; border-radius: 4px; text-decoration: none; font-weight: bold;">
🌐 Online Access
</a>
</xsl:for-each>
</div>
</xsl:if>
</div>
<div class="availability-col" style="flex: 1 1 240px; max-width: 100%; background: #fdfdfd; border: 1px solid #e1e4e8; border-radius: 6px; padding: 10px; box-shadow: 0 1px 2px rgba(0,0,0,0.03);">
<xsl:variable name="available_items" select="items:items/items:item[not(items:onloan) and not(items:withdrawn)]"/>
<xsl:choose>
<xsl:when test="count($available_items) > 0">
<strong style="color: #22863a; display: block; margin-bottom: 6px; font-size: 0.75em; border-bottom: 1px solid #eee; padding-bottom: 3px; letter-spacing: 0.5px;">
📍 AVAILABLE AT:
</strong>
<xsl:for-each select="$available_items">
<div style="display: flex; justify-content: space-between; font-size: 0.85em; margin-bottom: 4px; padding-bottom: 3px; border-bottom: 1px dashed #f0f0f0; gap: 10px;">
<div style="font-weight: bold; color: #24292e; flex: 1;">
<xsl:value-of select="items:homebranch"/>
</div>
<div style="font-family: 'Courier New', monospace; color: #d73a49; font-weight: bold; white-space: nowrap;">
<xsl:value-of select="items:itemcallnumber"/>
</div>
</div>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<div style="color: #6a737d; font-style: italic; font-size: 0.8em; text-align: center; padding: 5px 0;">
No physical copies.
</div>
</xsl:otherwise>
</xsl:choose>
</div>
</div>
</xsl:template>
</xsl:stylesheet>
Troubleshooting Tips
Missing Icons: If the 📘 or 🌐 emojis don't show up, ensure your Koha database and web server are set to UTF-8 encoding.
Clear Cache: After saving the changes in System Preferences, clear your browser cache or try an Incognito window to see the new layout.
Availability Logic: The "Available At" section is set to hide items that are On Loan or Withdrawn. You can adjust the
not(items:onloan)logic if you want to show checked-out items as well.
Tuesday, April 21, 2026
Complete Guide: Replace “Online resources: Click here to access online” with “🌐 Access Online” in Koha 25.11 (Full Code Included)
🔧 Complete Guide: Replace “Online resources: Click here to access online” with “🌐 Access Online” in Koha 25.11 (Full Code Included)
If you're customizing your Koha OPAC and want a cleaner, modern interface, one common improvement is replacing the default text:
Online resources: Click here to access online
with a simple, user-friendly button:
🌐 Access Online
This guide provides a complete working solution for Koha 25.11, including full XSLT code you can directly use.
🎯 What You Will Achieve
✔ Remove default repetitive text
✔ Show a clean 🌐 Access Online button
✔ Avoid duplication
✔ Keep Koha structure intact
📍 Where to Apply This
You need to edit:
MARC21slim2OPACResults.xsl
Path:
opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl
👉 OR (if active):
System Preference → OPACXSLTResultsDisplay
⚠️ IMPORTANT BEFORE YOU START
Check:
👉 System Preference
OPACXSLTResultsDisplay
If NOT EMPTY → edit code there
If EMPTY → edit file
🧩 COMPLETE WORKING CODE (ITEM TYPE + ONLINE BUTTON)
👉 Paste this in place of your existing 942 + 856 display block
<!-- ================= ITEM TYPE DISPLAY START ================= -->
<xsl:variable name="itype" select="normalize-space(marc:datafield[@tag='942']/marc:subfield[@code='c'])"/>
<span class="itemtype-label" style="font-weight:bold;">
<xsl:choose>
<!-- E-BOOK -->
<xsl:when test="$itype='EBK' or $itype='EBOOK' or $itype='Ebooks' or $itype='E-Book'">
📱 E-Book
</xsl:when>
<!-- E-THESIS -->
<xsl:when test="$itype='ETHES' or $itype='E-Thesis'">
🎓💻 E-Thesis
</xsl:when>
<!-- THESIS -->
<xsl:when test="$itype='THES' or $itype='Thesis'">
🎓 Thesis
</xsl:when>
<!-- ARTICLE -->
<xsl:when test="$itype='AR' or $itype='Articles' or $itype='Article'">
📰 Article
</xsl:when>
<!-- MANUSCRIPT -->
<xsl:when test="$itype='MAN' or $itype='Manuscript'">
📜 Manuscript
</xsl:when>
<!-- BOOK -->
<xsl:when test="$itype='BK' or $itype='Books' or $itype='Book'">
📘 Book
</xsl:when>
<!-- PERIODICAL -->
<xsl:when test="$itype='SER' or $itype='Periodicals' or $itype='Periodical' or $itype='Serial'">
📖 Periodical
</xsl:when>
<!-- DEFAULT -->
<xsl:otherwise>
📂 Other
</xsl:otherwise>
</xsl:choose>
</span>
<!-- ================= ITEM TYPE DISPLAY END ================= -->
<!-- ================= ONLINE ACCESS (REPLACEMENT OF DEFAULT 856) ================= -->
<xsl:if test="marc:datafield[@tag=856]">
<span class="results_summary online_resources">
<xsl:for-each select="marc:datafield[@tag=856]">
<xsl:variable name="url" select="normalize-space(marc:subfield[@code='u'])"/>
<xsl:variable name="linktext" select="normalize-space(marc:subfield[@code='z'])"/>
<xsl:if test="$url != ''">
<a href="{$url}" target="_blank"
style="display:inline-block;
padding:5px 10px;
margin-top:4px;
background:#28a745;
color:#fff;
border-radius:5px;
text-decoration:none;
font-size:12px;">
<xsl:choose>
<!-- SMART LABELS -->
<xsl:when test="contains($url,'.pdf')">
📄 View PDF
</xsl:when>
<xsl:when test="contains($url,'youtube') or contains($url,'youtu.be')">
🎥 Watch Video
</xsl:when>
<!-- DEFAULT -->
<xsl:when test="$linktext != ''">
🌐 <xsl:value-of select="$linktext"/>
</xsl:when>
<xsl:otherwise>
🌐 Access Online
</xsl:otherwise>
</xsl:choose>
</a>
</xsl:if>
</xsl:for-each>
</span>
</xsl:if>
<!-- ================= END ONLINE ACCESS ================= -->
🧹 IMPORTANT CLEANUP STEP
👉 You MUST remove the original default block:
Search and DELETE:
<span class="label">Online resources: </span>
<xsl:text>Click here to access online</xsl:text>
Otherwise duplication will remain.
🔄 APPLY CHANGES
Run:
sudo koha-plack --restart <your-instance>
sudo systemctl restart apache2
Then browser:
Ctrl + Shift + R
✅ FINAL RESULT
❌ Before:
Online resources: Click here to access online
✅ After:
🌐 Access Online
(or dynamic labels like 📄 View PDF / 🎥 Watch Video)
🚀 BONUS IMPROVEMENTS (Optional)
You can further enhance:
🎨 Bootstrap badges for item types
📂 Icons instead of emoji
📊 Show availability + online button in one row
🔍 Auto-detect DOI links
🎉 Conclusion
By replacing the default Koha 856 display instead of adding a new one, you:
✔ Eliminate duplication
✔ Improve user experience
✔ Modernize OPAC interface
If you want, I can help you:
👉 Align icons + buttons in one professional layout
👉 Add colors, hover effects, or tooltips
👉 Customize for thesis, PDFs, videos, etc.
Just let me know 👍
Tuesday, April 14, 2026
How to Install Elastic Search
📚 Why Elasticsearch + Unicode Matters
Traditional search engines struggle with:
Diacritics (e.g., زبر، زیر)
Word variations
Complex scripts like Arabic and Urdu
Elasticsearch, combined with the ICU analyzer, solves this by:
Normalizing Unicode text
Ignoring diacritics
Improving tokenization for non-Latin scripts
👉 Result: Users can search “اسلام”, “الإسلام”, or even slightly misspelled variants and still get accurate results.
⚙️ Step 1: Install Elasticsearch
Install Java (Prerequisite)
sudo apt update
sudo apt install openjdk-11-jdk -y
Install Elasticsearch (Compatible Version)
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.0-amd64.deb
sudo dpkg -i elasticsearch-7.17.0-amd64.deb
🌐 Step 2: Configure Elasticsearch
Edit configuration:
sudo nano /etc/elasticsearch/elasticsearch.yml
Add:
cluster.name: koha-cluster
node.name: koha-node-1
network.host: 127.0.0.1
http.port: 9200
🌍 Step 3: Enable Unicode Support (ICU Plugin)
This is the most critical step for multilingual libraries.
sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
sudo systemctl restart elasticsearch
🔍 Why ICU?
The ICU plugin enables:
Unicode normalization
Proper handling of Arabic/Urdu morphology
Diacritics-insensitive search
🔗 Step 4: Connect Koha with Elasticsearch
Install integration package:
sudo apt install koha-elasticsearch -y
Enable Elasticsearch in Koha:
sudo nano /etc/koha/koha-sites.conf
Add:
elasticsearch: 1
🧠 Step 5: Configure Unicode Analyzer in Koha
Edit mapping file:
/etc/koha/sites/library/elasticsearch/mappings/biblios.yaml
Add a custom analyzer:
analyzer:
my_unicode_analyzer:
type: custom
tokenizer: standard
filter: [lowercase, icu_normalizer]
🔄 Step 6: Rebuild Index
sudo koha-elasticsearch --rebuild -v -f library
This step ensures all bibliographic records are indexed with Unicode support.
⚡ Step 7: Enable Plack for High Performance
Koha without Plack reloads Perl for every request—this slows everything down.
With Plack:
Faster OPAC
Reduced server load
Persistent processes
Install Plack
sudo apt install libplack-perl -y
Enable Plack
sudo nano /etc/koha/koha-sites.conf
Add:
plack: 1
🔧 Step 8: Configure Plack Workers
Edit:
/etc/koha/sites/library/koha-conf.xml
Add:
<plack_workers>5</plack_workers>
▶️ Step 9: Start Plack
sudo koha-plack --enable library
sudo koha-plack --start library
Restart everything:
sudo systemctl restart apache2
sudo systemctl restart elasticsearch
sudo koha-plack --restart library
🧪 Testing Your Setup
Try searching in OPAC:
اسلام
القرآن
Hadith / حدیث
✔ Expected results:
Diacritics ignored
Variants matched
Faster response
⚠️ Common Issues & Solutions
Elasticsearch not responding
curl http://localhost:9200
Unicode search not working
Check ICU plugin installation
Rebuild index
Plack not running
sudo koha-plack --status library
📈 Performance Optimization Tips
Set Elasticsearch memory:
/etc/elasticsearch/jvm.options
-Xms1g
-Xmx1g
Use 4–8 Plack workers depending on RAM
Schedule regular indexing for large catalogs
🔬 Advanced Enhancements
Take your Koha to the next level:
Synonym filters for Islamic terminology
Autocomplete using edge-ngram
Authority control integration
Relevance ranking (boost title fields)
📖 Conclusion
By integrating Elasticsearch with Unicode support and enabling Plack, your Koha becomes:
Multilingual
Faster
More intelligent
This setup is especially critical for institutions dealing with Islamic studies, Arabic, and Urdu collections, where traditional search fails to deliver precision.
📚 Further Reading (For Deeper Understanding)
Multilingual Information Retrieval Systems
Unicode Normalization and ICU Standards
Elasticsearch Indexing & Ranking Algorithms
Koha Architecture (Zebra vs Elasticsearch)
PSGI/Plack Performance Engineering
📑 References
Koha Community Documentation (Elasticsearch Integration)
Elasticsearch Official Documentation (Analysis Plugins)
Unicode ICU Documentation
PSGI/Plack Perl Framework Guides
If you want, I can also prepare:
A fully optimized Urdu/Arabic biblios.yaml file
A ready-to-deploy Koha DevOps script
Or a research paper-style write-up for publication
Monday, April 13, 2026
How to Fix “Connection Refused” Error in PuTTY While Accessing a Virtual Machine
Abstract
When attempting to access a virtual machine using PuTTY, users often encounter the error “Network error: Connection refused.” This issue indicates that the target system is reachable, but the SSH service is either not running or not accepting connections on the specified port. This blog provides a clear, practical, and technically grounded guide to diagnose and resolve the problem effectively.
Introduction
Secure remote access is a fundamental requirement in modern system administration. Tools like PuTTY allow users to connect to Linux-based virtual machines using the SSH protocol. However, connection errors can interrupt workflows, especially in environments such as Koha library systems or cloud-based servers.
One of the most common issues is:
PuTTY Fatal Error: Network error: Connection refused
Understanding the root cause is essential for resolving it quickly.
What Does “Connection Refused” Mean?
This error occurs when:
Your system successfully reaches the server’s IP address
But the server rejects the connection request on the specified port
Technically, this means:
No service (like SSH) is listening on that port
Or a firewall is actively blocking the connection
Step-by-Step Troubleshooting Guide
1. Verify SSH Service Status
The most common cause is that the SSH service is not running.
Log in to your VM locally (or via console) and run:
sudo systemctl status ssh
If inactive, start it:
sudo systemctl start ssh
sudo systemctl enable ssh
If SSH is not installed:
sudo apt update
sudo apt install openssh-server
2. Confirm SSH Port Configuration
SSH runs on port 22 by default, but it may be changed for security reasons.
Check configuration:
sudo nano /etc/ssh/sshd_config
Look for:
Port 22
If the port is different (e.g., 2222), update PuTTY accordingly.
3. Check Firewall Settings
On Ubuntu (UFW):
sudo ufw status
Allow SSH if needed:
sudo ufw allow 22
sudo ufw reload
A blocked port will prevent SSH connections even if the service is running.
4. Ensure SSH Port is Listening
Run:
ss -tulnp | grep :22
Expected output:
LISTEN 0 128 0.0.0.0:22
If no output appears, SSH is not active.
5. Test Connectivity from Client Machine
From your local computer:
ping 10.40.3.125
telnet 10.40.3.125 22
Interpretation:
Ping works → Network is fine
Telnet fails → SSH service issue
6. Check Virtual Machine Network Configuration
If using VMware or VirtualBox:
NAT mode may restrict access
Switch to Bridged Adapter for direct network access
This is a frequent issue in local virtual environments.
7. Restart SSH Service
After changes:
sudo systemctl restart ssh
8. Reconnect Using PuTTY
In PuTTY:
Host Name:
10.40.3.125Port:
22(or custom)Connection Type: SSH
Click Open and log in.
Practical Insight: Why This Happens in Koha Environments
In systems like Koha (as seen in your case running on port 8080):
Web interface works → server is active
SSH fails → service not enabled or blocked
This often occurs in:
Fresh installations
Minimal Linux setups
Security-hardened environments
Security Considerations
Prefer key-based authentication over passwords
Restrict SSH access using firewall rules
Disable root login in production
Consider changing the default SSH port
Conclusion
The “Connection refused” error is not a network failure but a service-level issue. By systematically verifying SSH service status, port configuration, firewall rules, and VM networking, the problem can be resolved efficiently. Mastering these diagnostics is essential for anyone working with virtual machines, especially in research, library systems, and cloud environments.
Suggested Further Reading
To deepen your understanding, explore:
SSH Key-Based Authentication and Security
Linux System Services (
systemctl)Firewall Management (UFW and iptables)
Virtual Machine Networking (NAT vs Bridged)
Remote Server Administration Best Practices
Koha System Deployment and Server Configuration
References
Barrett, D. J., Silverman, R. E., & Byrnes, R. G. SSH, The Secure Shell: The Definitive Guide. O’Reilly Media.
Nemeth, E., Snyder, G., & Hein, T. UNIX and Linux System Administration Handbook. Pearson.
Ubuntu Documentation. OpenSSH Server Guide.
Ylonen, T., & Lonvick, C. (2006). The Secure Shell (SSH) Protocol Architecture. RFC 4251.
Monday, April 6, 2026
Enhancing Koha OPAC: Display Item Types with Icons (Koha 25.11 Guide)
Enhancing Koha OPAC: Display Item Types with Icons (Koha 25.11 Guide)
If you're using Koha 25.11 and want to improve your OPAC interface, one powerful customization is displaying item types (Book, Thesis, Article, etc.) with icons alongside each bibliographic record.
This improves usability and gives your OPAC a more modern, professional look.
In this guide, we’ll walk through a complete, working solution to achieve this.
🚀 Why Display Item Types?
By default, Koha OPAC may not clearly highlight the type of material in search results. Adding item types helps users quickly identify:
📘 Books
🎓 Theses
📰 Articles
📜 Manuscripts
📖 Periodicals
🔍 Understanding the Data
Koha stores item types in two places:
Database (itemtypes table) → codes like
BK,THESMARC field 942$c → often contains descriptions like
Books,Thesis
⚠️ Important:
XSLT reads MARC data, so you must match values like:
Books (not BK)
🛠️ Step 1: Add Icon Files
Create a folder for item type icons:
/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/images/itemtypes/
Add your icon images:
book.png
thesis.png
article.png
manuscript.png
periodical.png
default.png
🧩 Step 2: Modify XSLT File
Open the OPAC XSLT file:
/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl
Inside the template:
<xsl:template match="record">
Insert the following code where you want the item type to appear (usually near the title):
<!-- ===== ITEM TYPE WITH ICON START ===== -->
<xsl:variable name="itype" select="normalize-space(marc:datafield[@tag='942']/marc:subfield[@code='c'])"/>
<span class="itemtype-label">
<xsl:choose>
<xsl:when test="$itype='Books'">
<img src="/opac-tmpl/bootstrap/images/itemtypes/book.png" class="itemtype-icon"/>
Book
</xsl:when>
<xsl:when test="$itype='Thesis'">
<img src="/opac-tmpl/bootstrap/images/itemtypes/thesis.png" class="itemtype-icon"/>
Thesis
</xsl:when>
<xsl:when test="$itype='Articles'">
<img src="/opac-tmpl/bootstrap/images/itemtypes/article.png" class="itemtype-icon"/>
Article
</xsl:when>
<xsl:when test="$itype='Manuscript'">
<img src="/opac-tmpl/bootstrap/images/itemtypes/manuscript.png" class="itemtype-icon"/>
Manuscript
</xsl:when>
<xsl:when test="$itype='Periodicals'">
<img src="/opac-tmpl/bootstrap/images/itemtypes/periodical.png" class="itemtype-icon"/>
Periodical
</xsl:when>
<xsl:otherwise>
<img src="/opac-tmpl/bootstrap/images/itemtypes/default.png" class="itemtype-icon"/>
<xsl:value-of select="$itype"/>
</xsl:otherwise>
</xsl:choose>
</span>
<!-- ===== ITEM TYPE WITH ICON END ===== -->
🎨 Step 3: Add Styling
Go to:
Koha → Administration → System Preferences → OPACUserCSS
Add:
.itemtype-label {
display: inline-flex;
align-items: center;
gap: 6px;
background: #f1f5f9;
padding: 4px 8px;
border-radius: 6px;
font-size: 12px;
font-weight: 600;
}
.itemtype-icon {
width: 18px;
height: 18px;
}
🔄 Step 4: Restart Services
Run:
sudo systemctl restart koha-common
sudo systemctl restart apache2
Then refresh your browser (Ctrl + F5).
🎯 Final Result
Your OPAC search results will now display clean, visual item types like:
📘 Book
🎓 Thesis
📰 Article
📜 Manuscript
📖 Periodical
Each with a matching icon and label.
⚠️ Troubleshooting
Icons not showing?
Check file path:
/opac-tmpl/bootstrap/images/itemtypes/book.png
Test in browser:
http://your-koha/opac-tmpl/bootstrap/images/itemtypes/book.png
Wrong item type showing?
Verify MARC field:
942$c
Ensure values match exactly:
Books, Thesis, Articles, Manuscript, Periodicals
💡 Pro Tips
Use SVG icons for better quality
Keep icon sizes consistent
Avoid hardcoding too many conditions — keep it maintainable
🎉 Conclusion
With just a small XSLT customization, you can significantly enhance the user experience of your Koha OPAC. Clear item type labels and icons make browsing faster, easier, and more visually appealing.
🚀 What’s Next?
You can further enhance your OPAC by:
Adding filters by item type
Grouping results (Books / Theses / Journals)
Customizing the detail page layout
If you need help with advanced customization, feel free to explore further or extend this implementation.
Happy customizing! 🎯
Sunday, March 29, 2026
Mastering Metadata Cleanup in MarcEdit
Mastering Metadata Cleanup in MarcEdit
Cleaning metadata in MarcEdit is a systematic process. It typically begins by "breaking" a .mrc (binary) file into the mnemonic .mrk (text) format, performing batch edits, and then compiling it back into .mrc.
1. Batch Deleting Unwanted Fields
To remove entire tags (like local 9XX fields or vendor-specific 655 tags) across your entire file:
- Path:
Tools>Add/Delete Field(Shortcut: F7) - Example: Removing all 949 local call number fields.
- Action: Enter
949in the Field box and click Delete Field.
Pro Tip: Use the Preview button first. It’s the best way to ensure you aren't accidentally deleting essential data.
2. Targeted Subfield Editing
Use this when you need to change data within a field, such as stripping proxy prefixes from URLs or fixing punctuation.
Tools > Edit Subfield Data (Shortcut: F9)
| Goal | Field / Subfield | Field Data | Replace With |
|---|---|---|---|
| Remove "Electronic book" from 655 | 655 / a | Electronic book. | (Leave Empty) |
| Update Proxy Prefix in 856 | 856 / u | oldproxy.com/ | newproxy.com/ |
| Add trailing period to 245 | 245 / a | ([^.])\s*$ | $1. (Check Regex) |
3. Updating Indicators
Indicators control how data is indexed. A common task is fixing the second indicator in the 245 field to account for "The" or "A".
- Path:
Tools>Edit Indicators(Shortcut: F8) - Example: Changing
050 \4(Local LC Call Number) to050 00(LC assigned by LC).
4. Modernizing with the RDA Helper
The RDA Helper automates the transition from AACR2 to modern RDA standards.
- Path:
Tools>RDA Helper - What it does:
- Adds 336 (Content), 337 (Media), and 338 (Carrier) fields.
- Converts abbreviations (e.g., "p." to "pages").
- Removes the 245 $h [electronic resource] GMD.
5. Global Find/Replace & Regex
For general text cleaning (like fixing typos or removing specific phrases), use Edit > Replace (Ctrl+H). For complex patterns, enable Use Regular Expressions.
([^\s])\$b and replace with $1 $b.
Once your edits are complete, navigate to File > Compile File to save your work back into the .mrc format for your ILS.
header
https://drive.google.com/file/d/1mpzmkC076I19jr5UkjGz7rVheu3HWTbS/view?usp=sharing
-
Two steps are involved in linking Calibre with Koha Exporting books from Calibre Software. 1. Calibre > Convert books > Create a ...
-
On-Screen Keyboard Urdu Keyboard 1. Urdu: Koha > Administration > System Preferences > OpacCustomSearch Paste the following code ...
-
Installing Koha on the latest Ubuntu 24.04 (Noble Numbat) is a great choice for a modern, stable library system. While the commands in your...