mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
A fair amount of additional working or semi-working stuff ... template stored db source (when appropriate), switch theme/templates between DB/filesystem (if available), import, upload templates, imagesets, themes (if available ... i.e. no safe mode), etc. still a fair amount of stuff to do but getting there ... take care using this, backup any themes/templates/imagesets before fiddling and let me know of issues
git-svn-id: file:///svn/phpbb/trunk@4343 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
76ace1d154
commit
b723058fb0
7 changed files with 978 additions and 792 deletions
File diff suppressed because it is too large
Load diff
|
@ -1348,8 +1348,10 @@ function page_header($page_title = '')
|
||||||
'S_DISPLAY_MEMBERLIST' => (isset($auth)) ? $auth->acl_get('u_viewprofile') : 0,
|
'S_DISPLAY_MEMBERLIST' => (isset($auth)) ? $auth->acl_get('u_viewprofile') : 0,
|
||||||
|
|
||||||
'T_THEME_PATH' => 'styles/' . $user->theme['primary']['theme_path'] . '/theme/',
|
'T_THEME_PATH' => 'styles/' . $user->theme['primary']['theme_path'] . '/theme/',
|
||||||
'T_STYLESHEET_LINK' => (!$user->theme['primary']['css_storedb']) ? 'styles/' . $user->theme['primary']['theme_path'] . '/theme/stylesheet.css' : "style.$phpEx?sid=$user->session_id&id=" . $user->theme['primary']['theme_id'],
|
'T_TEMPLATE_PATH' => 'styles/' . $user->theme['primary']['template_path'] . 'template/',
|
||||||
'T_THEME_DATA' => (!$user->theme['primary']['css_storedb']) ? '' : $user->theme['primary']['css_data'])
|
'T_IMAGESET_PATH' => 'styles/' . $user->theme['primary']['imageset_path'] . 'imageset/',
|
||||||
|
'T_STYLESHEET_LINK' => (!$user->theme['primary']['theme_storedb']) ? 'styles/' . $user->theme['primary']['theme_path'] . '/theme/stylesheet.css' : "style.$phpEx?sid=$user->session_id&id=" . $user->theme['primary']['theme_id'],
|
||||||
|
'T_THEME_DATA' => (!$user->theme['primary']['theme_storedb']) ? '' : $user->theme['primary']['theme_data'])
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!empty($config['send_encoding']))
|
if (!empty($config['send_encoding']))
|
||||||
|
@ -1368,15 +1370,6 @@ function page_footer()
|
||||||
{
|
{
|
||||||
global $db, $config, $template, $SID, $user, $auth, $cache, $starttime, $phpEx;
|
global $db, $config, $template, $SID, $user, $auth, $cache, $starttime, $phpEx;
|
||||||
|
|
||||||
// Close our DB connection.
|
|
||||||
$db->sql_close();
|
|
||||||
|
|
||||||
// Unload cache
|
|
||||||
if (!empty($cache))
|
|
||||||
{
|
|
||||||
$cache->unload();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Output page creation time
|
// Output page creation time
|
||||||
if (defined('DEBUG'))
|
if (defined('DEBUG'))
|
||||||
{
|
{
|
||||||
|
@ -1407,6 +1400,15 @@ function page_footer()
|
||||||
);
|
);
|
||||||
|
|
||||||
$template->display('body');
|
$template->display('body');
|
||||||
|
|
||||||
|
// Close our DB connection.
|
||||||
|
$db->sql_close();
|
||||||
|
|
||||||
|
// Unload cache
|
||||||
|
if (!empty($cache))
|
||||||
|
{
|
||||||
|
$cache->unload();
|
||||||
|
}
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,15 +165,13 @@ function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
|
||||||
|
|
||||||
while ($fname = readdir($dh))
|
while ($fname = readdir($dh))
|
||||||
{
|
{
|
||||||
if (is_file($rootdir . $dir . '/' . $fname) &&
|
if (is_file("$rootdir$dir/$fname") && filesize("$rootdir$dir/$fname") && preg_match('#\.' . $type . '$#i', $fname))
|
||||||
preg_match('#\.' . $type . '$#i', $fname) &&
|
|
||||||
filesize($rootdir . $dir . '/' . $fname))
|
|
||||||
{
|
{
|
||||||
$matches[$dir][] = $fname;
|
$matches[$dir][] = $fname;
|
||||||
}
|
}
|
||||||
else if ($fname{0} != '.' && is_dir($rootdir . $dir . '/' . $fname))
|
else if ($fname{0} != '.' && is_dir("$rootdir$dir/$fname"))
|
||||||
{
|
{
|
||||||
$matches += filelist($rootdir, $dir . '/'. $fname, $type);
|
$matches += filelist($rootdir, "$dir/$fname", $type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -461,8 +461,6 @@ class user extends session
|
||||||
include($this->lang_path . '/' . $lang_set . '.' . $phpEx);
|
include($this->lang_path . '/' . $lang_set . '.' . $phpEx);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
// TODO ?
|
|
||||||
// Cheat
|
|
||||||
if (!empty($_GET['style']) && $auth->acl_get('a_styles'))
|
if (!empty($_GET['style']) && $auth->acl_get('a_styles'))
|
||||||
{
|
{
|
||||||
global $SID;
|
global $SID;
|
||||||
|
|
|
@ -70,13 +70,13 @@ class template
|
||||||
|
|
||||||
if (file_exists($phpbb_root_path . 'styles/' . $user->theme['primary']['template_path'] . '/template'))
|
if (file_exists($phpbb_root_path . 'styles/' . $user->theme['primary']['template_path'] . '/template'))
|
||||||
{
|
{
|
||||||
// $this->tpl = 'primary';
|
$this->tpl = 'primary';
|
||||||
$this->root = $phpbb_root_path . 'styles/' . $user->theme['primary']['template_path']. '/template';
|
$this->root = $phpbb_root_path . 'styles/' . $user->theme['primary']['template_path']. '/template';
|
||||||
$this->cachepath = $phpbb_root_path . 'cache/tpl_' . $user->theme['primary']['template_path'] . '_';
|
$this->cachepath = $phpbb_root_path . 'cache/tpl_' . $user->theme['primary']['template_path'] . '_';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// $this->tpl = 'secondary';
|
$this->tpl = 'secondary';
|
||||||
$this->root = $phpbb_root_path . 'styles/' . $user->theme['secondary']['template_path']. '/template';
|
$this->root = $phpbb_root_path . 'styles/' . $user->theme['secondary']['template_path']. '/template';
|
||||||
$this->cachepath = $phpbb_root_path . 'cache/tpl_' . $user->theme['secondary']['template_path'] . '_';
|
$this->cachepath = $phpbb_root_path . 'cache/tpl_' . $user->theme['secondary']['template_path'] . '_';
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ class template
|
||||||
// Load a compiled template if possible, if not, recompile it
|
// Load a compiled template if possible, if not, recompile it
|
||||||
function _tpl_load(&$handle)
|
function _tpl_load(&$handle)
|
||||||
{
|
{
|
||||||
global $phpEx, $user;
|
global $phpEx, $user, $db;
|
||||||
|
|
||||||
$filename = $this->cachepath . $this->filename[$handle] . '.' . (($this->static_lang) ? $user->data['user_lang'] . '.' : '') . $phpEx;
|
$filename = $this->cachepath . $this->filename[$handle] . '.' . (($this->static_lang) ? $user->data['user_lang'] . '.' : '') . $phpEx;
|
||||||
|
|
||||||
|
@ -165,28 +165,80 @@ class template
|
||||||
|
|
||||||
if (!file_exists($this->files[$handle]))
|
if (!file_exists($this->files[$handle]))
|
||||||
{
|
{
|
||||||
// $this->tpl = 'secondary';
|
$this->tpl = 'secondary';
|
||||||
$this->files[$handle] = $phpbb_root_path . 'styles/' . $user->theme['secondary']['template_path'] . '/template/' . $this->filename[$handle];
|
$this->files[$handle] = $phpbb_root_path . 'styles/' . $user->theme['secondary']['template_path'] . '/template/' . $this->filename[$handle];
|
||||||
}
|
}
|
||||||
|
|
||||||
$str = '';
|
$str = '';
|
||||||
|
if ($user->theme[$this->tpl]['template_storedb'])
|
||||||
|
{
|
||||||
|
$sql = 'SELECT * FROM ' . STYLES_TPLDATA_TABLE . '
|
||||||
|
WHERE template_id = ' . $user->theme[$this->tpl]['template_id'] . "
|
||||||
|
AND (template_filename = '" . $db->sql_escape($this->filename[$handle]) . "'
|
||||||
|
OR template_included LIKE '%" . $db->sql_escape($this->filename[$handle]) . ":%')";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
if ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if ($row['template_mtime'] < filemtime($phpbb_root_path . 'styles/' . $user->theme[$this->tpl]['template_path'] . '/template/' . $row['template_filename']))
|
||||||
|
{
|
||||||
|
if ($row['template_filename'] == $this->filename[$handle])
|
||||||
|
{
|
||||||
|
$this->_tpl_load_file($handle);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->files[$row['template_filename']] = $this->root . '/' . $row['template_filename'];
|
||||||
|
$this->_tpl_load_file($row['template_filename']);
|
||||||
|
unset($this->compiled_code[$row['template_filename']]);
|
||||||
|
unset($this->files[$row['template_filename']]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($row['template_filename'] == $this->filename[$handle])
|
||||||
|
{
|
||||||
|
$this->compiled_code[$handle] = $this->compile(trim($row['template_data']));
|
||||||
|
$this->compile_write($handle, $this->compiled_code[$handle]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Only bother compiling if it doesn't already exist
|
||||||
|
if (!file_exists($this->cachepath . $row['template_filename'] . '.' . (($this->static_lang) ? $user->data['user_lang'] . '.' : '') . $phpEx))
|
||||||
|
{
|
||||||
|
$this->filename[$row['template_filename']] = $row['template_filename'];
|
||||||
|
$this->compile_write($row['template_filename'], $this->compile(trim($row['template_data'])));
|
||||||
|
unset($this->filename[$row['template_filename']]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while ($row = $db->sql_fetchrow($result));
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->_tpl_load_file($handle);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load template source from file
|
||||||
|
function _tpl_load_file($handle)
|
||||||
|
{
|
||||||
// Try and open template for read
|
// Try and open template for read
|
||||||
if (!($fp = @fopen($this->files[$handle], 'r')))
|
if (!($fp = @fopen($this->files[$handle], 'r')))
|
||||||
{
|
{
|
||||||
trigger_error("template->_tpl_load(): File $filename does not exist or is empty", E_USER_ERROR);
|
trigger_error("template->_tpl_load(): File $filename does not exist or is empty", E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
$str = @fread($fp, filesize($this->files[$handle]));
|
$this->compiled_code[$handle] = $this->compile(trim(@fread($fp, filesize($this->files[$handle]))));
|
||||||
@fclose($fp);
|
@fclose($fp);
|
||||||
|
|
||||||
// Actually compile the code now.
|
// Actually compile the code now.
|
||||||
$this->compiled_code[$handle] = $this->compile(trim($str));
|
|
||||||
$this->compile_write($handle, $this->compiled_code[$handle]);
|
$this->compile_write($handle, $this->compiled_code[$handle]);
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Assign key variable pairs from an array
|
// Assign key variable pairs from an array
|
||||||
function assign_vars($vararray)
|
function assign_vars($vararray)
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,9 +60,10 @@ $lang = array_merge($lang, array(
|
||||||
'GROUP_CAT' => 'Usergroups',
|
'GROUP_CAT' => 'Usergroups',
|
||||||
'CREATE' => 'Create',
|
'CREATE' => 'Create',
|
||||||
|
|
||||||
'LOG_CAT' => 'Logging',
|
'LOG_CAT' => 'Logging',
|
||||||
'ADMIN_LOGS'=> 'Admin Log',
|
'ADMIN_LOGS' => 'Admin Log',
|
||||||
'MOD_LOGS' => 'Moderator Log',
|
'MOD_LOGS' => 'Moderator Log',
|
||||||
|
'CRITICAL_LOGS' => 'Error Log',
|
||||||
|
|
||||||
'POST_CAT' => 'Posting',
|
'POST_CAT' => 'Posting',
|
||||||
'SMILE' => 'Smilies',
|
'SMILE' => 'Smilies',
|
||||||
|
@ -927,10 +928,21 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'TEMPLATES' => 'Templates',
|
'TEMPLATES' => 'Templates',
|
||||||
'TEMPLATES_EXPLAIN' => 'A Template set comprises all the markup used to generate the layout of your board. Here you can edit existing template sets, delete, export, import and preview sets. You can also modify the templating code used to generate BBCode.',
|
'TEMPLATES_EXPLAIN' => 'A Template set comprises all the markup used to generate the layout of your board. Here you can edit existing template sets, delete, export, import and preview sets. You can also modify the templating code used to generate BBCode.',
|
||||||
'EDIT_TEMPLATE' => 'Edit Template',
|
'EDIT_TEMPLATE' => 'Edit Template',
|
||||||
'EDIT_TEMPLATE_EXPLAIN' => 'Use this panel to edit an existing compiled template set. When you have made the required changes you can recompile the template and (or) download it. Please remember that the existing HTML templates are <b>not</b> altered, only the compiled versions are affected. Therefore you should download any altered files if you wish to keep them for future use and for archival purposes.',
|
'EDIT_TEMPLATE_EXPLAIN' => 'Use this panel to edit an existing compiled template set. When you have made the required changes you can recompile the template and (or) download it. Please remember that the existing HTML templates are <b>not</b> altered, only the compiled versions are affected. Therefore you should download any altered files if you wish to keep them for future use and for archival purposes.',
|
||||||
'TEMPLATE_NAME' => 'Template name',
|
'ADD_TEMPLATE' => 'Create Template',
|
||||||
'SELECT_TEMPLATE' => 'Select template',
|
'ADD_TEMPLATE_EXPLAIN' => 'Here you can add a new template. Depending on your server configuration and file permissions you may have additional options here. For example you may be able to base this template set on an existing one. You may also be able to upload or import (from the store directory) a template archive. If you upload or import an archive the template name can be optionally taken from the archive name (to do this leave the template name blank).',
|
||||||
|
'INSTALL_TEMPLATE' => 'Install Template',
|
||||||
|
'INSTALL_TEMPLATE_EXPLAIN' => 'Here you can install a new template set. Depending on your server configuration you may have a number of options here.',
|
||||||
|
'TEMPLATE_NAME' => 'Template name',
|
||||||
|
'SELECT_TEMPLATE' => 'Select template',
|
||||||
|
'TEMPLATE_EXISTING_BASIS' => 'Use existing template as basis',
|
||||||
|
'TEMPLATE_UPLOAD_BASIS' => 'Upload a template',
|
||||||
|
'TEMPLATE_IMPORT_BASIS' => 'Import template from store',
|
||||||
|
'TEMPLATE_LOCATION' => 'Store templates in',
|
||||||
|
'TEMPLATE_LOCATION_EXPLAIN' => 'Images are always stored on the filesystem.',
|
||||||
|
|
||||||
|
|
||||||
'TEMPLATE_CACHE' => 'Template Cache',
|
'TEMPLATE_CACHE' => 'Template Cache',
|
||||||
'TEMPLATE_CACHE_EXPLAIN'=> 'By default phpBB caches the compiled version of its templates. This decreases the load on the server each time a page is viewed and thus may reduce the page generation time. Here you can view the cache status of each file and delete individual files or the entire cache.',
|
'TEMPLATE_CACHE_EXPLAIN'=> 'By default phpBB caches the compiled version of its templates. This decreases the load on the server each time a page is viewed and thus may reduce the page generation time. Here you can view the cache status of each file and delete individual files or the entire cache.',
|
||||||
'CACHE_FILENAME' => 'Template file',
|
'CACHE_FILENAME' => 'Template file',
|
||||||
|
@ -949,21 +961,32 @@ $lang = array_merge($lang, array(
|
||||||
'TEMPLATE_DELETED_FS' => 'Template set removed from database but some files may remain on the filesystem',
|
'TEMPLATE_DELETED_FS' => 'Template set removed from database but some files may remain on the filesystem',
|
||||||
'ONLY_TEMPLATE' => 'This is the only remaining template set, you cannot delete it',
|
'ONLY_TEMPLATE' => 'This is the only remaining template set, you cannot delete it',
|
||||||
|
|
||||||
'ERR_TPLCACHE_READ' => 'Cannot read the cache directory',
|
'TEMPLATE_ERR_STYLE_NAME' => 'You must supply a name for this templates',
|
||||||
'NO_CACHED_TPL_FILES' => 'No cached files for this template',
|
'TEMPLATE_ERR_NAME_CHARS' => 'The template name can only contain alphanumeric characters, -, +, _ and space',
|
||||||
|
'TEMPLATE_ERR_NAME_LONG' => 'The template name can be no longer than 30 characters',
|
||||||
|
'TEMPLATE_ERR_NAME_EXIST' => 'A template set with that name already exists',
|
||||||
|
'TEMPLATE_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters',
|
||||||
|
'TEMPLATE_ERR_ARCHIVE' => 'Please select an archive method',
|
||||||
|
'TEMPLATE_ERR_NOT_TEMPLATE' => 'The archive you specified does not contain a valid template set.',
|
||||||
|
'ERR_TPLCACHE_READ' => 'Cannot read the cache directory',
|
||||||
|
'NO_CACHED_TPL_FILES' => 'No cached files for this template',
|
||||||
|
|
||||||
|
|
||||||
'DOWNLOAD_STORE' => 'Download or Store archive',
|
'DOWNLOAD_STORE' => 'Download or Store archive',
|
||||||
'DOWNLOAD_STORE_EXPLAIN'=> 'You may directly download the archive or save it in your store/ folder.',
|
'DOWNLOAD_STORE_EXPLAIN'=> 'You may directly download the archive or save it in your store/ folder.',
|
||||||
'ARCHIVE_FORMAT' => 'Archive file type',
|
'ARCHIVE_FORMAT' => 'Archive file type',
|
||||||
'SELECT_BASIS' => 'Select optional basis',
|
'ALLOWED_FILETYPES' => 'Allowed filetypes',
|
||||||
'CACHE' => 'Cache',
|
'SELECT_BASIS' => 'Select optional basis',
|
||||||
'EXPORT' => 'Export',
|
'COPYRIGHT' => 'Copyright',
|
||||||
'DETAILS' => 'Details',
|
'CACHE' => 'Cache',
|
||||||
'NO_IMAGESET' => 'Cannot find imageset on filesystem',
|
'EXPORT' => 'Export',
|
||||||
'NO_THEME' => 'Cannot find theme on filesystem',
|
'DETAILS' => 'Details',
|
||||||
'NO_TEMPLATE' => 'Cannot find template on filesystem',
|
'REFRESH' => 'Refresh',
|
||||||
'NO_STYLE' => 'Cannot find style on filesystem',
|
'NO_IMAGESET' => 'Cannot find imageset on filesystem',
|
||||||
|
'NO_THEME' => 'Cannot find theme on filesystem',
|
||||||
|
'NO_TEMPLATE' => 'Cannot find template on filesystem',
|
||||||
|
'NO_STYLE' => 'Cannot find style on filesystem',
|
||||||
|
'UPLOAD_WRONG_TYPE' => 'Only the following filetypes are accepted: %s',
|
||||||
|
|
||||||
|
|
||||||
'THEMES' => 'Themes',
|
'THEMES' => 'Themes',
|
||||||
|
@ -971,20 +994,33 @@ $lang = array_merge($lang, array(
|
||||||
'SELECT_THEME_BASIS' => 'Select optional basis',
|
'SELECT_THEME_BASIS' => 'Select optional basis',
|
||||||
'THEME_VERSION_DIFF' => 'This theme was designed for a version of phpBB 2.2 different from that installed you may encounter some issues in its use.',
|
'THEME_VERSION_DIFF' => 'This theme was designed for a version of phpBB 2.2 different from that installed you may encounter some issues in its use.',
|
||||||
|
|
||||||
'DELETE_THEME' => 'Delete Theme',
|
'DELETE_THEME' => 'Delete theme',
|
||||||
'DELETE_THEME_EXPLAIN' => 'Here you can remove the selected theme from the database. Additionally, if you have permission you can elect to remove the theme from the filesystem. Please note that there is no undo capability. When the theme is deleted it is gone for good. It is recommended that you first export your theme for possible future use.',
|
'DELETE_THEME_EXPLAIN' => 'Here you can remove the selected theme from the database. Additionally, if you have permission you can elect to remove the theme from the filesystem. Please note that there is no undo capability. When the theme is deleted it is gone for good. It is recommended that you first export your theme for possible future use.',
|
||||||
'THEME_DELETED' => 'Theme deleted successfully',
|
'THEME_DELETED' => 'Theme deleted successfully',
|
||||||
'THEME_DELETED_FS' => 'Theme removed from database but some files may remain on the filesystem',
|
'THEME_DELETED_FS' => 'Theme removed from database but some files may remain on the filesystem',
|
||||||
'ONLY_THEME' => 'This is the only remaining theme, you cannot delete it',
|
'ONLY_THEME' => 'This is the only remaining theme, you cannot delete it',
|
||||||
|
|
||||||
'EDIT_THEME' => 'Edit Theme',
|
'EDIT_THEME' => 'Edit theme',
|
||||||
'EDIT_THEME_EXPLAIN' => 'Here you can edit the selected theme, changing colours, images, etc. You can switch between a simplified interface where you can set basic colours, etc. and a more advanced "raw CSS" mode. Using the raw mode you can style additional CSS elements such as borders, etc. You only need set the parameters you need, e.g. if you do not want a background image leave that parameter unset. You may also add additional "custom" classes should your template or style make use of them.',
|
'EDIT_THEME_EXPLAIN' => 'Here you can edit the selected theme, changing colours, images, etc. You can switch between a simplified interface where you can set basic colours, etc. and a more advanced "raw CSS" mode. Using the raw mode you can style additional CSS elements such as borders, etc. You only need set the parameters you need, e.g. if you do not want a background image leave that parameter unset. You may also add additional "custom" classes should your template or style make use of them.',
|
||||||
|
|
||||||
|
'EDIT_DETAILS_THEME' => 'Edit theme details',
|
||||||
|
'EDIT_DETAILS_THEME_EXPLAIN'=> 'Here you can edit certain theme details such as changing its name. You may also be able to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your stylesheet can be written to by the webserver.',
|
||||||
|
'ADD_THEME' => 'Create Theme',
|
||||||
|
'ADD_THEME_EXPLAIN' => 'Here you can add a new theme. Depending on your server configuration and file permissions you may have additional options here. For example you may be able to base this theme on an existing one. You may also be able to upload or import (from the store directory) a theme archive. If you upload or import an archive the theme name can be optionally taken from the archive name (to do this leave the theme name blank).',
|
||||||
|
'INSTALL_THEME' => 'Install Theme',
|
||||||
|
'INSTALL_THEME_EXPLAIN' => 'Here you can edit the selected theme, changing colours, images, etc. You can switch between a simplified interface where you can set basic colours, etc. and a more advanced "raw CSS" mode. Using the raw mode you can style additional CSS elements such as borders, etc. You only need set the parameters you need, e.g. if you do not want a background image leave that parameter unset. You may also add additional "custom" classes should your template or style make use of them.',
|
||||||
'THEME_NAME' => 'Theme Name',
|
'THEME_NAME' => 'Theme Name',
|
||||||
|
'THEME_BASIS' => 'Theme Basis',
|
||||||
|
'THEME_EXISTING_BASIS' => 'Use existing theme as basis',
|
||||||
|
'THEME_UPLOAD_BASIS' => 'Upload a theme',
|
||||||
|
'THEME_IMPORT_BASIS' => 'Import theme from store',
|
||||||
|
'THEME_LOCATION' => 'Store stylesheet in',
|
||||||
|
'THEME_LOCATION_EXPLAIN'=> 'Images are always stored on the filesystem.',
|
||||||
|
|
||||||
'SELECT_CLASS' => 'Select class',
|
'SELECT_CLASS' => 'Select class',
|
||||||
'SHOW_RAW_CSS' => 'Show CSS',
|
'SHOW_RAW_CSS' => 'Show CSS',
|
||||||
'HIDE_RAW_CSS' => 'Hide CSS',
|
'HIDE_RAW_CSS' => 'Hide CSS',
|
||||||
'SHOW_RAW_CSS_EXPLAIN' => 'Enter each element on a new line, ending with a ; Expand the data for each element, e.g. do not use font: use font-family:, font-weight:, etc.',
|
'SHOW_RAW_CSS_EXPLAIN' => 'Enter each element on a new line, ending with a ; Expand the data for each element, e.g. do not use font: use font-family:, font-weight:, etc.',
|
||||||
|
|
||||||
'CSS_CAT_TEXT' => 'Text Classes',
|
'CSS_CAT_TEXT' => 'Text Classes',
|
||||||
'CSS_BODY' => 'Body',
|
'CSS_BODY' => 'Body',
|
||||||
'CSS_P' => 'Paragraph',
|
'CSS_P' => 'Paragraph',
|
||||||
|
@ -1057,6 +1093,7 @@ $lang = array_merge($lang, array(
|
||||||
'THEME_ERR_NAME_EXIST' => 'A theme with that name already exists',
|
'THEME_ERR_NAME_EXIST' => 'A theme with that name already exists',
|
||||||
'THEME_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters',
|
'THEME_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters',
|
||||||
'THEME_ERR_ARCHIVE' => 'Please select an archive method',
|
'THEME_ERR_ARCHIVE' => 'Please select an archive method',
|
||||||
|
'THEME_ERR_NOT_THEME' => 'The archive you specified does not contain a valid theme.',
|
||||||
|
|
||||||
'THEME_UPDATED' => 'Theme updated successfully',
|
'THEME_UPDATED' => 'Theme updated successfully',
|
||||||
'THEME_DB_ADDED' => 'New theme added to database',
|
'THEME_DB_ADDED' => 'New theme added to database',
|
||||||
|
|
|
@ -67,7 +67,7 @@ if (!empty($_GET['id']) && !empty($_GET['sid']))
|
||||||
|
|
||||||
if ($db->sql_fetchrow($result))
|
if ($db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$sql = "SELECT css_data
|
$sql = "SELECT theme_data
|
||||||
FROM {$table_prefix}styles_theme
|
FROM {$table_prefix}styles_theme
|
||||||
WHERE theme_id = $id";
|
WHERE theme_id = $id";
|
||||||
$result2 = $db->sql_query($sql, 300);
|
$result2 = $db->sql_query($sql, 300);
|
||||||
|
@ -75,9 +75,9 @@ if (!empty($_GET['id']) && !empty($_GET['sid']))
|
||||||
if ($row = $db->sql_fetchrow($result2))
|
if ($row = $db->sql_fetchrow($result2))
|
||||||
{
|
{
|
||||||
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 3600));
|
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 3600));
|
||||||
//header('Content-type: text/css');
|
header('Content-type: text/css');
|
||||||
|
|
||||||
echo $row['css_data'];
|
echo $row['theme_data'];
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result2);
|
$db->sql_freeresult($result2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue