Scripts

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) { ?>

PHP Code to Display Current Date & Time

Use the following code if you want to display Current Date and Time.

Simply copy the code in text file & save as .php file in the server. Change “Asia/Kuala_Lumpur” to your timezone.

<?php
   date_default_timezone_set('Asia/Kuala_Lumpur');
   $current_date = date('d-m-Y : H:i:s');
   echo $current_date;
?>