Remove Address & Description in Recent Listing Sidebox in phpMyDirectory

Recent Listing Sidebox in phpMyDirectory is very long because it contains listing address & short description. I prefer short sidebox hence I want to remove listing address & short description.

To do this, need to edit 2 files.

/includes/sidebox_data.php

Under the “// RECENT” section find the following

$results[$key]['link'] = $PMDR->get('Listings')->getURL($value['id'],$value['friendly_url']);

Add the following code directly above it.

$results[$key]['nodetails'] = 1;

blocks/sidebox_listings.tpl file in template directory

Find the following

<span class="listing_sidebox_location"><?php echo $this->escape($listing['address']); ?></span><br />
<span class="listing_sidebox_description"><?php echo $this->escape_html($listing['description_short']); ?></span><br />

Replace it with the code below

<?php if($listing['nodetails'] != 1) { ?>
<span class="listing_sidebox_location"><?php echo $this->escape($listing['address']); ?></span><br />
<span class="listing_sidebox_description"><?php echo $this->escape_html($listing['description_short']); ?></span><br />
<?php } ?>

0 comments… add one

Leave a Comment