1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-07 01:06:48 +02:00

- fixed some problems with themes

- added support for {IMG_NAME_SRC}, {IMG_NAME_WIDTH} and {IMG_NAME_HEIGHT}
- fulltext_native has to use group by in a few more quries


git-svn-id: file:///svn/phpbb/trunk@6254 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann
2006-08-08 19:02:44 +00:00
parent 2ed25800c5
commit c69a6f7acd
5 changed files with 136 additions and 43 deletions

View File

@@ -1080,8 +1080,33 @@ class user extends session
{
$this->theme['theme_storedb'] = 1;
$stylesheet = file_get_contents("{$phpbb_root_path}styles/{$this->theme['theme_path']}/theme/stylesheet.css");
// Match CSS imports
$matches = array();
preg_match_all('/@import url\(["\'](.*)["\']\);/i', $stylesheet, $matches);
if (sizeof($matches))
{
$content = '';
foreach ($matches[0] as $idx => $match)
{
if ($content = @file_get_contents("{$phpbb_root_path}styles/{$this->theme['theme_path']}/theme/" . $matches[1][$idx]))
{
$content = trim($content);
}
else
{
$content = '';
}
$stylesheet = str_replace($match, $content, $stylesheet);
}
unset ($content);
}
$stylesheet = str_replace('./', 'styles/' . $this->theme['theme_path'] . '/theme/', $stylesheet);
$sql_ary = array(
'theme_data' => implode('', file("{$phpbb_root_path}styles/" . $this->theme['theme_path'] . '/theme/stylesheet.css')),
'theme_data' => $stylesheet,
'theme_mtime' => time(),
'theme_storedb' => 1
);