当前位置: 首页>>代码示例>>PHP>>正文


PHP setting_fetch函数代码示例

本文整理汇总了PHP中setting_fetch函数的典型用法代码示例。如果您正苦于以下问题:PHP setting_fetch函数的具体用法?PHP setting_fetch怎么用?PHP setting_fetch使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了setting_fetch函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: settings_page

function settings_page($args)
{
    if ($args[1] == 'save') {
        $settings['browser'] = $_POST['browser'];
        $settings['gwt'] = $_POST['gwt'];
        $settings['colours'] = $_POST['colours'];
        $settings['reverse'] = $_POST['reverse'];
        setcookie_year('settings', base64_encode(serialize($settings)));
        twitter_refresh('');
    }
    $modes = array('mobile' => 'Normal phone', 'touch' => 'Touch phone', 'desktop' => 'PC/Laptop', 'text' => 'Text only', 'worksafe' => 'Work Safe', 'bigtouch' => 'Big Touch');
    $gwt = array('off' => 'direct', 'on' => 'via GWT');
    $colour_schemes = array();
    foreach ($GLOBALS['colour_schemes'] as $id => $info) {
        list($name, $colours) = explode('|', $info);
        $colour_schemes[$id] = $name;
    }
    $content .= '<form action="settings/save" method="post"><p>Colour scheme:<br /><select name="colours">';
    $content .= theme('options', $colour_schemes, setting_fetch('colours', 1));
    $content .= '</select></p><p>Mode:<br /><select name="browser">';
    $content .= theme('options', $modes, $GLOBALS['current_theme']);
    $content .= '</select></p><p>External links go:<br /><select name="gwt">';
    $content .= theme('options', $gwt, setting_fetch('gwt', $GLOBALS['current_theme'] == 'text' ? 'on' : 'off'));
    $content .= '</select><small><br />Google Web Transcoder (GWT) converts third-party sites into small, speedy pages suitable for older phones and people with less bandwidth.</small></p>';
    $content .= '<p><label><input type="checkbox" name="reverse" value="yes" ' . (setting_fetch('reverse') == 'yes' ? ' checked="checked" ' : '') . ' /> Attempt to reverse the conversation thread view.</label></p>';
    $content .= '<p><input type="submit" value="Save" /></p></form>';
    $content .= '<hr /><p>Visit <a href="reset">Reset</a> if things go horribly wrong - it will log you out and clear all settings.</p>';
    return theme('page', 'Settings', $content);
}
开发者ID:novasarii,项目名称:dabr,代码行数:29,代码来源:settings.php

示例2: theme_menu_both

function theme_menu_both($menu)
{
    $links = array();
    foreach (menu_visible_items() as $url => $page) {
        $title = $url ? $url : 'home';
        $title = ucwords(str_replace("-", " ", $title));
        if ('yes' == setting_fetch('menu_icons')) {
            $display = $page['display'];
            $class = "menu";
        } else {
            $display = $title . " |";
            $class = "menu-text";
        }
        if (!$url) {
            $url = BASE_URL;
        }
        // Shouldn't be required, due to <base> element but some browsers are stupid.
        // if ($menu == 'bottom' ) { //&& isset($page['accesskey'])) {
        // 	$links[] = "<a href='$url'>$title</a> {$page['accesskey']}";
        // } else {
        // 	// $links[] = "<a href='$url'>$title</a>";
        // }
        $links[] = "<a href=\"{$url}\" title=\"{$title}\">{$display}</a>";
    }
    if (user_is_authenticated()) {
        // $user = user_current_username();
        // array_unshift($links, "<b><a href='user/$user'>$user</a></b>");
    }
    if ($menu == 'bottom') {
        // $links[] = "<a href='{$_GET['q']}' accesskey='5'>refresh</a> 5";
    }
    return "<div class='{$class}' id='menu'>" . implode('&ensp;', $links) . '</div>';
}
开发者ID:icheyne,项目名称:Dabr,代码行数:33,代码来源:menu.php

示例3: css

