<?php

$suffix = 'listing_';
$status = shandora_get_meta($post->ID, $suffix . 'status');
$badge = shandora_get_meta($post->ID, $suffix . 'badge');
$badgeclr = shandora_get_meta($post->ID, $suffix . 'badge_color');
$status_opt = shandora_get_boat_search_option('status');
if (array_key_exists($status, $status_opt)) {
    $status = $status_opt[$status];
}
if (is_singular(get_post_type())) {
    ?>
<article id="post-<?php 
    the_ID();
    ?>
" <?php 
    post_class($status . ' listing');
    ?>
 itemscope itemtype="http://schema.org/AutoDealer">
	<header class="entry-header clear">
		<?php 
    echo apply_atomic_shortcode('entry_title', the_title('<h1 class="entry-title" itemprop="name">', '</h1>', false));
    ?>
		
		<a class="print" href="javascript:window.print()"><i class="sha-printer"></i></a>
		<?php 
    echo apply_atomic_shortcode('listing_published', '[entry-published text="' . __('Published on ', 'bon') . '"]');
    ?>
		<h4 class="price"><?php 
    shandora_get_listing_price();
    ?>
Example #2
0
/**
 * Used to output boat location level 1 field in search panel
 * 
 * @since 1.2.4
 * @return string
 * @param string $value
 *
 */
function shandora_search_boat_location_level1_field($value = array(), $class, $is_widget = false)
{
    $o = apply_atomic('search_boat_location_level1_field', '', $value, $class, $is_widget);
    if ($o != '') {
        return $o;
    }
    global $bon;
    $form = $bon->form();
    $o = $form->form_label(bon_get_option('boat_location_level1_label'), 'boat_location_level1');
    $o .= $form->form_dropdown('boat_location_level1', shandora_get_boat_search_option('boat_location1'), $value['boat_location_level1'], 'class=" ' . $class . '"');
    return apply_atomic('search_boat_location_level1_field_output', $o);
}
Example #3
0
function shandora_boat_meta_box_options()
{
    $prefix = bon_get_prefix();
    $suffix = SHANDORA_MB_SUFFIX;
    $measure_w = bon_get_option('width_measure');
    $measure_h = bon_get_option('height_measure');
    $measure_l = bon_get_option('length_measure');
    $detail_options = array(array('label' => __('Reg Number', 'bon'), 'desc' => __('The Boat Registry Number #', 'bon'), 'id' => $prefix . $suffix . 'reg', 'type' => 'text'), array('label' => __('Boat Condition', 'bon'), 'desc' => __('Boat sale condition', 'bon'), 'id' => $prefix . $suffix . 'status', 'type' => 'select', 'options' => shandora_get_boat_search_option('status')), array('label' => __('Exterior Color', 'bon'), 'desc' => __('Exterior Color', 'bon'), 'id' => $prefix . $suffix . 'extcolor', 'type' => 'text'), array('label' => __('Interior Color', 'bon'), 'desc' => __('Interior Color', 'bon'), 'id' => $prefix . $suffix . 'intcolor', 'type' => 'text'), array('label' => __('Hours', 'bon'), 'desc' => __('The boat used hours.', 'bon'), 'id' => $prefix . $suffix . 'hours', 'type' => 'text'), array('label' => __('Fuel Type', 'bon'), 'desc' => __('Fuel Type', 'bon'), 'id' => $prefix . $suffix . 'fueltype', 'type' => 'select', 'options' => shandora_get_boat_search_option('fuel')), array('label' => __('Max Speed', 'bon'), 'desc' => __('Max Speed in knots.', 'bon'), 'id' => $prefix . $suffix . 'speed', 'type' => 'text', 'measure' => bon_get_option('speed_measure')), array('label' => __('People Capacity', 'bon'), 'desc' => __('How many people can be hold on the boat capacity.', 'bon'), 'id' => $prefix . $suffix . 'people_cap', 'type' => 'text', 'measure' => __('People', 'bon')), array('label' => __('Year', 'bon'), 'desc' => __('When is the car year build? eq: 2013', 'bon'), 'id' => $prefix . $suffix . 'yearbuild', 'type' => 'text'), array('label' => __('Canvas', 'bon'), 'desc' => __('Canvas', 'bon'), 'id' => $prefix . $suffix . 'canvas', 'type' => 'select', 'options' => shandora_get_boat_search_option('canvas')), array('label' => __('Carpet', 'bon'), 'desc' => __('Carpet', 'bon'), 'id' => $prefix . $suffix . 'carpet', 'type' => 'text'), array('label' => __('Steering Type', 'bon'), 'desc' => __('The boat steering type', 'bon'), 'id' => $prefix . $suffix . 'steering', 'type' => 'text'));
    $dimension_options = array(array('label' => __('Overall Height', 'bon'), 'desc' => __('The overall boat height', 'bon'), 'id' => $prefix . $suffix . 'height', 'type' => 'text', 'measure' => $measure_h), array('label' => __('Overall Width', 'bon'), 'desc' => __('The overall boat width', 'bon'), 'id' => $prefix . $suffix . 'width', 'type' => 'text', 'measure' => $measure_w), array('label' => __('Overall Length', 'bon'), 'desc' => __('The overall boat length', 'bon'), 'id' => $prefix . $suffix . 'length', 'type' => 'text', 'measure' => $measure_l), array('label' => __('Waterline Length', 'bon'), 'desc' => __('The boat waterline length', 'bon'), 'id' => $prefix . $suffix . 'waterline_length', 'type' => 'text', 'measure' => $measure_l), array('label' => __('Max Beam', 'bon'), 'desc' => __('The boat beam width', 'bon'), 'id' => $prefix . $suffix . 'beam', 'type' => 'text', 'measure' => $measure_w), array('label' => __('Max Draft', 'bon'), 'desc' => __('The boat draft height', 'bon'), 'id' => $prefix . $suffix . 'draft', 'type' => 'text', 'measure' => $measure_h));
    $capacity_options = array(array('label' => __('Fuel Tanks', 'bon'), 'desc' => __('Fuel Tanks', 'bon'), 'id' => $prefix . $suffix . 'fuelcaps', 'type' => 'text'), array('label' => __('Fresh Water', 'bon'), 'desc' => __('Fresh Water', 'bon'), 'id' => $prefix . $suffix . 'freshwater', 'type' => 'text'), array('label' => __('Black Water', 'bon'), 'desc' => __('Black Water', 'bon'), 'id' => $prefix . $suffix . 'blackwater', 'type' => 'text'), array('label' => __('Bilge Water', 'bon'), 'desc' => __('Bilge Water', 'bon'), 'id' => $prefix . $suffix . 'bilgewater', 'type' => 'text'), array('label' => __('Grey Water', 'bon'), 'desc' => __('Grey Water', 'bon'), 'id' => $prefix . $suffix . 'greywater', 'type' => 'text'), array('label' => __('Fuel Overflow', 'bon'), 'desc' => __('Fuel Overflow', 'bon'), 'id' => $prefix . $suffix . 'fueloverflow', 'type' => 'text'), array('label' => __('Lube Oil', 'bon'), 'desc' => __('Lube Oil', 'bon'), 'id' => $prefix . $suffix . 'lubeoil', 'type' => 'text'), array('label' => __('Dirty Oil', 'bon'), 'desc' => __('Dirty Oil', 'bon'), 'id' => $prefix . $suffix . 'dirtyoil', 'type' => 'text'), array('label' => __('Sludge', 'bon'), 'desc' => __('Sludge', 'bon'), 'id' => $prefix . $suffix . 'sludge', 'type' => 'text'), array('label' => __('Watermist', 'bon'), 'desc' => __('Watermist', 'bon'), 'id' => $prefix . $suffix . 'watermist', 'type' => 'text'));
    $misc_options = array(array('label' => __('Badge', 'bon'), 'desc' => __('badge text to show in listings view', 'bon'), 'id' => $prefix . $suffix . 'badge', 'type' => 'text'), array('label' => __('Badge color', 'bon'), 'desc' => __('badge text to show in listings view', 'bon'), 'id' => $prefix . $suffix . 'badge_color', 'type' => 'select', 'options' => array('none' => __('None', 'bon'), 'badge-red' => __('Red', 'bon'), 'badge-orange' => __('Orange', 'bon'), 'badge-green' => __('Green', 'bon'), 'badge-blue' => __('Blue', 'bon'), 'badge-purple' => __('Purple', 'bon'), 'badge-gray' => __('Gray', 'bon'))), array('label' => __('Price', 'bon'), 'desc' => __('The Property Price. Fill with numeric only, eq: 123456', 'bon'), 'id' => $prefix . $suffix . 'price', 'type' => 'text'), array('label' => __('Price as Text', 'bon'), 'desc' => __('Set price to use text. Text Options can be filled in theme Options, Shandora > Listing Settings > Price as Text.', 'bon'), 'id' => $prefix . $suffix . 'pricetext', 'type' => 'checkbox'), array('label' => __('Featured Boat', 'bon'), 'desc' => __('Make the listing featured for featured listing widget', 'bon'), 'id' => $prefix . $suffix . 'featured', 'type' => 'checkbox'), array('label' => __('Agent for this listing', 'bon'), 'desc' => __('The sales rep pointed for this boat listing', 'bon'), 'id' => $prefix . $suffix . 'agentpointed', 'type' => 'old_post_select', 'post_type' => 'agent'));
    $opts = array('gallery-options' => array('label' => __('Gallery', 'bon'), 'options' => shandora_gallery_metabox_args(), 'show_ui' => false), 'boat-misc-options' => array('label' => __('Miscellaneous', 'bon'), 'options' => $misc_options, 'show_ui' => false), 'boat-detail-options' => array('label' => __('Detail', 'bon'), 'options' => $detail_options, 'show_ui' => true), 'boat-dimension-options' => array('label' => __('Dimension', 'bon'), 'options' => $dimension_options, 'show_ui' => true), 'boat-capacity-options' => array('label' => __('Capacity', 'bon'), 'options' => $capacity_options, 'show_ui' => true, 'measure' => bon_get_option('volume_measure', 'litres')), 'video-options' => array('label' => __('Video', 'bon'), 'options' => shandora_video_metabox_args(), 'show_ui' => false));
    return $opts;
}