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


PHP display_forums函数代码示例

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


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

示例1: handle

 public function handle()
 {
     if (!function_exists('display_forums')) {
         include $this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext;
     }
     display_forums('', $this->config['load_moderators']);
     $this->template->assign_block_vars('navlinks', array('FORUM_NAME' => $this->user->lang('FORUM'), 'U_VIEW_FORUM' => $this->helper->route('blitze_sitemaker_forum')));
     return $this->helper->render('index_body.html', $this->user->lang('FORUM_INDEX'));
 }
开发者ID:BogusCurry,项目名称:phpBB-ext-sitemaker,代码行数:9,代码来源:forum.php

示例2: get_template_center

 /**
  * {@inheritdoc}
  */
 public function get_template_center($module_id)
 {
     if (!function_exists('display_forums')) {
         include $this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext;
     }
     \display_forums('', $this->config['load_moderators'], false);
     $this->template->assign_vars(array('FORUM_IMG' => $this->user->img('forum_read', 'NO_NEW_POSTS'), 'FORUM_NEW_IMG' => $this->user->img('forum_unread', 'NEW_POSTS'), 'FORUM_LOCKED_IMG' => $this->user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'), 'FORUM_NEW_LOCKED_IMG' => $this->user->img('forum_unread_locked', 'NO_NEW_POSTS_LOCKED'), 'U_MARK_FORUMS' => $this->user->data['is_registered'] || $this->config['load_anon_lastread'] ? append_sid("{$this->phpbb_root_path}index.{$this->php_ext}", 'hash=' . generate_link_hash('global') . '&mark=forums') : '', 'U_MCP' => $this->auth->acl_get('m_') || $this->auth->acl_getf_global('m_') ? append_sid("{$this->phpbb_root_path}mcp.{$this->php_ext}", 'i=main&mode=front', true, $this->user->session_id) : ''));
     return 'forumlist.html';
 }
开发者ID:alhitary,项目名称:Board3-Portal,代码行数:12,代码来源:forumlist.php

示例3: get_template_center

	public function get_template_center($module_id)
	{
		global $config, $template, $user, $auth, $phpbb_root_path, $phpEx;

		display_forums('', $config['load_moderators'], false);

		$template->assign_vars(array(
			'FORUM_IMG'			=> $user->img('forum_read', 'NO_NEW_POSTS'),
			'FORUM_NEW_IMG'			=> $user->img('forum_unread', 'NEW_POSTS'),
			'FORUM_LOCKED_IMG'		=> $user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'),
			'FORUM_NEW_LOCKED_IMG'		=> $user->img('forum_unread_locked', 'NO_NEW_POSTS_LOCKED'),
			'U_MARK_FORUMS'			=> ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums') : '',
			'U_MCP'				=> ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : '',
		));

		return 'forumlist.html';
	}
开发者ID:gonzo1247,项目名称:hitman_roa,代码行数:17,代码来源:portal_forumlist.php

示例4: redirect

        $db->sql_query($sql);
    }
    // We redirect to the url. The third parameter indicates that external redirects are allowed.
    redirect($forum_data['forum_link'], false, true);
    return;
}
// Build navigation links
generate_forum_nav($forum_data);
// Forum Rules
if ($auth->acl_get('f_read', $forum_id)) {
    generate_forum_rules($forum_data);
}
// Do we have subforums?
$active_forum_ary = $moderators = array();
if ($forum_data['left_id'] != $forum_data['right_id'] - 1) {
    list($active_forum_ary, $moderators) = display_forums($forum_data, $config['load_moderators'], $config['load_moderators']);
} else {
    $template->assign_var('S_HAS_SUBFORUM', false);
    if ($config['load_moderators']) {
        get_moderators($moderators, $forum_id);
    }
}
/* @var $phpbb_content_visibility \phpbb\content_visibility */
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
// Dump out the page header and load viewforum template
$topics_count = $phpbb_content_visibility->get_count('forum_topics', $forum_data, $forum_id);
$start = $pagination->validate_start($start, $config['topics_per_page'], $topics_count);
page_header($forum_data['forum_name'] . ($start ? ' - ' . $user->lang('PAGE_TITLE_NUMBER', $pagination->get_on_page($config['topics_per_page'], $start)) : ''), true, $forum_id);
$template->set_filenames(array('body' => 'viewforum_body.html'));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.{$phpEx}"), $forum_id);
$template->assign_vars(array('U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.{$phpEx}", "f={$forum_id}" . ($start == 0 ? '' : "&start={$start}"))));
开发者ID:ZerGabriel,项目名称:phpbb,代码行数:31,代码来源:viewforum.php

示例5: redirect

        $notification = $phpbb_notifications->load_notifications(array('notification_id' => $mark_notification));
        if (isset($notification['notifications'][$mark_notification])) {
            $notification = $notification['notifications'][$mark_notification];
            $notification->mark_read();
            if ($request->is_ajax()) {
                $json_response = new \phpbb\json_response();
                $json_response->send(array('success' => true));
            }
            if ($redirect = $request->variable('redirect', '')) {
                redirect(append_sid($phpbb_root_path . $redirect));
            }
            redirect($notification->get_redirect_url());
        }
    }
}
display_forums('', $config['load_moderators']);
$order_legend = $config['legend_sort_groupname'] ? 'group_name' : 'group_legend';
// Grab group details for legend display
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) {
    $sql = 'SELECT group_id, group_name, group_colour, group_type, group_legend
		FROM ' . GROUPS_TABLE . '
		WHERE group_legend > 0
		ORDER BY ' . $order_legend . ' ASC';
} else {
    $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type, g.group_legend
		FROM ' . GROUPS_TABLE . ' g
		LEFT JOIN ' . USER_GROUP_TABLE . ' ug
			ON (
				g.group_id = ug.group_id
				AND ug.user_id = ' . $user->data['user_id'] . '
				AND ug.user_pending = 0
开发者ID:Alexey3112,项目名称:phpbb,代码行数:31,代码来源:index.php

示例6: login_forum_box

}
// Add Images
$_CLASS['core_user']->add_img();
// Forum is passworded ... check whether access has been granted to this
// user this session, if not show login box
if ($forum_data['forum_password']) {
    login_forum_box($forum_data);
}
// Build navigation links
generate_forum_nav($forum_data);
// Forum Rules
generate_forum_rules($forum_data);
// Do we have subforums?
$active_forum_ary = array();
if ($forum_data['left_id'] != $forum_data['right_id'] - 1) {
    $active_forum_ary = display_forums($forum_data);
} else {
    $_CLASS['core_template']->assign('S_HAS_SUBFORUM', false);
}
if ($forum_data['forum_type'] != FORUM_POST && !($forum_data['forum_flags'] & 16)) {
    $_CLASS['core_template']->assign_array(array('S_IS_POSTABLE' => false, 'S_DISPLAY_ACTIVE' => false, 'S_DISPLAY_SEARCHBOX' => false, 'TOTAL_TOPICS' => false));
    page_header();
    make_jumpbox(generate_link('Forums&file=viewforum'), $forum_id);
    $_CLASS['core_template']->display('modules/Forums/viewforum_body.html');
}
$moderators = get_moderators($forum_id);
// Handle marking posts
if ($mark_read == 'topics') {
    markread('forum', $forum_id);
    $_CLASS['core_display']->meta_refresh(3, generate_link('Forums&file=viewforum&f=' . $forum_id));
    $message = $_CLASS['core_user']->lang['TOPICS_MARKED'] . '<br /><br />' . sprintf($_CLASS['core_user']->lang['RETURN_FORUM'], '<a href="' . generate_link('Forums&amp;file=viewforum&amp;f=' . $forum_id) . '">', '</a> ');
开发者ID:BackupTheBerlios,项目名称:viperals-svn,代码行数:31,代码来源:viewforum.php

示例7: message_die

//
// End handle marking posts
//
//
// If you don't use these stats on your index you may want to consider removing them
//
$l_total_post_s = $total_posts = 0;
//
// Start page proper
//
$category_rows = BoardCache::categories();
if (!($total_categories = count($category_rows))) {
    message_die(GENERAL_MESSAGE, $lang['No_forums']);
}
require_once 'includes/phpBB/functions_display.php';
$forum_data = display_forums();
if (!($total_forums = count($forum_data))) {
    message_die(GENERAL_MESSAGE, $lang['No_forums']);
}
# Start output of page
$page_title = _HOME;
//$lang['Index'];
require_once 'includes/phpBB/page_header.php';
$template->assign_vars(array('FORUM_IMG' => $images['forum'], 'FORUM_NEW_IMG' => $images['forum_new'], 'FORUM_LOCKED_IMG' => $images['forum_locked'], 'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts), 'FORUM_SUB_IMG' => $images['forum_sub'], 'FORUM_NEW_SUB_IMG' => $images['forum_new_sub'], 'FORUM_LOCKED_SUB_IMG' => $images['forum_locked_sub'], 'U_INDEX' => URL::index(), 'L_INDEX' => _ForumsLANG, 'L_FORUM' => $lang['Forum'], 'L_TOPICS' => $lang['Topics'], 'L_REPLIES' => $lang['Replies'], 'L_VIEWS' => $lang['Views'], 'L_POSTS' => $lang['Posts'], 'L_LAST_POST' => $lang['Last_Post'], 'L_NO_POSTS' => $lang['No_Posts'], 'L_NO_NEW_POSTS' => $lang['No_new_posts'], 'L_NO_NEW_SUB_POSTS' => $lang['No_new_sub_posts'], 'L_NEW_POSTS' => $lang['New_posts'], 'L_NEW_SUB_POSTS' => $lang['New_sub_posts'], 'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'], 'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'], 'L_MODERATOR' => $lang['Moderators'], 'L_ADMINISTRATOR' => $lang['Auth_Admin'], 'L_FORUM_LOCKED' => $lang['Forum_is_locked'], 'L_SUBFORUM_LOCKED' => $lang['Subforum_is_locked'], 'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'], 'U_MARK_READ' => URL::index('&amp;mark=forums')));
# Okay, let's build the index
for ($i = 0; $i < $total_categories; ++$i) {
    $cat_id = $category_rows[$i]['cat_id'];
    # Should we display this category/forum set?
    $display_forums = false;
    for ($j = 0; $j < $total_forums; ++$j) {
        if ($forum_data[$j]['cat_id'] == $cat_id) {
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:index.php

示例8: get_db_stat

$total_users = get_db_stat('usercount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];
if ($total_posts == 0) {
    $l_total_post_s = $lang['Posted_articles_zero_total'];
} else {
    if ($total_posts == 1) {
        $l_total_post_s = $lang['Posted_article_total'];
    } else {
        $l_total_post_s = $lang['Posted_articles_total'];
    }
}
if ($total_users == 0) {
    $l_total_user_s = $lang['Registered_users_zero_total'];
} else {
    if ($total_users == 1) {
        $l_total_user_s = $lang['Registered_user_total'];
    } else {
        $l_total_user_s = $lang['Registered_users_total'];
    }
}
include $phpbb_root_path . 'includes/page_header.' . $phpEx;
include $phpbb_root_path . 'includes/functions_subforums.' . $phpEx;
$template->set_filenames(array('body' => 'index_body.tpl'));
display_forums();
//
// Generate the page
//
$template->pparse('body');
include $phpbb_root_path . 'includes/page_tail.' . $phpEx;
开发者ID:BackupTheBerlios,项目名称:phpbbsfp,代码行数:31,代码来源:index.php

示例9: sprintf

if ($is_auth['auth_mod']) {
    $s_auth_can .= sprintf($lang['Rules_moderate'], '<a href="' . URL::index("&amp;file=modcp&amp;" . POST_FORUM_URL . "={$forum_id}") . '">', '</a>');
}
//
// Mozilla navigation bar
//
$nav_links['up'] = array('url' => URL::index(), 'title' => sprintf($lang['Forum_Index'], $board_config['sitename']));
//
// Dump out the page header and load viewforum template
//
$page_title = !empty($forum_row['cat_title']) ? $forum_row['cat_title'] : '';
$page_title .= !empty($forum_row['forum_name']) ? ' ' . _BC_DELIM . ' ' . $forum_row['forum_name'] : '';
require_once 'includes/phpBB/page_header.php';
if ($forum_row['forum_type'] == 1) {
    require_once 'includes/phpBB/functions_display.php';
    $forum_data = display_forums($forum_id);
    $template->assign_vars(array('BC_DELIM' => _BC_DELIM, 'L_FORUM' => $lang['Forum'], 'L_TOPICS' => $lang['Topics'], 'L_POSTS' => $lang['Posts'], 'L_LAST_POST' => $lang['Last_Post'], 'U_MARK_READ' => URL::index("&amp;mark=forums")));
    for ($j = 0; $j < count($forum_data); $j++) {
        $sub_forum_id = $forum_data[$j]['forum_id'];
        if ($forum_data[$j]['forum_type'] == 2) {
            $forumlink = URL::index($forum_data[$j]['forum_link']);
        } else {
            if ($forum_data[$j]['forum_type'] == 3) {
                $forumlink = $forum_data[$j]['forum_link'];
            } else {
                $forumlink = URL::index("&amp;file=viewforum&amp;" . POST_FORUM_URL . "={$sub_forum_id}");
            }
        }
        $template->assign_block_vars('forumrow', array('S_IS_CAT' => false, 'S_IS_LINK' => $forum_data[$j]['forum_type'] >= 2, 'LAST_POST_IMG' => $images['icon_latest_reply'], 'FORUM_ID' => $sub_forum_id, 'FORUM_FOLDER_IMG' => $forum_data[$j]['folder_image'], 'FORUM_NAME' => $forum_data[$j]['forum_name'], 'FORUM_DESC' => $forum_data[$j]['forum_desc'], 'POSTS' => $forum_data[$j]['forum_posts'], 'TOPICS' => $forum_data[$j]['forum_topics'], 'LAST_POST_TIME' => $forum_data[$j]['forum_last_post_id'] ? create_date($board_config['default_dateformat'], $forum_data[$j]['post_time']) : '', 'LAST_POSTER' => $forum_data[$j]['username'] ? $forum_data[$j]['username'] : $lang['Guest'], 'MODERATORS' => $forum_data[$j]['moderator_list'], 'SUB_FORUMS' => $forum_data[$j]['forum_type'] == 1, 'SUBFORUMS' => $forum_data[$j]['subforums_list'], 'L_SUBFORUM_STR' => $forum_data[$j]['subforums_lang'], 'L_MODERATOR_STR' => $forum_data[$j]['l_moderators'], 'L_FORUM_FOLDER_ALT' => $forum_data[$j]['folder_alt'], 'BC_DELIM' => _BC_DELIM, 'U_LAST_POSTER' => $forum_data[$j]['user_id'] > ANONYMOUS ? URL::index("Your_Account&amp;profile=" . $forum_data[$j]['user_id']) : '', 'U_LAST_POST' => $forum_data[$j]['forum_last_post_id'] ? URL::index("&amp;file=viewtopic&amp;" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] : '', 'U_VIEWFORUM' => $forumlink));
    }
}
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:viewforum.php


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