$template->assign_vars(array('S_ACTION' => 'view', 'CMNT_POSTER_ID' => $user->data['user_id'])); $template->assign_block_vars('navlinks', array('FORUM_NAME' => $blog_data['cat_title'], 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}blog.{$phpEx}", array($act_name => 'cat', 'cid' => $blog_data['cat_id'])))); $template->set_filenames(array('body' => 'blog_index_body.html')); page_footer(); break; case 'apprvcmnt': if (!$auth->acl_get('a_blog_manage')) { trigger_error('NO_PERMISSION_APPROVE'); } $comment_id = request_var('cmntid', 0); //This is used to approve comments that are not yet approved. if (!$comment_id) { meta_refresh('3', append_sid($phpbb_root_path . 'blog.' . $phpEx)); trigger_error($user->lang['INVALID_CMNT_ID'] . '<BR /><BR /><a href="' . append_sid($phpbb_root_path . 'blog.' . $phpEx) . '">' . $user->lang['RETURN'] . '</a>'); } blog::toggle_comment_approval($comment_id); break; case 'post_blog': $user->add_lang('posting'); $template->assign_block_vars('navlinks', array('FORUM_NAME' => $user->lang['NEW_POST'], 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}blog.{$phpEx}", array($act_name => 'post_blog')))); if (!$auth->acl_get('u_blog_post') && !$auth->acl_get('a_blog_manage')) { trigger_error($user->lang['UNAUTHED']); } if (isset($_POST['submit'])) { $tag = request_var('tags', '', true); $tag = $tag && substr($tag, -1) != ',' ? $tag . ',' : $tag; $tag = utf8_normalize_nfc($tag); $poll = $uid = $bitfield = $options = ''; $allow_bbcode = $config['blog_bbcode_on'] == 1 ? true : false; $allow_smilies = $config['blog_emote_on'] == 1 ? true : false; $message = request_var('message', '', true);