function css()
{
    //	Get the colours that the user has chosen
    $c = theme('colours');
    $css = "@charset \"UTF-8\";\n\n@font-face {\n\tfont-family: 'icons';\n\tsrc: url('" . BASE_URL . "i/fonts/dabr-icons.eot');\n\tsrc: url('" . BASE_URL . "i/fonts/dabr-icons.eot#iefix') format('embedded-opentype'),\n\t     url('" . BASE_URL . "i/fonts/dabr-icons.woff2') format('woff2'),\n\t     url('" . BASE_URL . "i/fonts/dabr-icons.woff') format('woff'),\n\t     url('" . BASE_URL . "i/fonts/dabr-icons.ttf') format('truetype'),\n\t     url('" . BASE_URL . "i/fonts/dabr-icons.svg#dabr') format('svg');\n\tfont-weight: normal;\n\tfont-style: normal;\n}\n\nbody{\n\tmargin:0;\n\tfont-family: '" . urldecode(substr(setting_fetch("dabr_fonts", "Raleway"), 0, -4)) . "', sans;\n\tfont-size: " . setting_fetch("dabr_font_size", "1") . "em;\n\tbackground:#{$c->body_background};\n\tcolor:#{$c->body_text};\n}\n\nselect,button,input {\n\tfont-size:0.9em;\n}\n\n.embedded-tweet{\n\tborder : 0.1em solid #{$c->menu_background};\n\tmargin-left: 0.5em;\n\t/*\n\twidth: -moz-min-content;\n\twidth: -webkit-min-content;\n\twidth: min-content;\n\t*/\n}\n\nfieldset {\n\tborder-radius:1em;\n\tmax-width:30em;\n}\n\n#twitterbird {\n\tcolor: #00acee;\n}\ntextarea {\n\twidth: 100%;\n\tborder-radius: 0.5em;\n\tmax-width: 39.5em;\n}\n.fileinputs {\n\tfloat: right;\n\tdirection: rtl;\n\tmargin-right: 1em;\n}\n#geo {\n\tfloat:right;\n}\n\n.profile,.bottom {\n\tpadding: 0.5em;\n}\n\n.bottom {\n\ttext-align: center;\n}\n\n.actionicons {\n\tdisplay: block;\n\tmargin: 0.3em;\n\tclear: both;\n}\n.actionicons a{\n\tfont-family:icons,sans-serif;\n\tfont-size: 1.2em;\n\ttext-decoration: none;\n}\n.actionicons .action-text {\n\tfont-size:0.9em;\n}\n\n.icons {\n\tfont-family:icons,sans-serif;\n\tfont-size: 1em;\n}\n\n.button {\n\ttext-decoration: none;\n\tbackground-color: #EEE;\n\tcolor: #333;\n\tpadding: 0.1em 1em;\n\tborder: 0.15em solid black;\n}\n\n.button-div {\n\tmargin-top:0.25em;\n\tmargin-bottom:0.25em;\n}\n\n.action {\n\tfont-family:icons,sans-serif;\n\ttext-decoration: none;\n}\n\nform{margin:.3em;}\n\na{color:#{$c->links}}\n\nsmall,small a{\n\tcolor:#{$c->small}\n}\n.odd{\n\tbackground:#{$c->odd};\n}\n.even{\n\tbackground:#{$c->even};\n}\n.reply{\n\tbackground:#{$c->replyodd};\n}\n.reply.even{\n\tbackground:#{$c->replyeven};\n}\n\n.menu{\n\tcolor:#{$c->menu_text};\n\tbackground:#{$c->menu_background};\n\tpadding: 0.2em;\n\tfont-family:icons,sans-serif;\n\tfont-size: 1.75em;\n\twidth:95%;\n}\n\n.menu-text{\n\tbackground:#{$c->menu_background};\n\tfont-family:sans-serif;\n\twidth:95%;\n}\n\n.menu-float {\n\tposition:fixed;\n\tz-index:1;\n\twidth:100%;\n}\n\n.menu a{\n\tcolor:#{$c->menu_link};\n\ttext-decoration: none;\n}\n\n.menu-text a{\n\tcolor:#{$c->menu_link};\n\ttext-decoration: none;\n}\n\n.tweet{\n\tpadding: 0.5em;\n}\n\n.timeline a img{\n\t/*padding:2px;*/\n}\n\n.avatar{\n\theight: auto;\n\twidth: auto;\n\tfloat: left;\n\tmargin-right: 0.5em;\n}\n\n.shift{\n}\n\n.status {\n\tword-wrap:break-word;\n\tmin-height:50px;\n}\n\n.embed{\n\tleft: 0px;\n\tdisplay: block;\n\toverflow-x: auto;\n\tclear: both;\n\tmax-width: 600px;\n}\n.embedded {\n\t/*max-width:80%;*/\n\tmax-width:100%;\n\theight:auto;\n\tmargin-top: 0.25em;\n}\n.media{\n\tleft: 0px;\n\tdisplay: block;\n\toverflow-x: auto;\n\tclear: both;\n\tmax-width:100%;\n}\n.media img{\n\tmax-width:95%;\n\theight:auto;\n}\n\n.date{\n\tpadding:0.5em;\n\tfont-size:0.8em;\n\tfont-weight:bold;\n\tcolor:#{$c->small}\n}\n\n.about{\n\tcolor:#{$c->small}\n}\n\n.time{\n\tfont-size:1em;\n\tcolor:#{$c->small}\n}\n\n.from{\n\tfont-size:0.75em;\n\tcolor:#{$c->small};\n\tfont-family:serif;\n}\n.from a{\n\tcolor:#{$c->small};\n}\n.table {\n\tdisplay: table;\n\tmax-width:95%;\n}\n.table-row {\n\tdisplay: table-row;\n\ttext-align: right;\n\tword-wrap:break-word;\n}\n.table-cell {\n\tdisplay: table-cell;\n}\n.table-cell-middle,.table-cell-end {\n\tdisplay: table-cell;\n\tpadding-left: 1em;\n\tpadding-right:1em;\n}\n";
    header('Content-Type: text/css; charset=utf-8');
    echo $css;
}
开发者ID:vinazol,项目名称:Dabr,代码行数:8,代码来源:css.php

