Changeset 841 in ExiteCMS


Ignore:
Timestamp:
09/26/07 16:21:28 (4 years ago)
Author:
hverton
Message:

fixed ticket #5: panel preview doesn't work
added new images for the Gallery module

Location:
trunk
Files:
9 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/administration/panel_editor.php

    r834 r841  
    134134            $panel_type = "dynamic"; 
    135135            eval($panel_code); 
    136             $variables['message'] = "PREVIEW OF DYNAMIC PANELS IS NOT SUPPORTED YET!"; 
    137136            if ($panel_side == 1) { 
    138                 $template_panels[] = array('type' => 'left', 'name' => 'admin.panel_editor.preview', 'title' => $panel_name, 'state' => ($panel_state == 2 ? 0 : $panel_state), 'template' => '_message_side_panel.simple.tpl'); 
     137                $template_panels[] = array('type' => 'left', 'name' => 'admin.panel_editor.preview', 'title' => $panel_name, 'state' => ($panel_state == 2 ? 0 : $panel_state), 'template' => 'string:'.$panel_template); 
    139138            } elseif ($panel_side == 2) { 
    140                 $template_panels[] = array('type' => 'upper', 'name' => 'admin.panel_editor.preview', 'title' => $panel_name, 'state' => ($panel_state == 2 ? 0 : $panel_state), 'template' => '_message_table_panel.simple.tpl'); 
     139                $template_panels[] = array('type' => 'upper', 'name' => 'admin.panel_editor.preview', 'title' => $panel_name, 'state' => ($panel_state == 2 ? 0 : $panel_state), 'template' => 'string:'.$panel_template); 
    141140            } elseif ($panel_side == 3) { 
    142                 $template_panels[] = array('type' => 'lower', 'name' => 'admin.panel_editor.preview', 'title' => $panel_name, 'state' => ($panel_state == 2 ? 0 : $panel_state), 'template' => '_message_table_panel.simple.tpl'); 
     141                $template_panels[] = array('type' => 'lower', 'name' => 'admin.panel_editor.preview', 'title' => $panel_name, 'state' => ($panel_state == 2 ? 0 : $panel_state), 'template' => 'string:'.$panel_template); 
    143142            } elseif ($panel_side == 4) { 
    144                 $template_panels[] = array('type' => 'right', 'name' => 'admin.panel_editor.preview', 'title' => $panel_name, 'state' => ($panel_state == 2 ? 0 : $panel_state), 'template' => '_message_side_panel.simple.tpl'); 
     143                $template_panels[] = array('type' => 'right', 'name' => 'admin.panel_editor.preview', 'title' => $panel_name, 'state' => ($panel_state == 2 ? 0 : $panel_state), 'template' => 'string:'.$panel_template); 
    145144            } 
    146145        } else { 
     
    157156            } 
    158157        } 
    159         $template_variables['admin.panel_editor.preview'] = $variables; 
    160         $variables = array(); 
     158        if (isset($variables) && is_array($variables)) { 
     159            $template_variables['admin.panel_editor.preview'] = $variables; 
     160            $variables = array(); 
     161        } 
    161162    } 
    162163 
  • trunk/includes/Smarty-2.6.18/Smarty.class.php

    r814 r841  
    11201120    { 
    11211121        static $_cache_info = array(); 
    1122          
     1122 
    11231123        $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting) 
    11241124               ? $this->error_reporting : error_reporting() & ~E_NOTICE); 
     
    17521752            // make source name safe for filename 
    17531753            $_filename = urlencode(basename($auto_source)); 
     1754 
     1755            // WANWIZARD: if the filename contains illegal characters, use the MD5-hash 
     1756            if (preg_match("%[\\\/:;*?\"\[\]\%]%", $_filename)) { 
     1757                $_filename = md5($_filename); 
     1758            } 
     1759            // WANWIZARD: end-of-mod 
     1760 
    17541761            $_crc32 = sprintf('%08X', crc32($auto_source)); 
    17551762            // prepend %% to avoid name conflicts with 
  • trunk/includes/theme_functions.php

    r834 r841  
    5454// Register the panel template resource 
    5555$template->register_resource('panel', array('resource_panel_source', 'resource_panel_timestamp', 'resource_panel_secure', 'resource_panel_trusted')); 
     56 
     57// Register the string template resource 
     58$template->register_resource('string', array('resource_string_source', 'resource_string_timestamp', 'resource_string_secure', 'resource_string_trusted')); 
    5659 
    5760// Array to store panels 
     
    382385    // not used for templates 
    383386} 
     387 
     388/*-----------------------------------------------------+ 
     389| resource_string - Smarty string resource callbacks   | 
     390+-----------------------------------------------------*/ 
     391function resource_string_source($tpl_name, &$tpl_source, &$smarty) { 
     392 
     393    $tpl_source = $tpl_name; 
     394    return true; 
     395} 
     396 
     397function resource_string_timestamp($tpl_name, &$tpl_timestamp, &$smarty) { 
     398 
     399    $tpl_timestamp = time(); 
     400    return true; 
     401} 
     402 
     403function resource_string_secure($tpl_name, &$smarty) { 
     404 
     405    // assume all templates are secure 
     406    return true; 
     407} 
     408 
     409function resource_string_trusted($tpl_name, &$smarty) { 
     410 
     411    // not used for templates 
     412} 
    384413?> 
  • trunk/themes/PLiTheme/templates/source/_closeside.tpl

    r735 r841  
    11{***************************************************************************} 
    22{*                                                                         *} 
    3 {* PLi-Fusion CMS include template: _closeside.tpl                         *} 
     3{* ExiteCMS - include template: _closeside.tpl                             *} 
    44{*                                                                         *} 
    55{***************************************************************************} 
  • trunk/themes/PLiTheme/templates/source/_closeside_x.tpl

    r735 r841  
    11{***************************************************************************} 
    22{*                                                                         *} 
    3 {* PLi-Fusion CMS include template: _closeside.tpl                         *} 
     3{* ExiteCMS - include template: _closeside.tpl                             *} 
    44{*                                                                         *} 
    55{***************************************************************************} 
  • trunk/themes/PLiTheme/templates/source/_closetable.tpl

    r735 r841  
    11{***************************************************************************} 
    22{*                                                                         *} 
    3 {* PLi-Fusion CMS include template: _closetable.tpl                        *} 
     3{* ExiteCMS - include template: _closetable.tpl                            *} 
    44{*                                                                         *} 
    55{***************************************************************************} 
  • trunk/themes/PLiTheme/templates/source/_custom_html.tpl

    r735 r841  
    11{****************************************************************************} 
    22{*                                                                          *} 
    3 {* PLi-Fusion CMS template: _custom_html.tpl                                *} 
     3{* ExiteCMS - _custom_html.tpl                                              *} 
    44{*                                                                          *} 
    55{****************************************************************************} 
  • trunk/themes/PLiTheme/templates/source/_footer.tpl

    r834 r841  
    11{***************************************************************************} 
    22{*                                                                         *} 
    3 {* PLi-Fusion CMS template: footer.tpl                                     *} 
     3{* ExiteCMS - template: footer.tpl                                         *} 
    44{*                                                                         *} 
    55{***************************************************************************} 
     
    1212{***************************************************************************} 
    1313{*                                                                         *} 
    14 {* This template generates the PLi-Fusion website footer.                  *} 
     14{* This template generates the ExiteCMS website footer.                    *} 
    1515{* If this footer requires custom variables, assign them in the footer     *} 
    1616{* preprocessing section of your theme.php                                 *} 
  • trunk/themes/PLiTheme/templates/source/_fullscreen_navigation.tpl

    r795 r841  
    11{***************************************************************************} 
    22{*                                                                         *} 
    3 {* PLi-Fusion CMS template: navigation_panel.tpl                           *} 
     3{* ExiteCMS template: navigation_panel.tpl                                 *} 
    44{*                                                                         *} 
    55{***************************************************************************} 
     
    1212{***************************************************************************} 
    1313{*                                                                         *} 
    14 {* This template generates the PLi-Fusion infusion panel: navigation_panel *} 
     14{* This template generates the ExiteCMS fullscreen menu panel              *} 
    1515{*                                                                         *} 
    1616{***************************************************************************} 
  • trunk/themes/PLiTheme/templates/source/_header.tpl

    r834 r841  
    11{***************************************************************************} 
    22{*                                                                         *} 
    3 {* PLi-Fusion CMS template: header.tpl                                     *} 
     3{* ExiteCMS template: header.tpl                                           *} 
    44{*                                                                         *} 
    55{***************************************************************************} 
     
    1212{***************************************************************************} 
    1313{*                                                                         *} 
    14 {* This template generates the PLi-Fusion website header.                  *} 
     14{* This template generates the ExiteCMS website header.                    *} 
    1515{* If this header requires custom variables, assign them in the header     *} 
    1616{* preprocessing section of your theme.php                                 *} 
  • trunk/themes/PLiTheme/templates/source/_make_page_navigation.tpl

    r738 r841  
    11{***************************************************************************} 
    22{*                                                                         *} 
    3 {* PLi-Fusion CMS template: _make_page_navigation.tpl                      *} 
     3{* ExiteCMS template: _make_page_navigation.tpl                            *} 
    44{*                                                                         *} 
    55{***************************************************************************} 
Note: See TracChangeset for help on using the changeset viewer.