本文整理汇总了PHP中generate_forum_rules函数的典型用法代码示例。如果您正苦于以下问题:PHP generate_forum_rules函数的具体用法?PHP generate_forum_rules怎么用?PHP generate_forum_rules使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了generate_forum_rules函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: generate_forum_nav
case 'post':
$page_title = $user->lang['POST_TOPIC'];
break;
case 'quote':
case 'reply':
$page_title = $user->lang['POST_REPLY'];
break;
case 'delete':
case 'edit':
$page_title = $user->lang['EDIT_POST'];
break;
}
// Build Navigation Links
generate_forum_nav($post_data);
// Build Forum Rules
generate_forum_rules($post_data);
// Posting uses is_solved for legacy reasons. Plugins have to use is_solved to force themselves to be displayed.
if ($config['enable_post_confirm'] && !$user->data['is_registered'] && (isset($captcha) && $captcha->is_solved() === false) && ($mode == 'post' || $mode == 'reply' || $mode == 'quote')) {
$template->assign_vars(array('S_CONFIRM_CODE' => true, 'CAPTCHA_TEMPLATE' => $captcha->get_template()));
}
$s_hidden_fields = $mode == 'reply' || $mode == 'quote' ? '<input type="hidden" name="topic_cur_post_id" value="' . $post_data['topic_last_post_id'] . '" />' : '';
$s_hidden_fields .= '<input type="hidden" name="lastclick" value="' . $current_time . '" />';
$s_hidden_fields .= $draft_id || isset($_REQUEST['draft_loaded']) ? '<input type="hidden" name="draft_loaded" value="' . request_var('draft_loaded', $draft_id) . '" />' : '';
if ($mode == 'edit') {
$s_hidden_fields .= build_hidden_fields(array('edit_post_message_checksum' => $post_data['post_checksum'], 'edit_post_subject_checksum' => $post_data['post_subject_md5']));
}
// Add the confirm id/code pair to the hidden fields, else an error is displayed on next submit/preview
if (isset($captcha) && $captcha->is_solved() !== false) {
$s_hidden_fields .= build_hidden_fields($captcha->get_hidden_fields());
}
$form_enctype = @ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !$config['allow_attachments'] || !$auth->acl_get('u_attach') || !$auth->acl_get('f_attach', $forum_id) ? '' : ' enctype="multipart/form-data"';
开发者ID:PetsFundation,项目名称:Pets,代码行数:31,代码来源:posting.php
示例2: redirect
// Does it have click tracking enabled?
if ($forum_data['forum_flags'] & FORUM_FLAG_LINK_TRACK) {
$sql = 'UPDATE ' . FORUMS_TABLE . '
SET forum_posts_approved = forum_posts_approved + 1
WHERE forum_id = ' . $forum_id;
$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);
开发者ID:ZerGabriel,项目名称:phpbb,代码行数:31,代码来源:viewforum.php
示例3: gen_forum_auth_level
// Forum rules listing
$s_forum_rules = '';
gen_forum_auth_level('topic', $forum_id, $topic_data['forum_status']);
// Quick mod tools
$allow_change_type = $auth->acl_get('m_', $forum_id) || $user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'] ? true : false;
$s_quickmod_action = append_sid("{$phpbb_root_path}mcp.{$phpEx}", array('f' => $forum_id, 't' => $topic_id, 'start' => $start, 'quickmod' => 1, 'redirect' => urlencode(str_replace('&', '&', $viewtopic_url))), true, $user->session_id);
$quickmod_array = array('lock' => array('LOCK_TOPIC', $topic_data['topic_status'] == ITEM_UNLOCKED && ($auth->acl_get('m_lock', $forum_id) || $auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'])), 'unlock' => array('UNLOCK_TOPIC', $topic_data['topic_status'] != ITEM_UNLOCKED && $auth->acl_get('m_lock', $forum_id)), 'delete_topic' => array('DELETE_TOPIC', $auth->acl_get('m_delete', $forum_id) || $topic_data['topic_visibility'] != ITEM_DELETED && $auth->acl_get('m_softdelete', $forum_id)), 'restore_topic' => array('RESTORE_TOPIC', $topic_data['topic_visibility'] == ITEM_DELETED && $auth->acl_get('m_approve', $forum_id)), 'move' => array('MOVE_TOPIC', $auth->acl_get('m_move', $forum_id) && $topic_data['topic_status'] != ITEM_MOVED), 'split' => array('SPLIT_TOPIC', $auth->acl_get('m_split', $forum_id)), 'merge' => array('MERGE_POSTS', $auth->acl_get('m_merge', $forum_id)), 'merge_topic' => array('MERGE_TOPIC', $auth->acl_get('m_merge', $forum_id)), 'fork' => array('FORK_TOPIC', $auth->acl_get('m_move', $forum_id)), 'make_normal' => array('MAKE_NORMAL', $allow_change_type && $auth->acl_gets('f_sticky', 'f_announce', 'f_announce_global', $forum_id) && $topic_data['topic_type'] != POST_NORMAL), 'make_sticky' => array('MAKE_STICKY', $allow_change_type && $auth->acl_get('f_sticky', $forum_id) && $topic_data['topic_type'] != POST_STICKY), 'make_announce' => array('MAKE_ANNOUNCE', $allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_ANNOUNCE), 'make_global' => array('MAKE_GLOBAL', $allow_change_type && $auth->acl_get('f_announce_global', $forum_id) && $topic_data['topic_type'] != POST_GLOBAL), 'topic_logs' => array('VIEW_TOPIC_LOGS', $auth->acl_get('m_', $forum_id)));
foreach ($quickmod_array as $option => $qm_ary) {
if (!empty($qm_ary[1])) {
phpbb_add_quickmod_option($s_quickmod_action, $option, $qm_ary[0]);
}
}
// Navigation links
generate_forum_nav($topic_data);
// Forum Rules
generate_forum_rules($topic_data);
// Moderators
$forum_moderators = array();
if ($config['load_moderators']) {
get_moderators($forum_moderators, $forum_id);
}
// This is only used for print view so ...
$server_path = !$view ? $phpbb_root_path : generate_board_url() . '/';
// Replace naughty words in title
$topic_data['topic_title'] = censor_text($topic_data['topic_title']);
$s_search_hidden_fields = array('t' => $topic_id, 'sf' => 'msgonly');
if ($_SID) {
$s_search_hidden_fields['sid'] = $_SID;
}
if (!empty($_EXTRA_URL)) {
foreach ($_EXTRA_URL as $url_param) {
开发者ID:ramukumar555,项目名称:phpbb,代码行数:31,代码来源:viewtopic.php
注:本文中的generate_forum_rules函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论