示例4: bigtouch_theme_avatar

function bigtouch_theme_avatar($url, $name = '', $force_large = false)
{
    if (setting_fetch('avataro', 'yes') !== 'yes') {
        return "<img src='{$url}' alt='{$name}' width='48' height='48' />";
    } else {
        return '';
    }
}
开发者ID:JaHIY,项目名称:Netputweets-Lite,代码行数:8,代码来源:bigtouch.php

示例5: blackberry_theme_avatar

function blackberry_theme_avatar($url, $force_large = false)
{
    if (setting_fetch('avataro', 'yes') !== 'yes') {
        return "<img src='{$url}' width='48' height='48' />";
    } else {
        return '';
    }
}
开发者ID:JaHIY,项目名称:Netputweets-Lite,代码行数:8,代码来源:blackberry.php

示例6: desktop_theme_css

function desktop_theme_css()
{
    $out = theme_css();
    if (setting_fetch('avataro', 'yes') == 'yes') {
        $out .= '<link rel="stylesheet" href="' . BASE_URL . 'browsers/desktop.avatar.css" />';
    }
    $out .= '<style type="text/css">' . setting_fetch('css') . '</style>';
    return $out;
}
开发者ID:xctcc,项目名称:npt,代码行数:9,代码来源:desktop.php

示例7: settings_page

