/** * Standard modular UI for a separate preview. * * @param tempcode The page title * @return tempcode The UI */ function preview_intercept($title) { require_code('preview'); $output = build_preview(); $url = get_self_url(false, false, array('preview' => 0)); $fields = build_keep_post_fields(); return do_template('CONFIRM_SCREEN', array('_GUID' => '06a3eb06338a7f821676d8ca3eb66aa6', 'TITLE' => $title, 'PREVIEW' => $output, 'URL' => $url, 'FIELDS' => $fields)); }
/** * Script to show previews of content being added/edited. */ function preview_script() { $_GET['wide_high'] = '1'; require_code('preview'); list($output, $validation, $keyword_density, $spelling) = build_preview(true); $output = do_template('PREVIEW_SCRIPT', array('_GUID' => '97bd8909e8b9983a0bbf7ab68fab92f3', 'OUTPUT' => $output->evaluate(), 'VALIDATION' => $validation, 'KEYWORD_DENSITY' => $keyword_density, 'SPELLING' => $spelling, 'HIDDEN' => build_keep_post_fields())); $tpl = do_template('STYLED_HTML_WRAP', array('TITLE' => do_lang_tempcode('PREVIEW'), 'EXTRA_HEAD' => $GLOBALS['EXTRA_HEAD'], 'EXTRA_FOOT' => $GLOBALS['EXTRA_FOOT'], 'FRAME' => true, 'TARGET' => '_top', 'CONTENT' => $output)); $tpl->handle_symbol_preprocessing(); $tpl->evaluate_echo(); }