Example #1
0
        <a class="btn btn-success" href="<?php 
    echo osc_item_post_url_in_category();
    ?>
"><i class="fa fa-pencil-square-o"></i>&nbsp;
        <?php 
    _e('Publish your ad for free', OSCLASSWIZARDS_THEME_FOLDER);
    ?>
        </a>
        <?php 
}
?>
      </div>
    </div>
  </div>
  <?php 
if (osc_is_home_page()) {
    if (osc_get_preference('show_banner', 'osclasswizards_theme') == '1') {
        echo '<div id="header_map">';
        if (homepage_image()) {
            echo homepage_image();
        } else {
            echo '<img src="' . osc_current_web_theme_url('images/banner.jpg') . '" />';
        }
        echo '</div>';
    }
    ?>
  <div class="banner_none" id="form_vh_map">
    <form action="<?php 
    echo osc_base_url(true);
    ?>
" id="main_search" method="get" class="search nocsrf" >
Example #2
0
" id="form_publish" class="ui-button"><?php 
    _e("Publish your ad for free", 'realestate');
    ?>
</a>
        <?php 
}
?>
        <div class="empty"></div>
    </div>
    <div id="header-shadow"></div>
</div>
<!-- /header -->
<?php 
if (function_exists('breadcrumbs')) {
    ?>
    <?php 
    if (!osc_is_home_page()) {
        ?>
    <div class="breadcrumb">
        <?php 
        breadcrumbs('&raquo;');
        ?>
    </div>
    <?php 
    }
}
?>
<!-- container -->
<div class="container">
<?php 
osc_show_widgets('header');
Example #3
0
function load_my_script()
{
    osc_register_script('jquery-ui', osc_base_url() . 'oc-content/themes/classified/js/jquery-ui.min.js', 'jquery');
    osc_register_script('cookie-plugin', osc_base_url() . 'oc-content/themes/classified/js/jquery.cookie.min.js', 'jquery');
    osc_register_script('tiny_mce', osc_base_url() . 'oc-includes/osclass/assets/js/tiny_mce/tiny_mce.js');
    osc_enqueue_script('tiny_mce');
    osc_register_script('ratings', osc_base_url() . 'oc-content/themes/classified/js/jRate.min.js');
    osc_enqueue_script('ratings');
    osc_register_script('facebook-admin', osc_base_url() . 'oc-content/themes/classified/js/facebook-admin.js');
    osc_register_script('jquery-validate', osc_base_url() . 'oc-content/themes/classified/js/jquery.validate.min.js', 'jquery');
    osc_enqueue_script('jquery-validate');
    osc_enqueue_script('facebook-admin');
    osc_register_script('classified', osc_base_url() . 'oc-content/themes/classified/js/classified.js');
    osc_enqueue_script('classified');
    osc_register_script('jssor', osc_base_url() . 'oc-content/themes/classified/js/jssor.js');
    osc_enqueue_script('jssor');
    osc_register_script('jssor-slider', osc_base_url() . 'oc-content/themes/classified/js/jssor.slider.js');
    osc_enqueue_script('jssor-slider');
    osc_enqueue_script('cookie-plugin');
    osc_register_script('bootstrap-dialog', osc_base_url() . 'oc-content/themes/classified/js/bootstrap-dialog.min.js');
    osc_register_script('jquery-uniform', osc_base_url() . 'oc-content/themes/classified/js/jquery.uniform.js');
    osc_register_script('jquery-fineuploader', osc_base_url() . 'oc-includes/osclass/assets/js/fineuploader/jquery.fineuploader.min.js', 'jquery');
    if (!OC_ADMIN) {
        osc_enqueue_style('font-awesome', osc_base_url() . 'oc-content/themes/classified/css/font-awesome.min.css');
        osc_enqueue_style('bootstrap', osc_base_url() . 'oc-content/themes/classified/bootstrap/bootstrap.css');
        osc_enqueue_style('facebook-css', osc_base_url() . 'oc-content/themes/classified/css/facebook.css');
        osc_enqueue_style('default-css', osc_base_url() . 'oc-content/themes/classified/css/style.css');
    }
    if (osc_is_home_page()) {
        osc_enqueue_style('jCarouselLite-css', osc_base_url() . 'oc-content/themes/classified/css/premium_slide.css');
        osc_register_script('jCarouselLite', osc_base_url() . 'oc-content/themes/classified/js/jCarouselLite.js');
        osc_enqueue_script('jCarouselLite');
    }
    if (nc_osc_show_shout_box()) {
        osc_enqueue_style('shoutbox', osc_base_url() . 'oc-content/themes/classified/shoutbox/style.css');
    }
}
    function pop_draw_categories_list()
    {
        ?>
        <?php 
        if (!osc_is_home_page()) {
            echo '<div class="resp-wrapper">';
        }
        ?>
        <?php 
        //cell_3
        $total_categories = osc_count_categories();
        $col1_max_cat = ceil($total_categories / 3);
        osc_goto_first_category();
        $i = 0;
        while (osc_has_categories()) {
            ?>
            <?php 
            if ($i % $col1_max_cat == 0) {
                if ($i > 0) {
                    echo '</div>';
                }
                if ($i == 0) {
                    echo '<div class="cell_3 first_cel">';
                } else {
                    echo '<div class="cell_3">';
                }
            }
            ?>
            <ul class="r-list">
                <li>
                    <h1>
                        <?php 
            $_slug = osc_category_slug();
            $_url = osc_search_category_url();
            $_name = osc_category_name();
            $_total_items = osc_category_total_items();
            if (osc_count_subcategories() > 0) {
                ?>
                            <span class="collapse resp-toogle"><i class="fa fa-caret-right fa-lg"></i></span>
                        <?php 
            }
            ?>
                        <?php 
            if ($_total_items > 0) {
                ?>
                            <a class="category <?php 
                echo $_slug;
                ?>
" href="<?php 
                echo $_url;
                ?>
"><?php 
                echo $_name;
                ?>
</a> <span>(<?php 
                echo $_total_items;
                ?>
)</span>
                        <?php 
            } else {
                ?>
                            <a class="category <?php 
                echo $_slug;
                ?>
" href="#"><?php 
                echo $_name;
                ?>
</a> <span>(<?php 
                echo $_total_items;
                ?>
)</span>
                        <?php 
            }
            ?>
                    </h1>
                    <?php 
            if (osc_count_subcategories() > 0) {
                ?>
                        <ul>
                            <?php 
                while (osc_has_subcategories()) {
                    ?>
                                <li>
                                    <?php 
                    if (osc_category_total_items() > 0) {
                        ?>
                                        <a class="category sub-category <?php 
                        echo osc_category_slug();
                        ?>
" href="<?php 
                        echo osc_search_category_url();
                        ?>
"><?php 
                        echo osc_category_name();
                        ?>
</a> <span>(<?php 
                        echo osc_category_total_items();
                        ?>
)</span>
                                    <?php 
                    } else {
                        ?>
                                        <a class="category sub-category <?php 
                        echo osc_category_slug();
                        ?>
" href="#"><?php 
                        echo osc_category_name();
                        ?>
</a> <span>(<?php 
                        echo osc_category_total_items();
                        ?>
)</span>
                                    <?php 
                    }
                    ?>
                                </li>
                            <?php 
                }
                ?>
                        </ul>
                    <?php 
            }
            ?>
                </li>
            </ul>
            <?php 
            $i++;
        }
        echo '</div>';
        ?>
        <?php 
        if (!osc_is_home_page()) {
            echo '</div>';
        }
        ?>
        <?php 
    }
