diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2004-02-08 18:02:17 +0000 | 
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2004-02-08 18:02:17 +0000 | 
| commit | d7735d2587e68bab42fde8753ee733de76369f72 (patch) | |
| tree | dcfce4a598d89b72a8469ef4f3538a0668668bee /phpBB/includes/functions_display.php | |
| parent | b9bf2fe7519aa7aab5278fb882a139f3c823feb0 (diff) | |
| download | forums-d7735d2587e68bab42fde8753ee733de76369f72.tar forums-d7735d2587e68bab42fde8753ee733de76369f72.tar.gz forums-d7735d2587e68bab42fde8753ee733de76369f72.tar.bz2 forums-d7735d2587e68bab42fde8753ee733de76369f72.tar.xz forums-d7735d2587e68bab42fde8753ee733de76369f72.zip | |
inline attachment capability...
git-svn-id: file:///svn/phpbb/trunk@4819 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_display.php')
| -rw-r--r-- | phpBB/includes/functions_display.php | 21 | 
1 files changed, 15 insertions, 6 deletions
| diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index f66ec0d74f..3f0bee5d39 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -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;  } | 
