当前位置: 首页>>代码示例>>PHP>>正文


PHP Model_Ad::current方法代码示例

本文整理汇总了PHP中Model_Ad::current方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_Ad::current方法的具体用法?PHP Model_Ad::current怎么用?PHP Model_Ad::current使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Model_Ad的用法示例。


在下文中一共展示了Model_Ad::current方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: current

 /**
  * returns the current location
  * @return Model_Location
  */
 public static function current()
 {
     //we don't have so let's retrieve
     if (self::$_current === NULL) {
         self::$_current = new self();
         if (Model_Ad::current() != NULL and Model_Ad::current()->loaded() and Model_Ad::current()->location->loaded()) {
             self::$_current = Model_Ad::current()->location;
         } elseif (Request::current()->param('location') != NULL || Request::current()->param('location') != URL::title(__('all'))) {
             self::$_current = self::$_current->where('seoname', '=', Request::current()->param('location'))->limit(1)->cached()->find();
         }
     }
     return self::$_current;
 }
开发者ID:EmmanuelSimond,项目名称:openclassifieds2,代码行数:17,代码来源:location.php

示例2:

    ?>
"/>
<meta property="logbee:addr" content="<?php 
    echo Model_Ad::current()->address;
    ?>
"/>
<meta property="logbee:email" content="<?php 
    echo Model_Ad::current()->user->email;
    ?>
"/>
<meta property="logbee:phone" content="<?php 
    echo Model_Ad::current()->phone;
    ?>
"/>
<meta property="logbee:price" content="<?php 
    echo i18n::money_format(Model_Ad::current()->price);
    ?>
"/>
<meta property="logbee:imgurl" content="<?php 
    echo Controller::$image;
    ?>
"/>
<?php 
}
?>
 

<link rel="shortcut icon" href="<?php 
echo Theme::get('favicon_url') != '' ? Theme::get('favicon_url') : core::config('general.base_url') . 'images/favicon.ico';
?>
">
开发者ID:demoic,项目名称:openclassifieds2,代码行数:31,代码来源:header_metas.php

示例3:

        if (!strcmp(trim($value), 'print')) {
            ?>
<span class='st_print_large' displayText='Print'></span><?php 
        }
        ?>
	<?php 
    }
}
?>

<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="//ws.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "12d591ee-d8ab-456d-807f-f11fb504d15b", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>

<?php 
if (core::config('advertisement.logbee') == 1 and class_exists('Model_Ad') and Model_Ad::current() !== NULL and Model_Ad::current()->loaded()) {
    ?>
<script type="text/javascript">function logbee_wopen(url){ var win = window.open(url, 'logbee', 'width=1200, height=1000, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizeable=yes'); win.resizeTo(w, h); win.focus(); }</script>

<div class="logbee"> 
  <a href="" class="log-it-button" onclick="javascript:logbee_wopen('http://www.logbee.com/add?url=<?php 
    echo URL::current();
    ?>
');return false;"><img src="//www.logbee.com/img/affiliation/logbee_portal_button_logit_60x25.png" border="0" title="log it"></a>

  <div class="clear"></div>
</div>
<?php 
}
?>
 
开发者ID:kotsios5,项目名称:openclassifieds2,代码行数:30,代码来源:widget_share.php


注:本文中的Model_Ad::current方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。