function settings_page($args)
{
    if ($args[1] == 'save') {
        $settings['browser'] = $_POST['browser'];
        $settings['gwt'] = $_POST['gwt'];
        $settings['colours'] = $_POST['colours'];
        $settings['reverse'] = $_POST['reverse'];
        $settings['timestamp'] = $_POST['timestamp'];
        $settings['hide_inline'] = $_POST['hide_inline'];
        $settings['utc_offset'] = (double) $_POST['utc_offset'];
        // Save a user's oauth details to a MySQL table
        if (MYSQL_USERS == 'ON' && ($newpass = $_POST['newpassword'])) {
            user_is_authenticated();
            list($key, $secret) = explode('|', $GLOBALS['user']['password']);
            $sql = sprintf("REPLACE INTO user (username, oauth_key, oauth_secret, password) VALUES ('%s', '%s', '%s', MD5('%s'))", mysql_escape_string(user_current_username()), mysql_escape_string($key), mysql_escape_string($secret), mysql_escape_string($newpass));
            mysql_query($sql);
        }
        setcookie_year('settings', base64_encode(serialize($settings)));
        twitter_refresh('');
    }
    $modes = array('mobile' => 'Normal phone', 'touch' => 'Touch phone', 'desktop' => 'PC/Laptop', 'text' => 'Text only', 'worksafe' => 'Work Safe', 'bigtouch' => 'Big Touch');
    $gwt = array('off' => 'direct', 'on' => 'via GWT');
    $colour_schemes = array();
    foreach ($GLOBALS['colour_schemes'] as $id => $info) {
        list($name, $colours) = explode('|', $info);
        $colour_schemes[$id] = $name;
    }
    $utc_offset = setting_fetch('utc_offset', 0);
    /* returning 401 as it calls http://api.twitter.com/1/users/show.json?screen_name= (no username???)	
    	if (!$utc_offset) {
    		$user = twitter_user_info();
    		$utc_offset = $user->utc_offset;
    	}
    */
    if ($utc_offset > 0) {
        $utc_offset = '+' . $utc_offset;
    }
    $content .= '<form action="settings/save" method="post"><p>Colour scheme:<br /><select name="colours">';
    $content .= theme('options', $colour_schemes, setting_fetch('colours', 1));
    $content .= '</select></p><p>Mode:<br /><select name="browser">';
    $content .= theme('options', $modes, $GLOBALS['current_theme']);
    $content .= '</select></p><p>External links go:<br /><select name="gwt">';
    $content .= theme('options', $gwt, setting_fetch('gwt', $GLOBALS['current_theme'] == 'text' ? 'on' : 'off'));
    $content .= '</select><small><br />Google Web Transcoder (GWT) converts third-party sites into small, speedy pages suitable for older phones and people with less bandwidth.</small></p>';
    $content .= '<p><label><input type="checkbox" name="reverse" value="yes" ' . (setting_fetch('reverse') == 'yes' ? ' checked="checked" ' : '') . ' /> Attempt to reverse the conversation thread view.</label></p>';
    $content .= '<p><label><input type="checkbox" name="timestamp" value="yes" ' . (setting_fetch('timestamp') == 'yes' ? ' checked="checked" ' : '') . ' /> Show the timestamp ' . twitter_date('H:i') . ' instead of 25 sec ago</label></p>';
    $content .= '<p><label><input type="checkbox" name="hide_inline" value="yes" ' . (setting_fetch('hide_inline') == 'yes' ? ' checked="checked" ' : '') . ' /> Hide inline media (eg TwitPic thumbnails)</label></p>';
    $content .= '<p><label>The time in UTC is currently ' . gmdate('H:i') . ', by using an offset of <input type="text" name="utc_offset" value="' . $utc_offset . '" size="3" /> we display the time as ' . twitter_date('H:i') . '.<br />It is worth adjusting this value if the time appears to be wrong.</label></p>';
    // Allow users to choose a Dabr password if accounts are enabled
    if (MYSQL_USERS == 'ON' && user_is_authenticated()) {
        $content .= '<fieldset><legend>Dabr account</legend><small>If you want to sign in to Dabr without going via Twitter.com in the future, create a password and we\'ll remember you.</small></p><p>Change Dabr password<br /><input type="password" name="newpassword" /><br /><small>Leave blank if you don\'t want to change it</small></fieldset>';
    }
    $content .= '<p><input type="submit" value="Save" /></p></form>';
    $content .= '<hr /><p>Visit <a href="reset">Reset</a> if things go horribly wrong - it will log you out and clear all settings.</p>';
    return theme('page', 'Settings', $content);
}
开发者ID:hnprashanth,项目名称:dabr-installer,代码行数:56,代码来源:settings.php

示例8: desktop_theme_status_form

