Change Alpha Index Search Type in phpMyDirectory

In phpMyDirectory version 1.5.0, alpha search has change. The alpha search on the index page and browse categories page searches for categories with the letter selected. On the browse locations page, it searches locations with the letter selected.

In the previous version of phpMyDirectory it searches for listings with the letter selected regardless of which page you are on.

To simplify, in phpMyDirectory version 1.5.0 alpha search which shows something like this

while for previous version it show

If you are using phpMyDirectory version 1.5.0 but would like the old system, you need to edit a few files,


1. /template/YOURTEMPLATE/browse_categories.tpl


<?php echo $this->block('search_alpha_categories'); ?>


2. /template/YOURTEMPLATE/browse_locations.tpl


<?php echo $this->block('search_alpha_locations'); ?>


3. /template/YOURTEMPLATE/index.tpl

Find both code as in 1 & 2


Replace it with

<?php echo $this->block('search_alpha_listings'); ?>

Remove Category-Location at Sitemap & Listing of phpMyDirectory

phpMyDirectory (PMD) is a great directory software. You can browse listings via Category, Location or Category-Location. However, for some directory, it is not necessary to have category-location as many of them do not contain any listing. This may give poor SEO.

If your directory falls under this category, you may want to disable Category-Location in the Sitemap & Listing Page. To disable there are 3 files that you need to modify.

1. /xml.php

Find this code

if($categories_count > 0 AND $locations_count > 0) {

Replace it with

if($categories_count > 0 AND $locations_count > 0 AND FALSE) {


2. browse_categories.tpl – in template directory

Find this code

<?php if($location_columns) { ?>

Replace it with

<?php if($location_columns AND FALSE) { ?>


3. browse_location.tpl – in template directory

Find this code

<?php if($category_columns) { ?>

Replace it with

<?php if($category_columns AND FALSE) { ?>