Changeset 847 in ExiteCMS
- Timestamp:
- 09/28/07 21:08:59 (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 83 deleted
- 5 edited
- 16 copied
- 1 moved
-
files/cache (added)
-
files/tplcache (added)
-
includes/Smarty-2.6.18/Smarty.class.php (modified) (4 diffs)
-
includes/Smarty-2.6.18/custom-plugins (deleted)
-
includes/font2image.php (modified) (3 diffs)
-
includes/theme_functions.php (modified) (5 diffs)
-
locale/English/global.php (modified) (1 diff)
-
themes/PLiTheme/bartext.php (modified) (1 diff)
-
themes/PLiTheme/cache (deleted)
-
themes/PLiTheme/templates/templates (moved) (moved from trunk/themes/PLiTheme/templates/source)
-
themes/PLiTheme/templates/templates/_closeside.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_closeside.tpl)
-
themes/PLiTheme/templates/templates/_closeside_x.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_closeside_x.tpl)
-
themes/PLiTheme/templates/templates/_closetable.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_closetable.tpl)
-
themes/PLiTheme/templates/templates/_custom_html.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_custom_html.tpl)
-
themes/PLiTheme/templates/templates/_footer.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_footer.tpl)
-
themes/PLiTheme/templates/templates/_fullscreen_navigation.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_fullscreen_navigation.tpl)
-
themes/PLiTheme/templates/templates/_header.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_header.tpl)
-
themes/PLiTheme/templates/templates/_make_page_navigation.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_make_page_navigation.tpl)
-
themes/PLiTheme/templates/templates/_message_side_panel.simple.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_message_side_panel.simple.tpl)
-
themes/PLiTheme/templates/templates/_message_side_panel.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_message_side_panel.tpl)
-
themes/PLiTheme/templates/templates/_message_table_panel.simple.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_message_table_panel.simple.tpl)
-
themes/PLiTheme/templates/templates/_message_table_panel.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_message_table_panel.tpl)
-
themes/PLiTheme/templates/templates/_openside.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_openside.tpl)
-
themes/PLiTheme/templates/templates/_openside_x.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_openside_x.tpl)
-
themes/PLiTheme/templates/templates/_opentable.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_opentable.tpl)
-
themes/PLiTheme/templates/templates/_query_debug.tpl (copied) (copied from trunk/themes/PLiTheme/templates/source/_query_debug.tpl)
-
themes/PLiTheme/templates/templates/admin.administrators.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.adverts.addclient.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.adverts.delclient.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.adverts.edit.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.adverts.images.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.adverts.overview.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.adverts.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.article_cats.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.articles.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.blacklist.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.comments.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.custom_pages.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.db_backup.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.download_cats.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.downloads.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.faq.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.forum_polls.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.forums.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.images.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.index.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.members.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.modules.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.news.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.news_cats.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.panel_editor.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.panels.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.redirects.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.settings_forum.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.settings_image.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.settings_languages.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.settings_links.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.settings_main.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.settings_messages.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.settings_misc.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.settings_registration.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.settings_time.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.shoutbox.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.site_links.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.upgrade.tpl (deleted)
-
themes/PLiTheme/templates/templates/admin.user_groups.tpl (deleted)
-
themes/PLiTheme/templates/templates/forum.index.tpl (deleted)
-
themes/PLiTheme/templates/templates/forum.options.tpl (deleted)
-
themes/PLiTheme/templates/templates/forum.poll.tpl (deleted)
-
themes/PLiTheme/templates/templates/forum.post.move.tpl (deleted)
-
themes/PLiTheme/templates/templates/forum.post.tpl (deleted)
-
themes/PLiTheme/templates/templates/forum.renderpost.tpl (deleted)
-
themes/PLiTheme/templates/templates/forum.resultdialog.tpl (deleted)
-
themes/PLiTheme/templates/templates/forum.viewforum.tpl (deleted)
-
themes/PLiTheme/templates/templates/forum.viewthread.tpl (deleted)
-
themes/PLiTheme/templates/templates/include.comments.tpl (deleted)
-
themes/PLiTheme/templates/templates/include.ratings.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.advertising.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.article_cats.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.contact.message.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.contact.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.downloads.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.edit_profile.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.faq.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.login.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.lostpassword.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.maintenance.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.members.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.news.readmore.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.news.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.news_cats.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.pm.options.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.pm.post.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.pm.renderpm.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.pm.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.print.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.profile.groups.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.profile.members.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.readarticle.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.register.activate.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.register.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.search.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.setup.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.setuser.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.viewpage.tpl (deleted)
-
themes/PLiTheme/templates/templates/main.webshop.tpl (deleted)
-
themes/PLiTheme/templates/tplcache (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/Smarty-2.6.18/Smarty.class.php
r843 r847 73 73 * @var string 74 74 */ 75 var $template_dir = array('templates');75 var $template_dir = 'templates'; 76 76 77 77 /** … … 1120 1120 { 1121 1121 static $_cache_info = array(); 1122 1122 1123 1123 $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting) 1124 1124 ? $this->error_reporting : error_reporting() & ~E_NOTICE); … … 1752 1752 // make source name safe for filename 1753 1753 $_filename = urlencode(basename($auto_source)); 1754 1755 // WANWIZARD: if the filename contains illegal characters, use the MD5-hash1756 if (preg_match("%[\\\/:;*?\"\[\]\%]%", $_filename)) {1757 $_filename = md5($_filename);1758 }1759 // WANWIZARD: end-of-mod1760 1761 1754 $_crc32 = sprintf('%08X', crc32($auto_source)); 1762 1755 // prepend %% to avoid name conflicts with … … 1764 1757 $_crc32 = substr($_crc32, 0, 2) . $_compile_dir_sep . 1765 1758 substr($_crc32, 0, 3) . $_compile_dir_sep . $_crc32; 1766 $_return .= $_filename . '.%%' . $_crc32 . '%%'; 1767 } 1759 $_return .= '%%' . $_crc32 . '%%' . $_filename; 1760 } 1761 1768 1762 return $_return; 1769 1763 } -
trunk/includes/font2image.php
r834 r847 29 29 $f2i_array['cache_folder'] = ""; // Directory to store the cached images in. 30 30 // If not defined or not valid, cache_images will be set to false. 31 $f2i_array['cache_prefix'] = false; // If defined, this will be prepended to the filename of the cached file 31 32 $f2i_array['cache_hash'] = false; // Boolean. If false, the text will be used as filename, otherwise a hash is calculated 32 33 … … 92 93 if (!isset($font2image['cache_folder'])) $font2image['cache_images'] = false; 93 94 if ($font2image['cache_folder'] !="" && !is_dir($font2image['cache_folder'])) fatal_error('Cache folder does not exist.'); 95 if (!isset($font2image['cache_prefix']) || $font2image['cache_prefix'] == false) $font2image['cache_prefix'] = ""; 94 96 if (!isset($font2image['cache_hash'])) $font2image['cache_hash'] = false; 95 97 … … 129 131 $hash = str_replace(' ', '_', $font2image['font_text']); 130 132 } 131 $cache_filename = $font2image['cache_folder'] . '/' . $ hash . '.png' ;133 $cache_filename = $font2image['cache_folder'] . '/' . $font2image['cache_prefix'] . $hash . '.png' ; 132 134 if($font2image['cache_images'] && is_readable($cache_filename)) { 133 135 // convert the file to a resource -
trunk/includes/theme_functions.php
r843 r847 15 15 if (eregi("theme_functions.php", $_SERVER['PHP_SELF']) || !defined('ExiteCMS_INIT')) die(); 16 16 17 // load the Smarty template engine 18 require_once PATH_INCLUDES."Smarty-2.6.18/Smarty.class.php"; 19 20 // extend Smarty with the ExiteCMS custom bits 21 class ExiteCMS_Smarty extends Smarty { 22 23 /**#@+ 24 * ExiteCMS Smarty Configuration Section 25 */ 26 27 /** 28 * Array with names of directories where templates can be located. 29 * 30 * @var string 31 */ 32 var $template_dir = array('templates'); 33 34 /**#@-*/ 35 /** 36 * The class constructor. 37 */ 38 function ExiteCMS_Smarty() { 39 global $settings; 40 41 $this->Smarty(); 42 43 // debugging needed? 44 $this->debugging = false; 45 46 // on-the-fly compilation needed? 47 $this->compile_check = true; 48 49 // set the compile ID for this website/theme (themes can have different templates!) 50 $this->compile_id = $_SERVER['SERVER_NAME'].".".$settings['theme']; 51 52 // caching required? 53 $this->caching = 0; 54 55 // path definitions 56 $this->config_dir = PATH_THEME.'templates/configs'; 57 $this->compile_dir = PATH_ROOT.'files/tplcache'; 58 $this->cache_dir = PATH_ROOT.'files/cache'; 59 60 // PHP in Templates? Don't think so! 61 $this->php_handling = SMARTY_PHP_REMOVE; 62 63 // Template security settings: allow PHP functions 64 $this->security = false; 65 } 66 67 /** 68 * get a concrete filename for automagically created content 69 * 70 * @param string $auto_base 71 * @param string $auto_source 72 * @param string $auto_id 73 * @return string 74 * @staticvar string|null 75 * @staticvar string|null 76 */ 77 function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null) 78 { 79 $_compile_dir_sep = $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^'; 80 $_return = $auto_base . DIRECTORY_SEPARATOR; 81 82 if(isset($auto_id)) { 83 // make auto_id safe for directory names 84 $auto_id = str_replace('%7C',$_compile_dir_sep,(urlencode($auto_id))); 85 } 86 87 if(isset($auto_source)) { 88 // make source name safe for filename 89 $auto_source = urlencode(basename($auto_source)); 90 if (preg_match("%[\\\/:;*?\"\[\]\%]%", $auto_source)) { 91 $auto_source = md5($auto_source); 92 } 93 $_crc32 = sprintf('%08X', crc32($auto_source)); 94 // prepend %% to avoid name conflicts with 95 // with $params['auto_id'] names 96 $_crc32 = substr($_crc32, 0, 2) . $_compile_dir_sep . 97 substr($_crc32, 0, 3) . $_compile_dir_sep . $_crc32; 98 } 99 return $_return.(isset($auto_source)?($auto_source."."):"").(isset($auto_id)?($auto_id."."):"").(isset($_crc32)?$_crc32:""); 100 } 101 102 /** 103 * Returns the last modified timestamp of a template, or false if not found. 104 * 105 * @param string $tpl_file 106 * @return mixed 107 */ 108 function template_timestamp($tpl_file) 109 { 110 $_params = array('resource_name' => $tpl_file, 'quiet'=>true, 'get_source'=>false); 111 if ($this->_fetch_resource_info($_params)) { 112 return $_params['resource_timestamp']; 113 } else { 114 return false; 115 } 116 } 117 } 118 17 119 // Smarty template engine definitions and initialisation 18 require_once PATH_INCLUDES."Smarty-2.6.18/Smarty.class.php"; 19 20 // initialize the class 21 $template = & new Smarty(); 22 23 // debugging needed? 24 $template->debugging = false; 25 26 // on-the-fly compilation needed? 27 $template->compile_check = true; 28 29 // set the compile ID for this website 30 $template->compile_id = $_SERVER['SERVER_NAME']; 31 32 // caching required? 33 $template->caching = 0; 34 35 // path definitions 36 $template->template_dir = PATH_THEME.'templates/source'; 37 $template->compile_dir = PATH_THEME.'templates/templates'; 38 $template->config_dir = PATH_THEME.'templates/configs'; 39 $template->cache_dir = PATH_THEME.'cache'; 120 121 // initialize the template engine 122 $template = & new ExiteCMS_Smarty(); 40 123 41 124 // plugin's, where to find them? … … 43 126 // first check if there's one defined in the current theme 44 127 if (is_dir(PATH_THEME."template/plugins")) $plugins_dir[] = PATH_THEME."template/plugins"; 45 // next, check the CMS custom plugins46 $plugins_dir[] = 'custom-plugins';128 // next, check the ExiteCMS custom plugins 129 $plugins_dir[] = PATH_INCLUDES.'template-plugins'; 47 130 // and finaly, use the default Smarty plugins 48 131 $plugins_dir[] = 'smarty-plugins'; … … 53 136 $template_dir = array(); 54 137 // first check if there's one defined in the current theme 55 if (is_dir(PATH_THEME."templates/ source")) $template_dir[] = PATH_THEME."templates/source";138 if (is_dir(PATH_THEME."templates/templates")) $template_dir[] = PATH_THEME."templates/templates"; 56 139 // next, check the CMS template directory 57 140 $template_dir[] = PATH_INCLUDES.'templates'; 58 141 59 142 $template->template_dir = $template_dir; 60 61 // PHP in Templates? Don't think so!62 $template->php_handling = SMARTY_PHP_REMOVE;63 64 // Template security settings: allow PHP functions65 $template->security = false;66 143 67 144 // Register the panel template resource … … 83 160 global $settings, $userdata, $db_prefix, $aidlink, 84 161 $template, $template_panels, $template_variables, 85 $_loadstats, $_headparms, $_bodyparms ;162 $_loadstats, $_headparms, $_bodyparms, $_last_updated; 86 163 87 164 // reset all assigned template variables … … 181 258 } 182 259 183 // if a template is defined, load the template, 184 if (isset($panel['template'])) $template->display($panel['template']); 260 // if a template is defined, get the last modified date, and load the template 261 if (isset($panel['template'])) { 262 // get the timestamp of the template, and update the last update timestamp if newer 263 $ts = $template->template_timestamp($panel['template']); 264 $_last_updated = isset($_last_updated) ? ($ts > $_last_updated ? $ts : $_last_updated ) : $ts; 265 $template->assign("_last_updated", $_last_updated); 266 // and load the template 267 $template->display($panel['template']); 268 } 185 269 186 270 // restore the template direcory if needed -
trunk/locale/English/global.php
r843 r847 167 167 $locale['195'] = "This account has not been activated."; 168 168 $locale['196'] = "Invalid username or password."; 169 $locale['197'] = " OBSOLETE! REPLACED BY 183/184!";169 $locale['197'] = "Page last updated"; 170 170 $locale['198'] = "<font color='red'><b>Warning:</b></font> setup.php detected, please delete it immediately"; 171 171 $locale['199'] = "wrote"; -
trunk/themes/PLiTheme/bartext.php
r735 r847 25 25 $font2png['shadow_width'] = 0; 26 26 $font2png['cache_images'] = (isset($_GET['cache']) && $_GET['cache'] == "yes") ? true : false; 27 $font2png['cache_folder'] = PATH_THEME."cache"; 27 $font2png['cache_folder'] = PATH_ROOT."files/cache/"; 28 $font2png['cache_prefix'] = $_SERVER['SERVER_NAME'].".".$settings['theme']."."; 28 29 $font2png['cache_hash'] = false; 29 30
Note: See TracChangeset
for help on using the changeset viewer.
