$Date: 2007-03-29 06:52:02 -0400 (Thu, 29 Mar 2007) $ | > $Revision: 911 $ | > $Author: matt $ +--------------------------------------------------------------------------- | | > Admin Template functions library | > Script written by Matt Mecham | > Date started: 19th November 2003 | | > DBA Checked: Tue 25th May 2004 +-------------------------------------------------------------------------- */ if ( ! defined( 'IN_ACP' ) ) { print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } class admin_template_functions { var $menu_fontchange = ""; var $menu_sizechange = ""; var $menu_backchange = ""; var $menu_fontcolor = ""; var $menu_widthchange = ""; var $menu_highchange = ""; var $default_css = ""; var $type = ""; //----------------------------------------- // Constructor //----------------------------------------- function admin_template_functions() { $this->default_css = "font-family:Verdana;font-size:11pt;color:black;background-color:white;border:3px outset #555"; } //----------------------------------------- // Build generic editor //----------------------------------------- function build_generic_editor_area( $data ) { $return = ""; $return .= $this->html_build_editor_top(); $return .= "
   {$data['title']}
"; $return .= "
".$this->ipsclass->adskin->form_textarea("txt{$data['textareaname']}", $data['textareainput'], '', '', 'none', "txt{$data['textareaname']}", $this->default_css )."
\n"; $return .= $this->html_build_editor_bottom() . "
"; return $return; } //----------------------------------------- // Build editor text area table //----------------------------------------- function build_editor_area( $html, $template=array(), $img="" ) { $return = ""; $edit_prefs = $this->type == 'single' ? $this->editor_prefs_dropdown : ''; $close_box = $this->type == 'single' ? "" : ''; $template['func_data'] = str_replace( "'", ''', $template['func_data'] ); $spiffy_diffy = ""; $return .= <<
{$close_box} {$edit_prefs}  {$img}{$template['easy_name']} Options  
$spiffy_diffy
EOF; $return .= "
".$this->ipsclass->adskin->form_textarea("txt{$template['suid']}", $html, 60, 5, 'none', "t{$template['suid']}", $this->default_css, 'onkeypress="parent.template_bit_changed(\'t'.$template['suid'].'\')"' )."
\n"; $return .= ""; return $return; } //----------------------------------------- // Build JS for floated window //----------------------------------------- function build_editor_area_floated($no_buttons=0) { $return = "
"; $return .= $this->html_build_editor_top(); $return .= "
"; if ( $no_buttons == 0 ) { $return .= " "; } $return .= "
"; $return .= "
".$this->ipsclass->adskin->form_textarea("templatebit", $html, $this->ipsclass->vars['tx'], $this->ipsclass->vars['ty'], 'none', "templatebit", $this->default_css )."
\n"; $return .= "
"; $return .= " "; $return .= $this->html_build_editor_bottom(); $return .= "
"; $this->ipsclass->html = $return; $this->ipsclass->admin->print_popup(); } //----------------------------------------- // Build editor preferences menus //----------------------------------------- function build_editor_pref_menus() { $this->menu_fontchange = ""; $this->menu_sizechange = ""; $this->menu_backchange = ""; $this->menu_fontcolor = ""; $this->menu_widthchange = ""; //----------------------------------------- // Not single? //----------------------------------------- if ( $this->type != 'single' AND $this->type != 'multiple' ) { $this->menu_highchange = ""; } else { $this->menu_highchange = "
"; } $close_box = $this->type == 'multiple' ? "" : ''; return <<
{$close_box}
{$this->editor_prefs_dropdown}
EOF; } function html_build_editor_bottom() { return << menu_build_menu( 'tmpl-editor-prefs', new Array( ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ "
Font Family{$this->menu_fontchange}
Font Size{$this->menu_sizechange}
Font Color{$this->menu_fontcolor}
Background{$this->menu_backchange}
Area Width{$this->menu_widthchange}
Area Height{$this->menu_highchange}
"+ ""+ "
" ) );
\n
EOF; } } ?>