예제 #1
0
파일: w2x_php5.php 프로젝트: nao-pon/xpWiki
    $_ul_left_margin = $xpwiki->root->_ul_left_margin;
    $_ul_margin = $xpwiki->root->_ul_margin;
    $_ol_left_margin = $xpwiki->root->_ol_left_margin;
    $_ol_margin = $xpwiki->root->_ol_margin;
    $_dl_left_margin = $xpwiki->root->_dl_left_margin;
    $_dl_margin = $xpwiki->root->_dl_margin;
    $_list_pad_str = $xpwiki->root->_list_pad_str;
    $preformat_ltrim = $xpwiki->root->preformat_ltrim;
    $guiedit_line_rules = $xpwiki->root->line_rules;
    // Over write
    $guiedit_line_rules['%%%(?!%)((?:(?!%%%).)*)%%%'] = '<u>$1</u>';
    $guiedit_line_rules['%%(?!%)((?:(?!%%).)*)%%'] = '<strike>$1</strike>';
    $guiedit_line_rules["'''(?!')((?:(?!''').)*)'''"] = '<em>$1</em>';
    $guiedit_line_rules["''(?!')((?:(?!'').)*)''"] = '<strong>$1</strong>';
    $guiedit_line_rules["\r"] = '<br />' . "\n";
    $source = guiedit_convert_html($source);
}
Send_xml($source, strval($line_break));
function _htmlspecialchars($str, $flags = ENT_COMPAT, $encoding = null, $double_encode = true)
{
    if (is_null($encoding)) {
        $encoding = 'UTF-8';
    }
    return htmlspecialchars($str, $flags, $encoding, $double_encode);
}
function debug($data)
{
    $file = dirname(__FILE__) . '/debug.txt';
    @unlink($file);
    file_put_contents($file, $data);
}
예제 #2
0
function plugin_guiedit_template()
{
    global $vars;
    global $guiedit_use_fck;
    //	テンプレートを取得
    $wiki = new WikiFile($vars['template_page']);
    if ($wiki->has()) {
        $vars['msg'] = join('', $wiki->source());
        $vars['msg'] = preg_replace('/^(\\*{1,3}.*)\\[#[A-Za-z][\\w-]+\\](.*)$/m', '$1$2', $vars['msg']);
        $vars['msg'] = preg_replace(PLUGIN_GUIEDIT_FREEZE_REGEX, '', $vars['msg']);
    } else {
        if ($guiedit_use_fck) {
            exit;
        }
    }
    if (!$guiedit_use_fck) {
        return plugin_guiedit_preview();
    }
    //	構文の変換
    $inc = (include_once GUIEDIT_CONF_PATH . 'wiki2xhtml.php');
    if ($inc === false) {
        Utility::dieMessage('guiedit.inc.php : Cannot load Wiki2XHTML Libraly.');
        $postdata = 'ERROR!';
    } else {
        $postdata = guiedit_convert_html($vars['msg']);
    }
    plugin_guiedit_send_ajax($postdata);
}
예제 #3
0
function plugin_guiedit_template()
{
    global $vars;
    global $guiedit_use_fck;
    //	テンプレートを取得
    if (is_page($vars['template_page'])) {
        $vars['msg'] = join('', get_source($vars['template_page']));
        $vars['msg'] = preg_replace('/^(\\*{1,3}.*)\\[#[A-Za-z][\\w-]+\\](.*)$/m', '$1$2', $vars['msg']);
        $vars['msg'] = preg_replace(PLUGIN_GUIEDIT_FREEZE_REGEX, '', $vars['msg']);
    } else {
        if ($guiedit_use_fck) {
            exit;
        }
    }
    if (!$guiedit_use_fck) {
        return plugin_guiedit_preview();
    }
    //	構文の変換
    require_once GUIEDIT_LIB_PATH . 'wiki2xhtml.php';
    $vars['msg'] = guiedit_convert_html($vars['msg']);
    plugin_guiedit_send_xml($vars['msg']);
}