Plugin Directory

Changeset 1513531


Ignore:
Timestamp:
10/12/2016 05:08:13 PM (9 years ago)
Author:
seorets
Message:

Added ability for listing widget to include office_id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • seo-rets/branches/3.3.70/widgets/listings.php

    r1361547 r1513531  
    8080                'operator' => '=',
    8181                'value' => $instance['agent_id']
     82            );
     83        }
     84        // BRETT NEVILLE Addition of Office Listings Option
     85        if ($instance['display_prop'] == "officeid") {
     86            $conditions[] = array(
     87                'field' => 'office_id',
     88                'operator' => '=',
     89                'value' => $instance['office_id']
    8290            );
    8391        }
     
    186194                                    <p class="srm-sidebar-price">Price:
    187195                                        $<?php echo number_format($listing->price) ?></p>
    188                                     <p class="srm-sidebar-beds">Beds: <?php echo $listing->bedrooms ?></p>
     196                                    <p class="srm-sidebar-beds">Beds: <?php echo $listing->bedrooms ?> | Baths: <?php echo $listing->baths_full ?> </p>
    189197                                </td>
    190198                            </tr>
     
    298306                                       value="<?php echo isset($instance['agent_id']) ? htmlentities($instance['agent_id']) : "" ?>"
    299307                                       style="width:8em;"/><br/>
     308           
     309            <?php // BRETT NEVILLE Addition of Office Listings Option ?>
     310            <input type="radio" name="<?php echo $this->get_field_name('display_prop') ?>"
     311                   value="officeid"<?php echo (isset($instance['display_prop']) && $instance['display_prop'] == "officeid") ? " checked" : "" ?> />
     312            From this Office ID: <input type="text" name="<?php echo $this->get_field_name('office_id') ?>"
     313                                       value="<?php echo isset($instance['office_id']) ? htmlentities($instance['office_id']) : "" ?>"
     314                                       style="width:8em;"/><br/>                           
     315           
    300316            <input type="radio" name="<?php echo $this->get_field_name('display_prop') ?>"
    301317                   value="mlsid"<?php echo (isset($instance['display_prop']) && $instance['display_prop'] == "mlsid") ? " checked" : "" ?> />
Note: See TracChangeset for help on using the changeset viewer.