source: trunk/data/smarty_extends/block.marquee.php @ 18562

Revision 18562, 628 bytes checked in by kajiwara, 14 years ago (diff)

EC-CUBE Ver2.4.3 分コミット。詳細はこちら( http://www.ec-cube.net/release/detail.php?release_id=210

  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2/**
3 * marqueeタグで囲む。
4 *
5 * DoCoMoの携帯端末の場合はmarqueeを使用しない。
6 *
7 * @param string $value 入力
8 * @return string 出力
9 */
10function smarty_block_marquee($params, $content, &$smarty, &$repeat) {
11    // {/marquee}の場合のみ出力する。
12    if ($repeat || !isset($content)) {
13        return null;
14    }
15
16    // 末尾の改行などを取り除く。
17    $content = rtrim($content);
18
19    // marqueeタグを使用しない場合
20    if (defined('MOBILE_SITE') && SC_MobileUserAgent::getCarrier() == 'docomo') {
21        return "<div>\n$content\n</div>\n";
22    }
23
24    return "<marquee>\n$content\n</marquee>\n";
25}
26?>
Note: See TracBrowser for help on using the repository browser.