$_COOKIE['piv_name'] = $reg_user['name']; $_COOKIE['piv_url'] = $reg_user['url']; } } if (count($_COOKIE) > 0) { $cookie = @fill_comment_form($_COOKIE['piv_name'], $_COOKIE['piv_email'], $_COOKIE['piv_url'], $_COOKIE['piv_rememberinfo'], $_COOKIE['piv_comment']); $cookie = i18n_str_to_utf8($cookie); $output = str_replace("</body>", $cookie . "</body>", $output); } add_hook("display_entry", "post"); execute_hook("display_entry", "post", $db->entry, $output, $dummy_variable); echo $output; } else { if (isset($Pivot_Vars['f_title'])) { // This shows the entry in preview mode. define('PREVIEW', TRUE); $db = new db(); $entry = get_entry_from_post(); $entry['status'] = 'publish'; $entry = $db->set_entry($entry); execute_hook("display_entry", "pre"); $output = parse_entry($entry['code'], ""); add_hook("display_entry", "post"); execute_hook("display_entry", "post", $output); echo $output; } else { add_hook("display_entry", "post"); execute_hook("display_entry", "post", $output); echo $output; } }
generate_moderation_queue($my_comment); debug("comment from '" . $Pivot_Vars['piv_name'] . "' added to moderation queue."); } } // remove it from cache, to make sure the latest one is used. $db->unread_entry($entry['code']); // first get the filename.. $filelink = make_filelink($Pivot_Vars['piv_code'], $Pivot_Vars['piv_weblog'], '', $message, TRUE); // send mail.. if (!isset($Pivot_Vars['vote'])) { send_mail_comm(); } // regenerate entry, frontpage and archive.. generate_pages($Pivot_Vars['piv_code'], TRUE, TRUE, TRUE, FALSE, FALSE); redirect($filelink); } if (isset($Pivot_Vars['preview'])) { $db->set_entry($entry); define('__SILENT__', TRUE); define('LIVEPAGE', TRUE); // only set the message if not done yet (otherwise the 'no_name' notice would be overwritten) if (!isset($Pivot_Vars['message'])) { $Pivot_Vars['message'] = lang('comment', 'preview'); } $output = parse_entry($Pivot_Vars['piv_code'], $Current_weblog); $comm_js = fill_comment_form_submit($Pivot_Vars['piv_name'], $Pivot_Vars['piv_email'], $Pivot_Vars['piv_url'], $Pivot_Vars['piv_rememberinfo'], $Pivot_Vars['piv_comment'], $Pivot_Vars['piv_notify'], $Pivot_Vars['piv_discreet']); echo str_replace("</body>", "{$comm_js}\n</body>", $output); } } else { echo "No id.."; }