function desktop_theme_status_form($text = '', $in_reply_to_id = NULL, $is_desktop = true)
{
    if (user_is_authenticated()) {
        $fixedtags = setting_fetch('fixedtago', 'no') == "yes" && $text == '' ? " #" . setting_fetch('fixedtagc') : null;
        $output = '<form method="post" action="' . BASE_URL . 'update"><textarea id="status" name="status" rows="3" style="width:100%; max-width: 400px;">' . $text . $fixedtags . '</textarea><div><input name="in_reply_to_id" value="' . $in_reply_to_id . '" type="hidden" /><input type="submit" value="' . __('Update') . '" /> <span id="remaining">140</span> ';
        if (substr($_GET["q"], 0, 4) !== "user") {
            $output .= ' <a href="' . BASE_URL . 'upload">' . __('Upload Picture') . '</a>';
        }
        $output .= '</div></form>';
        return $output;
    }
}
开发者ID:noviachen,项目名称:netputweets,代码行数:12,代码来源:desktop.php

示例9: twitter_lists_tweets

function twitter_lists_tweets($user, $list)
{
    // Tweets belonging to a list
    $count = setting_fetch('tpp', 20);
    $url = API_ROOT . "lists/statuses.json?slug={$list}&owner_screen_name={$user}&include_entities=true&include_rts=true&count={$count}";
    if ($_GET['max_id']) {
        $url .= "&max_id=" . $_GET['max_id'];
    }
    if ($_GET['since_id']) {
        $url .= "&since_id=" . $_GET['since_id'];
    }
    return twitter_process($url);
}
开发者ID:xctcc,项目名称:npt,代码行数:13,代码来源:lists.php

示例10: blackberry_theme_menu_bottom

function blackberry_theme_menu_bottom()
{
    $links = array();
    $links[] = "<a href='" . BASE_URL . "'>" . __("Home") . "</a>";
    if (user_is_authenticated()) {
        if (setting_fetch('replies') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "replies'>" . __("Replies") . "</a>";
        }
        if (setting_fetch('retweets') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "retweets'>" . __("Retweets") . "</a>";
        }
        if (setting_fetch('directs') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "directs'>" . __("Directs") . "</a>";
        }
        if (setting_fetch('search') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "search'>" . __("Search") . "</a>";
        }
        if (setting_fetch('favourites') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "favourites'>" . __("Favourites") . "</a>";
        }
        if (setting_fetch('lists') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "lists'>" . __("Lists") . "</a>";
        }
        if (setting_fetch('followers') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "followers'>" . __("Followers") . "</a>";
        }
        if (setting_fetch('friends') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "friends'>" . __("Friends") . "</a>";
        }
        if (setting_fetch('blockings') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "blockings'>" . __("Blockings") . "</a>";
        }
    }
    if (user_is_authenticated()) {
        $user = user_current_username();
        array_unshift($links, "<b><a href='" . BASE_URL . "user/{$user}'>{$user}</a></b>");
        if (setting_fetch('about') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "about'>" . __("About") . "</a>";
        }
        if (setting_fetch('ssettings', 'yes') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "settings'>" . __("Settings") . "</a>";
        }
        if (setting_fetch('slogout') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "logout'>" . __("Logout") . "</a>";
        }
    }
    if (setting_fetch('srefresh', 'yes') == 'yes') {
        $links[] = "<a href='" . BASE_URL . "{$_GET['q']}' accesskey='5'>" . __("Refresh") . "</a> 5";
    }
    return "<div class='menu menu-{$menu}'>" . implode(' | ', $links) . "</div>" . theme('pagination');
}
开发者ID:noviachen,项目名称:netputweets,代码行数:51,代码来源:blackberry.php

示例11: twitter_lists_tweets

function twitter_lists_tweets($user, $list)
{
    // Tweets belonging to a list
    $count = setting_fetch('ltpp', 20);
    // https://dev.twitter.com/docs/api/1/get/lists/statuses
    // How many tweets to show
    $perPage = setting_fetch('perPage', 20);
    $url = API_URL . "lists/statuses.json?slug={$list}&owner_screen_name={$user}&per_page={$perPage}&include_entities=true&include_rts=true";
    $page = intval($_GET['page']);
    if ($page > 0) {
        $url .= '&page=' . $page;
    }
    $url .= '&per_page=' . $count;
    return twitter_process($url);
}
开发者ID:JaHIY,项目名称:Netputweets-Lite,代码行数:15,代码来源:lists.php

