Ejemplo n.º 1
0
/**
* Returns complete formatted HTML-textareafield for Sourcecode
* 
* @Args : formname -> name of the inputfield
*         content -> value of textfield
*         type_config -> array with values from the CMS:tag
*         cms_side['view'] -> the current view of the user, 'edit' or 'preview'
*                  ['edit'] -> 'true' if user set the mod in templateconfig as active
*                              if user set inactiv var is not set
* @Return String HTML textareafield
* @Access public 
*/
function type_form_sourcecode($formname, $content, $type_config, $cms_side)
{
    global $js_pad, $cfg_cms, $gb_conf;
    $content = type_form_cmslinks_to_templinks($content);
    include_once $cfg_cms['cms_path'] . 'external/sourcepad/gb_source_pad.php';
    $js_pad = new gb_source_pad('editcontent', $formname);
    $out = "    <td>\n";
    $js_pad->set('handle_http_path', $cfg_cms['cms_html_path'] . 'external/sourcepad/');
    $js_pad->set('language', 'german');
    $js_pad->set('editorheight_css', '350px');
    $js_pad->set('editorwidth_css', '800px');
    $js_pad->set('content', $content);
    $out .= $js_pad->make_pad();
    $out .= "    </td>\n";
    return $out;
}