Example #5
0
$class = '';
$loopClass = '';
$type = 'items';
if (View::newInstance()->_exists('listType')) {
    $type = View::newInstance()->_get('listType');
}
if (View::newInstance()->_exists('listClass')) {
    $loopClass = View::newInstance()->_get('listClass');
}
?>
<div class="masonry"><?php 
echo Params::getParam('page');
?>
    <?php 
if ((osc_is_search_page() || osc_is_home_page()) && Params::getParam('hook') != 'load_more_listing') {
    ?>
    <div class="item stamp sidebar">
        <?php 
    require WebThemes::newInstance()->getCurrentThemePath() . 'inc.search.filters.php';
    ?>
    </div>
    <?php 
    if (osc_is_search_page() && Params::getParam('hook') != 'load_more_listing') {
        ?>
    <div class="item stamp  stamp-alert">
        <?php 
        require WebThemes::newInstance()->getCurrentThemePath() . 'inc.alert.form.php';
        ?>
    </div>
    <?php 
function allSeo_description_filter($text)
{
    // CLEAN EXISTING DESCRIPTION
    $text = '';
    // HOME PAGE
    if (osc_is_home_page()) {
        $text = osc_page_description();
    }
    // STATIC PAGE
    if (osc_is_static_page()) {
        if (GetPageDesc() == '') {
            $text = osc_highlight(osc_static_page_text(), 140, '', '');
        } else {
            $text = GetPageDesc();
        }
    }
    // SEARCH & CATEGORY PAGE
    if (osc_is_search_page()) {
        $cat = osc_search_category_id();
        $cat_id = $cat[0];
        $cat_field = Category::newInstance()->findByPrimaryKey($cat_id);
        $country = GetCtrDesc(osc_search_country()) ? GetCtrDesc(osc_search_country()) : osc_search_country();
        $region = GetRegDesc(osc_search_region()) ? GetRegDesc(osc_search_region()) : osc_search_region();
        $city = osc_search_city();
        if (GetCatDesc($cat_id) != '') {
            $desc = GetCatDesc($cat_id);
        } else {
            $desc = $cat_field['s_name'];
        }
        $text = $desc;
        // ADD LOCATION DESCRIPTION
        if ($country != '') {
            $text .= ($text != '' ? ' - ' : '') . $country;
        }
        if ($region != '') {
            $text .= ($text != '' ? ' - ' : '') . $region;
        }
        if ($city != '') {
            $text .= ($text != '' ? ' - ' : '') . $city;
        }
        // Improve search/category title adding part of listings in this category/search
        if (osc_get_preference('allSeo_search_improve_desc', 'plugin-all_in_one') == 1) {
            osc_reset_custom_items();
            osc_query_item(array("category" => $cat_id, "country_name" => $country, "region_name" => $region, "city_name" => $city));
            while (osc_has_custom_items()) {
                $item = Item::newInstance()->findByPrimaryKey(osc_item_id());
                $con = strip_tags($item['s_description']);
                if (osc_item_city() != '') {
                    $text .= ' - ' . osc_item_city();
                }
                if ($con != '') {
                    $text .= ', ' . osc_highlight($con, 100);
                }
            }
        }
        $text = osc_highlight($text, 500);
        osc_reset_items();
    }
    // Listing page
    if (osc_is_ad_page()) {
        if (GetItemDesc() == '') {
            if (GetCatDesc(osc_item_category_id()) != '') {
                $desc = GetCatDesc(osc_item_category_id());
            } else {
                $desc = osc_item_category();
            }
            $item = Item::newInstance()->findByPrimaryKey(osc_item_id());
            $text = $desc . ' - ' . osc_highlight($item['s_description'], 120) . ', ' . SeoLocationShow();
        } else {
            $text = GetItemDesc();
        }
    }
    return $text;
}
Example #7
0
    function osclasswizards_draw_categories_list()
    {
        if (!osc_is_home_page()) {
            echo '<div class="resp-wrapper">';
        }
        ?>

<h1 class="title"><?php 
        _e('Categories', OSCLASSWIZARDS_THEME_FOLDER);
        ?>
</h1>
<div class="row">
<?php 
        $total_categories = osc_count_categories();
        $col1_max_cat = ceil($total_categories / 1);
        osc_goto_first_category();
        $catcount = 0;
        while (osc_has_categories()) {
            ?>
<ul class="col-sm-6 col-md-3 grid_list">
  <li>
    <section class="listings">
     <h2><i class="fa fa-<?php 
            echo osclasswizards_category_icon(osc_category_id());
            ?>
"></i>
      <?php 
            $_slug = osc_category_slug();
            $_url = osc_search_category_url();
            $_name = osc_category_name();
            $_total_items = osc_category_total_items();
            if (osc_count_subcategories() > 0) {
                ?>
      <?php 
            }
            ?>
      <?php 
            if ($_total_items > 0) {
                ?>
      <a class="category <?php 
                echo $_slug;
                ?>
" href="<?php 
                echo $_url;
                ?>
"><?php 
                echo $_name;
                ?>
</a> <span><?php 
                echo $_total_items;
                ?>
</span>
      <?php 
            } else {
                ?>
      <a class="category <?php 
                echo $_slug;
                ?>
" href="#"><?php 
                echo $_name;
                ?>
</a> <span><?php 
                echo $_total_items;
                ?>
</span>
      <?php 
            }
            ?>
    </h2>
    <?php 
            if (osc_count_subcategories() > 0) {
                $m = 1;
                ?>
    <ul>
      <?php 
                while (osc_has_subcategories()) {
                    if ($m <= osc_get_preference('sub_cat_limit', 'osclasswizards_theme')) {
                        ?>
      <li>
        <?php 
                        if (osc_category_total_items() > 0) {
                            ?>
        <a class="category sub-category <?php 
                            echo osc_category_slug();
                            ?>
" href="<?php 
                            echo osc_search_category_url();
                            ?>
"><?php 
                            echo osc_category_name();
                            ?>
</a> <span>(<?php 
                            echo osc_category_total_items();
                            ?>
)</span>
        <?php 
                        } else {
                            ?>
        <a class="category sub-category <?php 
                            echo osc_category_slug();
                            ?>
" href="#"><?php 
                            echo osc_category_name();
                            ?>
</a> <span>(<?php 
                            echo osc_category_total_items();
                            ?>
)</span>
        <?php 
                        }
                        ?>
      </li>
      <?php 
                    }
                    $m++;
                }
                if ($m > osc_get_preference('sub_cat_limit', 'osclasswizards_theme') + 1) {
                    ?>
      <li class="last"><a href="<?php 
                    echo $_url;
                    ?>
"><strong><?php 
                    _e('See more listings...', OSCLASSWIZARDS_THEME_FOLDER);
                    ?>
</strong></a></li>
      <?php 
                }
                ?>
    </ul>
    <?php 
            }
            ?>
    </section>
  </li>
</ul>
<?php 
            $catcount++;
            if ($catcount % 4 == 0) {
                echo '</div><div class="row">';
            }
        }
        ?>
 </div>
<?php 
    }
Example #8
0
function meta_description()
{
    $text = '';
    // home page
    if (osc_is_home_page()) {
        $text = osc_page_description();
    }
    // static page
    if (osc_is_static_page()) {
        $text = osc_highlight(osc_static_page_text(), 140, '', '');
    }
    // search
    if (osc_is_search_page()) {
        if (osc_has_items()) {
            $text = osc_item_category() . ' ' . osc_item_city() . ', ' . osc_highlight(osc_item_description(), 120);
        }
        osc_reset_items();
    }
    // listing
    if (osc_is_ad_page()) {
        $text = osc_item_category() . ' ' . osc_item_city() . ', ' . osc_highlight(osc_item_description(), 120);
    }
    return osc_apply_filter('meta_description_filter', $text);
}
    </div>
    <div style="clear:both;margin-bottom: 1em;"></div>
</div><!-- footer -->

<?php 
osc_run_hook('footer');
?>

<script>
    // fix bootstrap dropdown
    $('a.dropdown-toggle, .dropdown-menu a').on('touchstart', function(e) {
        e.stopPropagation();
      });

<?php 
if (osc_is_search_page() || osc_is_home_page()) {
    ?>
    var container = $('.masonry').masonry(
            {"isFitWidth": true, "columnWidth": 220, "itemSelector": ".item", "gutter": 20, "stamp": ".stamp"}
    );
<?php 
} else {
    ?>
    var container = $('.masonry').masonry(
            {"isFitWidth": true, "columnWidth": 220, "itemSelector": ".item", "gutter": 20}
    );
<?php 
}
?>
    // layout Masonry again after all images have loaded
    container.imagesLoaded(function () {
Example #10
0
function seo_meta_keywords_filter()
{
    $text = '';
    //home page
    if (osc_is_home_page()) {
        if (osc_get_preference('seo_metakeywords_home', 'seo_plugin')) {
            $text = osc_get_preference('seo_metakeywords_home', 'seo_plugin');
        }
    }
    // static page
    if (osc_is_static_page()) {
        if (osc_get_preference('seo_metakeywords_page_' . osc_static_page_id(), 'seo_plugin')) {
            $text = osc_get_preference('seo_metakeywords_page_' . osc_static_page_id(), 'seo_plugin');
        }
    }
    //contact page
    if (osc_is_contact_page()) {
        if (osc_get_preference('seo_metakeywords_page_contact', 'seo_plugin')) {
            $text = osc_get_preference('seo_metakeywords_page_contact', 'seo_plugin');
        }
    }
    // search
    if (osc_is_search_page()) {
        if (osc_has_items()) {
            $keywords = array();
            $keywords[] = osc_item_category();
            if (osc_item_city() != '') {
                $keywords[] = osc_item_city();
                $keywords[] = sprintf('%s %s', osc_item_category(), osc_item_city());
            }
            if (osc_item_region() != '') {
                $keywords[] = osc_item_region();
                $keywords[] = sprintf('%s %s', osc_item_category(), osc_item_region());
            }
            if (osc_item_city() != '' && osc_item_region() != '') {
                $keywords[] = sprintf('%s %s %s', osc_item_category(), osc_item_region(), osc_item_city());
                $keywords[] = sprintf('%s %s', osc_item_region(), osc_item_city());
            }
            $text = implode(', ', $keywords);
        }
        osc_reset_items();
    }
    // listing
    if (osc_is_ad_page()) {
        $detail = seo_get_row(osc_item_id());
        if (empty($detail['seo_item_meta_keywords'])) {
            $keywords = array();
            $keywords[] = osc_item_category();
            if (osc_item_city() != '') {
                $keywords[] = osc_item_city();
                $keywords[] = sprintf('%s %s', osc_item_category(), osc_item_city());
            }
            if (osc_item_region() != '') {
                $keywords[] = osc_item_region();
                $keywords[] = sprintf('%s %s', osc_item_category(), osc_item_region());
            }
            if (osc_item_city() != '' && osc_item_region() != '') {
                $keywords[] = sprintf('%s %s %s', osc_item_category(), osc_item_region(), osc_item_city());
                $keywords[] = sprintf('%s %s', osc_item_region(), osc_item_city());
            }
            $text = implode(', ', $keywords);
        } else {
            $text = $detail['seo_item_meta_keywords'];
        }
    }
    return $text;
}
Example #11
0
if (osc_users_enabled() || !osc_users_enabled() && !osc_reg_user_post()) {
    ?>
            <li class="publish"><a href="<?php 
    echo osc_item_post_url_in_category();
    ?>
"><?php 
    _e("Publish your ad for free", 'bender');
    ?>
</a></li>
            <?php 
}
?>
        </ul>
    </div>
    <?php 
if (osc_is_home_page() || osc_is_static_page() || osc_is_contact_page()) {
    ?>
    <form action="<?php 
    echo osc_base_url(true);
    ?>
" method="get" class="search nocsrf" <?php 
    /* onsubmit="javascript:return doSearch();"*/
    ?>
>
        <input type="hidden" name="page" value="search"/>
        <div class="main-search">
            <div class="cell">
                <input type="text" name="sPattern" id="query" class="input-text" value="" placeholder="<?php 
    echo osc_esc_html(__(osc_get_preference('keyword_placeholder', 'bender_theme'), 'bender'));
    ?>
" />
Example #12
0
 function add_default_bodyclasses()
 {
     if (osc_is_ad_page()) {
         echo 'ad-page';
     }
     if (osc_is_search_page()) {
         echo 'search-page';
     }
     if (osc_is_static_page()) {
         echo 'static-page';
     }
     if (osc_is_home_page()) {
         echo 'home-page';
     }
     if (osc_is_user_dashboard()) {
         echo 'user-dashboard';
     }
     if (osc_is_publish_page()) {
         echo 'publish-page';
     }
     if (osc_is_login_form()) {
         echo 'login-form';
     }
     if (osc_is_contact_page()) {
         echo 'contact-form';
     }
     if (Params::getParam('action') == 'send_friend') {
         echo 'send-friend';
     }
     if (Params::getParam('action') == 'contact') {
         echo 'item-contact';
     }
 }
Example #13
0
    function osclasswizards_draw_categories_list()
    {
        if (!osc_is_home_page()) {
            echo '<div class="resp-wrapper">';
        }
        ?>
<h1 class="title">
    <?php 
        _e("Categories", 'osclasswizards');
        ?>
</h1>
<?php 
        //cell_3
        $total_categories = osc_count_categories();
        $col1_max_cat = ceil($total_categories / 1);
        osc_goto_first_category();
        $i = 0;
        $catcount = 0;
        while (osc_has_categories()) {
            $catcount++;
            if ($catcount == 1) {
                echo '<div class="row">';
            }
            ?>
<ul class="col-sm-6 col-md-6 grid_list">
    <li>
        <?php 
            $_slug = osc_category_slug();
            $_url = osc_search_category_url();
            $_name = osc_category_name();
            $_total_items = osc_category_total_items();
            if (osc_count_subcategories() > 0) {
                ?>
        <section class="listings row">

            <h2 class="col-md-7 category <?php 
                echo $_slug;
                ?>
 <?php 
                echo $_name;
                ?>
">


                <?php 
                if ($_total_items > 0) {
                    ?>
                <a href="<?php 
                    echo $_url;
                    ?>
"><?php 
                    echo $_name;
                    ?>
</a> <span><?php 
                    echo $_total_items;
                    ?>
</span>
                <?php 
                } else {
                    ?>
                <a href="#"><?php 
                    echo $_name;
                    ?>
</a> <span><?php 
                    echo $_total_items;
                    ?>
</span>
                <?php 
                }
                ?>
                <?php 
            }
            ?>
            </h2>
            <?php 
            if (osc_count_subcategories() > 0) {
                $m = 1;
                ?>
            <ul class="col-md-5">
                <?php 
                while (osc_has_subcategories()) {
                    if ($m <= 5) {
                        ?>
                <li>
                    <?php 
                        if (osc_category_total_items() > 0) {
                            ?>
                    <a class="category sub-category <?php 
                            echo osc_category_slug();
                            ?>
" href="<?php 
                            echo osc_search_category_url();
                            ?>
"><?php 
                            echo osc_category_name();
                            ?>
</a> <span>(<?php 
                            echo osc_category_total_items();
                            ?>
)</span>
                    <?php 
                        } else {
                            ?>
                    <a class="category sub-category <?php 
                            echo osc_category_slug();
                            ?>
" href="#"><?php 
                            echo osc_category_name();
                            ?>
</a> <span>(<?php 
                            echo osc_category_total_items();
                            ?>
)</span>
                    <?php 
                        }
                        ?>
                </li>
                <?php 
                    }
                    $m++;
                }
                if ($m > 6) {
                    ?>
                <li class="last"><a href="<?php 
                    echo $_url;
                    ?>
"><strong><?php 
                    _e('See more listings...', 'osclasswizards');
                    ?>
</strong></a></li>
                <?php 
                }
                ?>
            </ul>
            <?php 
            }
            ?>


        </section>

    </li>
</ul>
<?php 
            $i++;
            if ($catcount == 4) {
                echo '</div>';
                $catcount = 0;
            }
        }
        echo '</div>';
        if (!osc_is_home_page()) {
            echo '</div>';
        }
    }