Revision 15080,
654 bytes
checked in by nanasess, 17 years ago
(diff) |
svn properties 設定
- svn:mime-type - application/x-httpd-php; charset=UTF-8
- svn:keywords - Id
|
-
Property svn:keywords set to
Id
-
Property svn:mime-type set to
application/x-httpd-php; charset=UTF-8
|
Rev | Line | |
---|
| 1 | <?php
|
---|
| 2 | /**
|
---|
| 3 | * marqueeタグで囲む。
|
---|
| 4 | *
|
---|
| 5 | * DoCoMoの携帯端末の場合はmarqueeを使用しない。
|
---|
| 6 | *
|
---|
| 7 | * @param string $value 入力
|
---|
| 8 | * @return string 出力
|
---|
| 9 | */
|
---|
| 10 | function 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') && GC_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.