コード例 #1
0
ファイル: functions.php プロジェクト: steenhulthin/hult.in
/**
 * Return flag URL from 2 letter country code
 *
 */
function yourls_geo_get_flag($code)
{
    if (file_exists(YOURLS_INC . '/geo/flags/flag_' . strtolower($code) . '.gif')) {
        $img = yourls_match_current_protocol(YOURLS_SITE . '/includes/geo/flags/flag_' . strtolower($code) . '.gif');
    } else {
        $img = false;
    }
    return yourls_apply_filter('geo_get_flag', $img, $code);
}
コード例 #2
0
    $i = 0;
    foreach ($keyword_list as $k) {
        $i++;
        if ($i == 1) {
            yourls_html_link(yourls_link($k));
        } else {
            yourls_html_link(yourls_link($k), "/{$k}");
        }
        if ($i < count($keyword_list)) {
            echo ' + ';
        }
    }
} else {
    yourls_html_link(yourls_link($keyword));
    if (isset($keyword_list) && count($keyword_list) > 1) {
        echo ' <a href="' . yourls_link($keyword) . '+all" title="' . yourls_esc_attr__('Aggregate stats for duplicate short URLs') . '"><img src="' . yourls_match_current_protocol(YOURLS_SITE) . '/images/chart_bar_add.png" border="0" /></a>';
    }
}
?>
</h3>
<h3 id="longurl"><span class="label"><?php 
yourls_e('Long URL');
?>
:</span> <img class="fix_images" src="<?php 
echo yourls_get_favicon_url($longurl);
?>
" /> <?php 
yourls_html_link($longurl, yourls_trim_long_string($longurl), 'longurl');
?>
</h3>
コード例 #3
0
ファイル: functions-infos.php プロジェクト: chadcumm/YOURLS
/**
 * Return favicon URL
 *
 */
function yourls_get_favicon_url($url)
{
    return yourls_match_current_protocol('http://www.google.com/s2/u/0/favicons?domain=' . yourls_get_domain($url, false));
}