コード例 #1
0
 /**
  * Test cases for _img()
  */
 public function testForFunctionUnderscoreImg()
 {
     $this->assertEqual(_img('logo.png'), WEB_ROOT . 'assets/images/logo.png');
 }
コード例 #2
0
ファイル: MY_url_helper.php プロジェクト: Garybaldy/rotio
function product_img($uri, $tag = true)
{
    $base_produk = config_item('dir_product_upload');
    $path_img = assets_url(assets_dir('img') . '/' . $base_produk . '/' . $uri);
    return _img($path_img, $uri, $tag);
}
コード例 #3
0
 function img($src, $alt = null, $attributes = array())
 {
     echo _img($src, $alt, $attributes);
 }
コード例 #4
0
/**
 * Print SEO meta tags
 * @return void
 */
function _metaSeoTags()
{
    if (_meta('description')) {
        _cfg('metaDescription', _meta('description'));
    }
    if (_meta('keywords')) {
        _cfg('metaKeywords', _meta('keywords'));
    }
    $gpSiteName = _cfg('siteName');
    if (_meta('gp:name')) {
        $gpSiteName = _meta('gp:name');
    }
    if (_meta('gp:site_name')) {
        $gpSiteName = _meta('gp:site_name');
    }
    $tags = array();
    $tags['description'] = _cfg('metaDescription');
    $tags['keywords'] = _cfg('metaKeywords');
    $tags['og'] = array();
    $tags['og']['title'] = _meta('og:title') ? _meta('og:title') : _cfg('siteName');
    $tags['og']['url'] = _meta('og:url') ? _meta('og:url') : _url();
    $tags['og']['type'] = _meta('og:type') ? _meta('og:type') : 'website';
    $tags['og']['image'] = _meta('og:image') ? _meta('og:image') : _img('logo-200x200.jpg');
    $tags['og']['description'] = _meta('og:description') ? _meta('og:description') : _cfg('metaDescription');
    $tags['og']['site_name'] = _meta('og:site_name') ? _meta('og:site_name') : _cfg('siteName');
    $tags['twitter'] = array();
    $tags['twitter']['card'] = _meta('twitter:card') ? _meta('twitter:card') : 'summary';
    $tags['twitter']['site'] = _meta('twitter:site') ? '@' . _meta('twitter:site') : '@' . _cfg('siteDomain');
    $tags['twitter']['title'] = _meta('twitter:title') ? _meta('twitter:title') : _cfg('siteName');
    $tags['twitter']['description'] = _meta('twitter:description') ? _meta('twitter:description') : _cfg('metaDescription');
    $tags['twitter']['image'] = _meta('twitter:image') ? _meta('twitter:image') : _img('logo-120x120.jpg');
    $tags['gp'] = array();
    $tags['gp']['name'] = $gpSiteName;
    $tags['gp']['description'] = _meta('gp:description') ? _meta('gp:description') : _cfg('metaDescription');
    $tags['gp']['image'] = _meta('gp:image') ? _meta('gp:image') : _img('logo-200x200.jpg');
    if (function_exists('__metaSeoTags')) {
        echo __metaSeoTags($tags);
    } else {
        echo "\n";
        foreach ($tags as $name => $tag) {
            if ($name == 'og') {
                foreach ($tag as $key => $content) {
                    echo '<meta property="og:' . $key . '" content="' . $content . '" />' . "\n";
                }
            } elseif ($name == 'twitter') {
                foreach ($tag as $key => $content) {
                    echo '<meta name="twitter:' . $key . '" content="' . $content . '" />' . "\n";
                }
            } elseif ($name == 'gp') {
                foreach ($tag as $key => $content) {
                    echo '<meta itemprop="' . $key . '" content="' . $content . '" />' . "\n";
                }
            } else {
                echo '<meta name="' . $name . '" content="' . $tag . '" />' . "\n";
            }
        }
    }
}
コード例 #5
0
ファイル: head.php プロジェクト: phplucidframe/phplucidframe
<link rel="canonical" href="<?php 
echo _canonical();
?>
" />
<?php 
_hreflang();
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <?php 
// remove this line if your website isn't specifically designed to be responsive
_metaSeoTags();
?>
<link rel="shortcut icon" href="<?php 
echo _img('favicon.ico');
?>
" type="image/x-icon" />
<?php 
_css('base.css');
_css('base.' . _lang() . '.css');
_css('jquery-ui');
_js('jquery');
_js('jquery-ui');
_script();
_js('LC.js');
_js('site.js');
コード例 #6
0
ファイル: 404.php プロジェクト: slumbersoul/gnw-weixin
<div class="error">
	<img src="<?php 
echo _img('404.png');
?>
">
</div>
コード例 #7
0
ファイル: view.php プロジェクト: phplucidframe/phplucidframe
<div class="container-box">
    <form method="post" id="frmLogin">
    <div class="box">
        <div class="logo"><img src="<?php 
echo _img('logo.png');
?>
" /></div>
        <div class="form">
            <?php 
if ($msg = flash_get()) {
    echo $msg;
} else {
    ?>
                <div class="message error"></div>
            <?php 
}
?>
            <div class="row">
                <div class="entry"><input type="text" name="txtUsername" id="txtUsername" class="large full-width" placeholder="<?php 
echo _t('Username');
?>
" /></div>
            </div>
            <div class="row">
                <div class="entry pwd">
                    <input type="password" name="txtPwd" id="txtPwd" class="large full-width" placeholder="<?php 
echo _t('Password');
?>
" />
                    <a href="#" title="<?php 
echo _t('Forgot password?');