Changeset 847 in ExiteCMS for trunk/includes/font2image.php


Ignore:
Timestamp:
09/28/07 21:08:59 (5 years ago)
Author:
hverton
Message:

Reorganized the directory structure. All directories to which the webserver needs write access are now in /files (cache and tplcache directories). Smarty now supports multiple websites and multiple themes writing to the same cache directories)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/font2image.php

    r834 r847  
    2929    $f2i_array['cache_folder'] = "";                   // Directory to store the cached images in. 
    3030                                                       // 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     
    3132    $f2i_array['cache_hash'] = false;                  // Boolean. If false, the text will be used as filename, otherwise a hash is calculated     
    3233 
     
    9293    if (!isset($font2image['cache_folder'])) $font2image['cache_images'] = false; 
    9394    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'] = ""; 
    9496    if (!isset($font2image['cache_hash'])) $font2image['cache_hash'] = false; 
    9597 
     
    129131            $hash = str_replace(' ', '_', $font2image['font_text']); 
    130132        } 
    131         $cache_filename = $font2image['cache_folder'] . '/' . $hash . '.png' ; 
     133        $cache_filename = $font2image['cache_folder'] . '/' . $font2image['cache_prefix'] . $hash . '.png' ; 
    132134        if($font2image['cache_images'] && is_readable($cache_filename)) { 
    133135            // convert the file to a resource 
Note: See TracChangeset for help on using the changeset viewer.