Eliminate MLS# and LID# from search block

electronicmonkey - September 8, 2008 - 18:57
Project:
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I am sure this might be possible by simply commenting them out but can someone direct me to the file that I will need to edit and the location of these.

#1

electronicmonkey - September 10, 2008 - 07:18

Hellooooo .......! anyone awake yet ?

#2

mrandy - September 10, 2008 - 08:51

I believe the file you need to look at is the listing.module file in modules/rlisting/listing

I have made a few changes to my code, so the numbering might not match exactly but on around line 1435 you will see a comment of:

* the simple search form for the block

it is the section below this down to roughly line 1650 where I believe you will find the bits that need commenting out. I did this a while back and from memory it was the following lines I commented out:

Lines 1450:
// $lid_num = $_SESSION['search']['lid_num'];

Lines 1565 to 1571
// $form['lid_num'] = array(
// '#type' => 'textfield',
// '#title' => t('LID#'),
// '#default_value' => $lid_num,
// '#weight' => 4,
// '#size' => 10,
// );

Line 1644
// $_SESSION['search']['lid_num'] = check_plain($form_values['lid_num']);

this should remove the lid from the search box.

I should prob add that whilst I have become reasonably adept at hacking code around and making things work over the years I do not claim to be a PHP programmer, so worth backing up a copy of the file first.

There may also be an easier way to do this, but this is what worked for me and it didn't break anything else.

Hope this helps

Andy

#3

electronicmonkey - September 10, 2008 - 20:03

Thanks I will give this a shot

 
 

Drupal is a registered trademark of Dries Buytaert.