示例12: twitter_lists_list_subscribers

function twitter_lists_list_subscribers($user, $list)
{
    // Subscribers of a list
    $api_options = array("owner_screen_name" => $user, "slug" => $list);
    $api_options["count"] = setting_fetch('dabr_perPage', 20);
    $cursor = $_GET['cursor'];
    if (!is_numeric($cursor)) {
        $cursor = -1;
    }
    if ($cursor > 0) {
        $api_options["cursor"] = $cursor;
    }
    $list = execute_codebird("lists_subscribers", $api_options);
    return $list;
}
开发者ID:vinazol,项目名称:Dabr,代码行数:15,代码来源:lists.php

示例13: browser_detect

function browser_detect()
{
    if ($browser = setting_fetch('browser')) {
        return browser_load($browser);
    }
    if ($_SERVER['HTTP_X_NOKIA_BEARER'] == 'GPRS') {
        return browser_load('text');
    }
    if (array_key_exists('HTTP_X_DEVICE_USER_AGENT', $_SERVER)) {
        $user_agent = $_SERVER['HTTP_X_DEVICE_USER_AGENT'];
    } else {
        $user_agent = $_SERVER['HTTP_USER_AGENT'];
    }
    $handle = fopen('browsers/list.csv', 'r');
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
        if (preg_match("#{$data[0]}#", $user_agent, $matches)) {
            browser_load($data[1]);
            break;
        }
    }
    fclose($handle);
}
开发者ID:novasarii,项目名称:dabr,代码行数:22,代码来源:browser.php

示例14: theme_menu_bottom

function theme_menu_bottom()
{
    $links = array();
    $links[] = "<a href='" . BASE_URL . "'>" . __("Home") . "</a>";
    if (user_is_authenticated()) {
        if (setting_fetch('replies') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "replies'>" . __("Replies") . "</a>";
        }
        if (setting_fetch('retweets') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "retweets'>" . __("Retweets") . "</a>";
        }
        if (setting_fetch('directs') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "directs'>" . __("Directs") . "</a>";
        }
        if (setting_fetch('search') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "search'>" . __("Search") . "</a>";
        }
        if (setting_fetch('favourites') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "favourites'>" . __("Favourites") . "</a>";
        }
        if (setting_fetch('lists') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "lists'>" . __("Lists") . "</a>";
        }
        if (setting_fetch('followers') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "followers'>" . __("Followers") . "</a>";
        }
        if (setting_fetch('friends') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "friends'>" . __("Friends") . "</a>";
        }
        if (setting_fetch('blockings') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "blockings'>" . __("Blockings") . "</a>";
        }
    }
    if (user_is_authenticated()) {
        $user = user_current_username();
        array_unshift($links, "<b><a href='" . BASE_URL . "user/{$user}'>{$user}</a></b>");
        if (setting_fetch('about') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "about'>" . __("About") . "</a>";
        }
        if (setting_fetch('ssettings', 'yes') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "settings'>" . __("Settings") . "</a>";
        }
        if (setting_fetch('slogout', 'yes') == 'yes') {
            $links[] = "<a href='" . BASE_URL . "logout'>" . __("Logout") . "</a>";
        }
    }
    return '<div class="menu menu-$menu">' . implode(' | ', $links) . '</div>';
}
开发者ID:noviachen,项目名称:netputweets,代码行数:48,代码来源:menu.php

示例15: replacementURLs

 function replacementURLs($matches)
 {
     $replacement = $matches[2];
     $url = $matches[3];
     if (!preg_match("#^https{0,1}://#i", $url)) {
         $url = "http://{$url}";
     }
     if (setting_fetch('gwt') == 'on') {
         $encoded = urlencode($url);
         $replacement .= "<a href='http://google.com/gwt/n?u={$encoded}' target='_blank'>{$url}</a>";
     } else {
         $replacement .= theme('external_link', $url);
     }
     return $replacement;
 }
开发者ID:hnprashanth,项目名称:dabr-installer,代码行数:15,代码来源:twitter.php


注:本文中的setting_fetch函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。