/** * * @param code $ _writer * @return void * @access protected */ function pre_generate(&$code) { parent::pre_generate($code); $parent = &$this->find_parent_by_class('pager_navigator_tag'); $code->write_php('if (' . $parent->get_component_ref_code() . '->next()) {'); }
function pre_generate(&$code) { parent::pre_generate($code); $counter = $code->get_temp_variable(); $code->write_php('$' . $counter . ' = trim(' . $this->get_dataspace_ref_code() . '->get_counter());'); $code->write_php('if (($' . $counter . ') && ($' . $counter . '%' . $this->count . ' == 0)) {'); }
function pre_generate(&$code) { if (!isset($this->attributes['type'])) { $this->attributes['type'] = 'string'; } parent::pre_generate($code); }
function pre_generate(&$code) { parent::pre_generate($code); $counter = '$' . $code->get_temp_variable(); $code->write_php($counter . ' = trim(' . $this->get_dataspace_ref_code() . '->get_counter());'); $code->write_php("if (\t({$counter} > 0) && \r\n\t\t\t\t\t\t\t({$counter} < " . $this->get_dataspace_ref_code() . "->get_total_row_count()) &&\r\n\t\t\t\t\t\t \t({$counter} % " . $this->count . " == 0)) {"); }
/** * * @param code $ _writer * @return void * @access protected */ function pre_generate(&$code) { parent::pre_generate($code); $tempvar = $code->get_temp_variable(); $code->write_php('$' . $tempvar . ' = trim(' . $this->get_dataspace_ref_code() . '->get(\'' . $this->field . '\'));'); $code->write_php('if (!empty($' . $tempvar . ')) {'); }
/** * * @param code $ _writer * @return void * @access protected */ function pre_generate(&$code) { parent::pre_generate($code); $tempvar = '$' . $code->get_temp_variable(); $code->write_php($tempvar . ' = ' . $this->get_dataspace_ref_code() . '->get(\'' . $this->field . '\');'); $code->write_php('if (!is_array(' . $tempvar . ' )) ' . $tempvar . ' = utf8_trim(' . $tempvar . ');'); $code->write_php('if (empty(' . $tempvar . ')) {'); }
function pre_generate(&$code) { parent::pre_generate($code); if (!defined('HINT_SCRIPT_INCLUDED')) { $code->write_html("<script type='text/javascript' src='/shared/js/hint.js'></script>"); define('HINT_SCRIPT_INCLUDED', true); } }
function pre_generate(&$code) { $id = $this->attributes['tab_id']; $code->write_html("<div id='{$id}_content'>"); parent :: pre_generate($code); }
/** * Calls the parent pre_generate() method then writes * "$dataspace->prepare();" to the compiled template. * * @param code $ _writer * @return void * @access protected */ function pre_generate(&$code) { parent::pre_generate($code); $code->write_php($this->get_dataspace_ref_code() . '->prepare();'); if ($this->is_debug_enabled()) { $code->write_html("<div class='debug-tmpl-main'>"); $this->_generate_debug_editor_link_html($code, $this->source_file); } }
/** * Calls the parent pre_generate() method then writes * "$dataspace->prepare();" to the compiled template. * * @param code $ _writer * @return void * @access protected */ function pre_generate(&$code) { parent::pre_generate($code); $code->write_php($this->get_dataspace_ref_code() . '->prepare();'); if ($this->is_debug_enabled()) { $code->write_html("<div style='border:dashed 1px blue;padding: 10px 10px 10px 10px;'>"); $this->_generate_debug_editor_link_html($code, $this->source_file); } }
function pre_generate(&$code) { $code->write_html(" <table> <tr> <td height=100% valign=top> "); parent :: pre_generate($code); }
function pre_generate(&$code) { $id = $this->attributes['tab_id']; $code->write_html("<td id={$id}> <table border='0' cellspacing='0' cellpadding='0' style='height:100%'> <tr> <td nowrap {$this->parent->parent->tab_class}><a href='JavaScript:void(0);'>"); parent :: pre_generate($code); }
function pre_generate(&$code) { $value = '$' . $code->get_temp_variable(); $parent = $this->get_dataspace_ref_code(); $radio_child =& $this->find_child_by_class('input_tag'); $label_child =& $this->find_child_by_class('label_tag'); $radio = $radio_child->get_component_ref_code(); $label = $label_child->get_component_ref_code(); $code->write_php("\r\n if ({$value} = {$parent}->get('id'))\r\n {\r\n {$radio}->set_attribute('value', {$value});\r\n {$radio}->set_attribute('id', {$value});\r\n {$label}->set_attribute('for', {$value});\r\n }\r\n "); parent::pre_generate($code); }
/** * * @param code $ _writer * @return void * @access protected */ function pre_generate(&$code) { parent::pre_generate($code); $value = 'true'; if (isset($this->attributes['value']) && !(bool) $this->attributes['value']) { $value = 'false'; } $tempvar = $code->get_temp_variable(); $code->write_php('$' . $tempvar . ' = trim(' . $this->get_dataspace_ref_code() . '->get("status"));'); $code->write_php('if ((boolean)(constant("' . $this->const . '") & $' . $tempvar . ') === ' . $value . ') {'); }
function pre_generate(&$code) { parent::pre_generate($code); $value = 'true'; if (isset($this->attributes['value']) && !(bool) $this->attributes['value']) { $value = 'false'; } $tempvar = $code->get_temp_variable(); $actions_tempvar = $code->get_temp_variable(); $code->write_php('$' . $actions_tempvar . ' = ' . $this->get_dataspace_ref_code() . '->get("actions");'); $code->write_php('if (isset($' . $actions_tempvar . '["publish"]) && isset($' . $actions_tempvar . '["unpublish"])) {'); $code->write_php('$' . $tempvar . ' = trim(' . $this->get_dataspace_ref_code() . '->get("status"));'); $code->write_php('if ((boolean)(constant("SITE_OBJECT_PUBLISHED_STATUS") & $' . $tempvar . ') === ' . $value . ') {'); }
function pre_generate(&$code) { parent::pre_generate($code); if (isset($this->attributes['locale_type'])) { if (strtolower($this->attributes['locale_type']) == 'management') { $locale_constant = 'MANAGEMENT_LOCALE_ID'; } else { $locale_constant = 'CONTENT_LOCALE_ID'; } } else { $locale_constant = 'CONTENT_LOCALE_ID'; } $code->write_php('if ("' . $this->name . '" == constant("' . $locale_constant . '")) {'); }
/** * Calls the parent pre_generate() method then writes * "$dataspace->prepare();" to the compiled template. * * @param code $ _writer * @return void * @access protected */ function pre_generate(&$code) { parent::pre_generate($code); $code->write_php($this->get_dataspace_ref_code() . '->prepare();'); }
function pre_generate(&$code) { $this->_load_tabs_js_script($code); parent :: pre_generate($code); }
function pre_generate(&$code) { $js = <<<JS <script language="javascript"> dom = (document.getElementById) ? true : false; nn4 = (document.hints) ? true : false; ie = (document.all) ? true : false; ie4 = ie && !dom; var current_hint_x = -1, current_hint_y = -1; var current_hint_id = null; //document.onmousemove = hint_mouse_move_handler; add_event(document, 'mousemove', hint_mouse_move_handler); function hint_mouse_move_handler(e) { if (dom) { current_hint_x = e.clientX; current_hint_y = e.clientY; } else if(ie4) { current_hint_x = e.x + document.body.scrollLeft; current_hint_y = e.y + document.body.scrollTop; } else if(nn4) { current_hint_x = e.pageX; current_hint_y = e.pageY; } on_hint_mouse_move(); } function on_hint_mouse_move() { if(current_hint_id) \tmove_hint(current_hint_id, current_hint_x+10, current_hint_y+10); } function show_hint(id) { if (dom) { \tdocument.getElementById(id).style.visibility = "visible"; \tdocument.getElementById(id).style.display = ''; } else if (ie4) { \tdocument.all[id].style.visibility = "visible"; document.all[id].style.display= ''; } else if (nn4) { \tdocument.hints[id].visibility = "show"; document.hints[id].display=''; } } function hide_hint(id) { if (dom) document.getElementById(id).style.visibility = "hidden"; else if (ie4) document.all[id].style.visibility = "hidden"; else if (nn4) document.hints[id].visibility = "hide"; } function move_hint(id,x,y) { if (dom) { h = document.getElementById(id); h.style.left = x; h.style.top = y; } else if(ie4) { document.all[id].left = x; document.all[id].top = y; } else if(nn4) { document.hints[id].left = x; document.hints[id].top = y; } } function start_hint(id) { if(current_hint_id) \thide_hint(current_hint_id); current_hint_id = id; move_hint(current_hint_id, current_hint_x+10, current_hint_y+10); show_hint(current_hint_id); } function stop_hint() { hide_hint(current_hint_id); current_hint_id = null; } </script> JS; parent::pre_generate($code); if (!defined('HINT_SCRIPT_INCLUDED')) { $code->write_html($js); define('HINT_SCRIPT_INCLUDED', true); } }
function pre_generate(&$code) { $code->write_html("\n \t<table>\r\n \t<tr>\r\n \t\t<td height=100% valign=top>\r\n\t\t"); parent::pre_generate($code); }
function pre_generate(&$code) { parent::pre_generate($code); }
function pre_generate(&$code) { parent::pre_generate($code); $code->write_php('if (' . $this->get_component_ref_code() . '->next()) {'); }
function pre_generate(&$code) { $js = <<<JS <script language="javascript"> dom = (document.getElementById) ? true : false; nn4 = (document.hints) ? true : false; ie = (document.all) ? true : false; ie4 = ie && !dom; var current_hint_x = -1, current_hint_y = -1; var mouse_moved = 0; var current_hint_id = ""; document.onmousemove = hint_mouse_move_handler; function hint_mouse_move_handler(e) { current_hint_x = (nn4) ? (e.pageX):(event.x + document.body.scrollLeft); current_hint_y = (nn4) ? (e.pageY):(event.y + document.body.scrollTop); mouse_moved++; on_hint_mouse_move(); } function on_hint_mouse_move() { if(current_hint_id) \tmove_hint(current_hint_id, current_hint_x+10, current_hint_y+10); } function show_hint(id) { if (dom) { \tdocument.getElementById(id).style.visibility = "visible"; \tdocument.getElementById(id).style.display = ''; } else if (ie4) { \tdocument.all[id].style.visibility = "visible"; document.all[id].style.display= ''; } else if (nn4) { \tdocument.hints[id].visibility = "show"; document.hints[id].display=''; } } function hide_hint(id) { if (dom) document.getElementById(id).style.visibility = "hidden"; else if (ie4) document.all[id].style.visibility = "hidden"; else if (nn4) document.hints[id].visibility = "hide"; } function move_hint(idname,x,y) { if (dom) { with(eval(idname)) { style.left = x; style.top = y; } } else if(nn4) { document.hints[idname].left = x; document.hints[idname].top = y; } } function start_hint(id) { if(current_hint_id) \thide_hint(current_hint_id); \t current_hint_id = id; move_hint(current_hint_id, current_hint_x+10, current_hint_y+10); show_hint(current_hint_id); } function stop_hint() { hide_hint(current_hint_id); current_hint_id = ""; } </script> JS; parent::pre_generate($code); if (!defined('HINT_SCRIPT_INCLUDED')) { $code->write_html($js); define('HINT_SCRIPT_INCLUDED', true); } }