1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 17:56:52 +02:00

- birthdays/age in user's timezone and not server's local time

- parse bbcode in posts with fewer characters than selected maximum on search results page
- retrieve search word context in posts which are longer than maximum characters (no raw BBCode anymore)
- formatted text is processed in the same order everywhere now: censor_text, replace newlines, bbcode, smileys, attachments, highlighting [including Bug #2048]
- highlighting pattern updated to exclude style and script (e.g custom BBCode) [Bug #3856]
- fixed a style problem in Opera [Bug #3770]
- performance increase for user::img()
- slight adjustments to search


git-svn-id: file:///svn/phpbb/trunk@6321 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann
2006-08-28 17:20:21 +00:00
parent 1d37b69ddd
commit c0a880b665
16 changed files with 293 additions and 71 deletions

View File

@@ -1340,13 +1340,15 @@ class user extends session
static $imgs;
global $phpbb_root_path;
if (empty($imgs[$img . $suffix]) || $width !== false)
$img_data = $imgs[$img . $suffix];
if (empty($img_data) || $width !== false)
{
if (!isset($this->theme[$img]) || !$this->theme[$img])
{
// Do not fill the image to let designers decide what to do if the image is empty
$imgs[$img . $suffix] = '';
return $imgs[$img . $suffix];
$img_data = '';
return $img_data;
}
// Do not include dimensions?
@@ -1372,9 +1374,9 @@ class user extends session
$imgsrc = str_replace('{SUFFIX}', $suffix, $imgsrc);
}
$imgs[$img . $suffix]['src'] = $phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . str_replace('{LANG}', $this->img_lang, $imgsrc);
$imgs[$img . $suffix]['width'] = $width;
$imgs[$img . $suffix]['height'] = $height;
$img_data['src'] = $phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . str_replace('{LANG}', $this->img_lang, $imgsrc);
$img_data['width'] = $width;
$img_data['height'] = $height;
}
$alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt;
@@ -1382,19 +1384,19 @@ class user extends session
switch ($type)
{
case 'src':
return $imgs[$img . $suffix]['src'];
return $img_data['src'];
break;
case 'width':
return $imgs[$img . $suffix]['width'];
return $img_data['width'];
break;
case 'height':
return $imgs[$img . $suffix]['height'];
return $img_data['height'];
break;
default:
return '<img src="' . $imgs[$img . $suffix]['src'] . '"' . (($imgs[$img . $suffix]['width']) ? ' width="' . $imgs[$img . $suffix]['width'] . '"' : '') . (($imgs[$img . $suffix]['height']) ? ' height="' . $imgs[$img . $suffix]['height'] . '"' : '') . ' alt="' . $alt . '" title="' . $alt . '" />';
return '<img src="' . $img_data['src'] . '"' . (($img_data['width']) ? ' width="' . $img_data['width'] . '"' : '') . (($img_data['height']) ? ' height="' . $img_data['height'] . '"' : '') . ' alt="' . $alt . '" title="' . $alt . '" />';
break;
}
}