Esempio n. 1
0
function do_see_markup($data)
{
    $ret = array();
    foreach($data as $el)
    {
        $el = trim($el);
        
        if(substr($el, 0, 1) != "[")
           $ret[] = do_markup("[F[".$el."]]");
        else
           $ret[] = do_markup($el);
    }

    return implode(" & ", $ret);
}
Esempio n. 2
0
function markup_main_fields($incoming)
{
    global $txpcfg;
    $incoming['Title_plain'] = $incoming['Title'];
    $incoming['Body_html'] = do_markup($incoming['markup_body'], $incoming['Body']);
    $incoming['Excerpt_html'] = do_markup($incoming['markup_excerpt'], $incoming['Excerpt']);
    return $incoming;
}
Esempio n. 3
0
            }
            
            
            if(count($params_data) > 0)
                $func_data = ereg_replace("%PARAMETER_START%.*%PARAMETER_END%",
                                          ereg_replace("%PARAMETERS_START%.*%PARAMETERS_END%", implode("\n", $params_data), $parameter_tpl),
                                          $func_data);
            else
                $func_data = ereg_replace("%PARAMETER_START%.*%PARAMETER_END%", "", $func_data);
        }
        else
            $func_data = ereg_replace("%PARAMETER_START%.*%PARAMETER_END%", "", $func_data);

        if(isset($func["return"]) && strlen($func["return"][0]) > 0)
            $func_data = ereg_replace("%RETURN_START%.*%RETURN_END%",
                                      str_replace("%RETURN%", do_markup($func["return"][0]), $return_tpl),
                                      $func_data);
        else
            $func_data = ereg_replace("%RETURN_START%.*%RETURN_END%", "", $func_data);
        
        if(isset($func["conditions"]))
            $func_data = ereg_replace("%CONDITIONS_START%.*%CONDITIONS_END%",
                                      str_replace("%CONDITIONS%", $func["conditions"][0], $conditions_tpl),
                                      $func_data);
        else
            $func_data = ereg_replace("%CONDITIONS_START%.*%CONDITIONS_END%", "", $func_data);

        if(isset($func["see"]))
            $func_data = ereg_replace("%SEE_START%.*%SEE_END%",
                                      str_replace("%SEE%", do_see_markup(explode(" ", trim($func["see"][0]))), $see_tpl),
                                      $func_data);