function CUSTOM_refresh($url)
{
    global $LANG05, $CUSTOM_MOBILE_CONF;
    if (CUSTOM_MOBILE_is_cellular()) {
        // ページ内リンクを探す
        $pos = strpos($url, '#');
        if ($pos === false) {
            //CUSTOM_MOBILE_debug("not matched: " . $url);
            $link = "";
        } else {
            //CUSTOM_MOBILE_debug("matched: " . $url);
            $link = substr($url, $pos);
            $url = substr($url, 0, $pos);
        }
        if ($CUSTOM_MOBILE_CONF['refresh_use_location']) {
            $sepa = '?';
            if (strpos($url, '?') > 0) {
                // 2009-02-19 Kunitsuji update
                $sepa = '&';
                //$sepa = '&';
            }
            $url = str_replace('&', '&', $url);
            $location_url = 'Location: ' . $url . $sepa . SID . $link;
            header($location_url);
            exit;
        } else {
            $msg = mb_convert_encoding($LANG05['5'], 'sjis-win', mb_detect_encoding($LANG05['5'], "UTF-8,EUC-JP,JIS,sjis-win"));
            $sepa = '?';
            if (strpos($url, '?') > 0) {
                $sepa = '&';
            }
            $location_url = $url . $sepa . SID . $link;
            return "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"" . "\"http://www.w3.org/TR/html4/loose.dtd\">\n" . "<html><head><title>{$msg}</title></head>" . "<body><a href=\"{$location_url}\">{$msg}</a></body></html>\n";
        }
    } else {
        return "<html><head><meta http-equiv=\"refresh\" content=\"0; URL={$url}\"></head></html>\n";
    }
}
示例#2
0
文件: config.php 项目: ivywe/forum
// How many lines to show on one page in the search results
$CONF_FORUM['show_newposts_perpage'] = 20;
// How many users to show on one page in the memberlist results
$CONF_FORUM['show_members_perpage'] = 20;
// Show the members list page to anonymous users
$CONF_FORUM['show_memberslist_anonymous'] = false;
// View Anonymous Posts - registed users can set this false
$CONF_FORUM['show_anonymous_posts'] = 1;
// Only send Notification once - even if more posts are created since your last visit
$CONF_FORUM['notify_once'] = 1;
// When this value is true, set the sort order of the topic view list in ASC.
$CONF_FORUM['sort_order_asc'] = true;
// Mapping of Group Names to badges that can optionally be displayed in Forum Post under user avatar
// Place images in the directory /forum/forum/image_set/badges
// Note Root needs a unique mapping since if you are in the Root group, then you are in all groups
// $CONF_FORUM['grouptags'] and $CONF_FORUM['groupnames'] needs to have the same element ids
$CONF_FORUM['grouptags'] = array('Root' => 'siteadmin_badge.png', 'Logged-in Users' => 'forum_user.png', 'Group A' => 'badge1.png', 'Group B' => 'badge2.png');
$CONF_FORUM['groupnames'] = array('Root' => 'Site Admin', 'Logged-in Users' => 'Forum User', 'Group A' => 'Group A', 'Group B' => 'Group B');
// Should glMenu be used for this menublock
$CONF_FORUM['use_glmenu'] = false;
// When the user agent is mobile, overwrite setting specially.
// This setting is only valid Geeklog Japanese edition.
if (function_exists('CUSTOM_MOBILE_is_cellular') && CUSTOM_MOBILE_is_cellular()) {
    $CONF_FORUM['sort_order_asc'] = false;
    $CONF_FORUM['show_topics_perpage'] = 5;
    $CONF_FORUM['show_posts_perpage'] = 5;
    $CONF_FORUM['centerblock_numposts'] = 5;
    $CONF_FORUM['show_searches_perpage'] = 5;
    $CONF_FORUM['show_messages_perpage'] = 5;
    $CONF_FORUM['sideblock_numposts'] = 5;
}