1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-29 21:10:31 +02:00

inline attachment capability...

git-svn-id: file:///svn/phpbb/trunk@4819 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2004-02-08 18:02:17 +00:00
parent b9bf2fe751
commit d7735d2587
12 changed files with 128 additions and 30 deletions

View File

@@ -331,14 +331,15 @@ function display_forums($root_data = '', $display_moderators = TRUE)
}
// Display Attachments
function display_attachments($blockname, $attachment_data, &$update_count, $force_physical = false)
function display_attachments($blockname, $attachment_data, &$update_count, $force_physical = false, $return = false)
{
global $extensions, $template, $cache, $attachment_tpl;
global $config, $user, $phpbb_root_path, $phpEx, $SID, $censors;
// $starttime = explode(' ', microtime());
// $starttime = $starttime[1] + $starttime[0];
$return_tpl = array();
$blocks = array(WM_CAT => 'WM_STREAM', RM_CAT => 'RM_STREAM', THUMB_CAT => 'THUMBNAIL', IMAGE_CAT => 'IMAGE');
if (!isset($attachment_tpl))
@@ -428,7 +429,7 @@ function display_attachments($blockname, $attachment_data, &$update_count, $forc
// Replace {L_*} lang strings
$tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);
$template->assign_block_vars('postrow.attachment', array(
$template->assign_block_vars($blockname, array(
'SHOW_ATTACHMENT' => $tpl)
);
}
@@ -549,12 +550,20 @@ function display_attachments($blockname, $attachment_data, &$update_count, $forc
// Replace {L_*} lang strings
$tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);
$template->assign_block_vars($blockname, array(
'DISPLAY_ATTACHMENT' => $tpl)
);
if (!$return)
{
$template->assign_block_vars($blockname, array(
'DISPLAY_ATTACHMENT' => $tpl)
);
}
else
{
$return_tpl[] = $tpl;
}
}
}
return $return_tpl;
// $mtime = explode(' ', microtime());
// $totaltime = $mtime[0] + $mtime[1] - $starttime;
}