示例#1
1
function logbee_header()
{
    $location = Rewrite::newInstance()->get_location();
    $section = Rewrite::newInstance()->get_section();
    if ($location == 'item' && $section == '') {
        echo '
<style type="text/css">
  .logbee ul { margin: 10px 0; list-style: none; }
  .logbee ul li { float: left; }
  .logbee .clear { clear:both; }
</style>';
        // meta-tags
        $address_array = array();
        if (osc_item_address() != "") {
            $address_array[] = osc_item_address();
        }
        if (osc_item_city_area() != "") {
            $address_array[] = osc_item_city_area();
        }
        if (osc_item_zip() != "") {
            $address_array[] = osc_item_zip();
        }
        if (osc_item_city() != "") {
            $address_array[] = osc_item_city();
        }
        if (osc_item_region() != "") {
            $address_array[] = osc_item_region();
        }
        if (osc_item_country() != "") {
            $address_array[] = osc_item_country();
        }
        $address = implode(", ", $address_array);
        $price = '';
        if (osc_item_formated_price() != "") {
            $price = osc_item_formated_price();
        }
        $email = '';
        if (osc_item_show_email()) {
            $email = osc_item_contact_email();
        }
        echo '
 <meta property="logbee:title" content="' . osc_esc_html(osc_item_title()) . '"/>
 <meta property="logbee:url"   content="' . osc_esc_html(osc_item_url()) . '"/>
 <meta property="logbee:desc"  content="' . osc_esc_html(osc_item_description()) . '"/>
 <meta property="logbee:addr"  content="' . osc_esc_html($address) . '"/>
 <meta property="logbee:email" content="' . osc_esc_html($email) . '"/>
 <meta property="logbee:price" content="' . osc_esc_html($price) . '"/>';
        // do we have the cars_plugin enabled?
        if (osc_plugin_is_enabled('cars_attributes/index.php')) {
            require_once osc_plugin_path('') . '/cars_attributes/ModelCars.php';
            if (osc_is_this_category('cars_plugin', osc_item_category_id())) {
                $detail = ModelCars::newInstance()->getCarAttr(osc_item_id());
                echo '
 <meta property="logbee:type" content="car"/>
 <meta property="logbee:mileage" content="' . osc_esc_html(@$detail['i_mileage']) . '"/>
 <meta property="logbee:firstreg" content="' . osc_esc_html(@$detail['i_year']) . '"/>';
            }
        }
        // do we have the realestate_plugin enabled?
        if (osc_plugin_is_enabled('realestate_attributes/index.php')) {
            require_once osc_plugin_path('') . '/realestate_attributes/ModelRealEstate.php';
            if (osc_is_this_category('realestate_plugin', osc_item_category_id())) {
                $detail = ModelRealEstate::newInstance()->getAttributes(osc_item_id());
                echo '
 <meta property="logbee:type" content="realty"/>
 <meta property="logbee:rooms" content="' . osc_esc_html(@$detail['i_num_rooms']) . '"/>
 <meta property="logbee:size" content="' . osc_esc_html(@$detail['s_square_meters']) . ' sqm"/>';
            }
        }
        // images
        osc_reset_resources();
        $images_array = array();
        for ($i = 0; osc_has_item_resources(); $i++) {
            $images_array[] = osc_esc_html(osc_resource_url());
        }
        $images = implode("|", $images_array);
        echo '
 <meta property="logbee:imgurl" content="' . $images . '"/>
 ';
        osc_reset_resources();
        echo "\n";
    }
}
示例#2
0
function getImage()
{
    if (getUrl() == osc_base_url()) {
        if (file_exists(WebThemes::newInstance()->getCurrentThemePath() . "images/logo.jpg")) {
            $image = osc_current_web_theme_url('images/logo.jpg');
        } else {
            $image = osc_current_web_theme_url('images/default-logo.jpg');
        }
    } else {
        if (osc_images_enabled_at_items()) {
            if (osc_count_item_resources() > 0) {
                $image = osc_resource_url();
            } else {
                $image = osc_current_web_theme_url('images/logo.jpg');
            }
        } else {
            $image = osc_current_web_theme_url('images/logo.jpg');
        }
    }
    return $image;
}
示例#3
0
文件: main.php 项目: abhi143u11/ads
                                <?php 
    while (osc_has_premiums()) {
        ?>
                                <div class="item clearfix">
                                    <div class="col-md-5 col-sm-5">
                                        <?php 
        if (osc_images_enabled_at_items()) {
            ?>
                                            <?php 
            if (osc_count_premium_resources()) {
                ?>
                                            <a href="<?php 
                echo osc_premium_url();
                ?>
"><img src="<?php 
                echo osc_resource_url();
                ?>
" alt="<?php 
                echo osc_premium_title();
                ?>
" class="img-responsive" /></a>
                                            <?php 
            } else {
                ?>
                                            <a href="<?php 
                echo osc_premium_url();
                ?>
"><img src="<?php 
                echo osc_current_web_theme_url('images/no-photo.jpg');
                ?>
" alt="<?php 
示例#4
0
<?php 
$resource_url = "";
?>
    <?php 
if (osc_images_enabled_at_items()) {
    ?>
        <?php 
    if (osc_count_item_resources() > 0) {
        ?>
            <?php 
        $GLOBALS['resource_url'] = osc_resource_url();
        ?>
       <?php 
    }
    ?>
     <?php 
}
?>
   
<!DOCTYPE html>
<html lang="en">

<head>
    <?php 
osc_current_web_theme_path('head.php');
?>
</head>
<body>

示例#5
0
function pop_pinterest_share_url()
{
    $p = "javascript:window.open('https://pinterest.com/pin/create/button/?url='+encodeURIComponent('" . osc_resource_url() . "')+'&media='+encodeURIComponent('" . osc_item_url() . "'), '_blank', 'width=400,height=500');void(0);";
    return $p;
}