Exemple #1
0
/**
 * Template tag. Output HTML base tag to current skin.
 *
 * This is needed for relative css and img includes.
 */
function skin_base_tag()
{
    global $skins_url, $skin, $Blog, $disp;
    if (!empty($Blog)) {
        // We are displaying a blog:
        if (!empty($skin)) {
            // We are using a skin:
            $base_href = $Blog->get_local_skins_url() . $skin . '/';
        } else {
            // No skin used:
            $base_href = $Blog->gen_baseurl();
        }
    } else {
        // We are displaying a general page that is not specific to a blog:
        global $baseurl;
        $base_href = $baseurl;
    }
    $target = NULL;
    if (!empty($disp) && strpos($disp, '-popup')) {
        // We are (normally) displaying in a popup window, we need most links to open a new window!
        $target = '_blank';
    }
    base_tag($base_href, $target);
}
Exemple #2
0
/**
 * Template tag. Output HTML base tag to current skin.
 *
 * This is needed for relative css and img includes.
 */
function skin_base_tag()
{
    global $skins_url, $skin, $Blog, $disp;
    if (!empty($skin)) {
        $base_href = $skins_url . $skin . '/';
    } else {
        // No skin used:
        if (!empty($Blog)) {
            $base_href = $Blog->gen_baseurl();
        } else {
            global $baseurl;
            $base_href = $baseurl;
        }
    }
    $target = NULL;
    if (!empty($disp) && strpos($disp, '-popup')) {
        // We are (normally) displaying in a popup window, we need most links to open a new window!
        $target = '_blank';
    }
    base_tag($base_href, $target);
}