[Customisation Database Commits] r801 - in /trunk/titania: includes/tools/message.php styles/default/template/posting/posting_preview.html

Nathan Guse exreaction at phpbb.com
Sun Mar 21 00:38:05 GMT 2010


Author: exreaction
Date: Sun Mar 21 00:38:05 2010
New Revision: 801

Log:
You got attachments in my preview

Modified:
    trunk/titania/includes/tools/message.php
    trunk/titania/styles/default/template/posting/posting_preview.html

Modified: trunk/titania/includes/tools/message.php
==============================================================================
*** trunk/titania/includes/tools/message.php (original)
--- trunk/titania/includes/tools/message.php Sun Mar 21 00:38:05 2010
***************
*** 288,299 ****
--- 288,316 ----
  		//$request_data = $this->request_data();
  		//$this->post_object->generate_text_for_storage($request_data['bbcode_enabled'], $request_data['magic_url_enabled'], $request_data['smilies_enabled']);
  
+ 		$message = $this->post_object->generate_text_for_display();
+ 
+ 		if ($this->attachments)
+ 		{
+ 			$parsed_attachments = $this->attachments->parse_attachments($message);
+ 		}
+ 
  		phpbb::$template->assign_vars(array(
  			'PREVIEW_SUBJECT'		=> (isset($for_edit['subject'])) ? censor_text($for_edit['subject']) : '',
  			'PREVIEW_MESSAGE'		=> $this->post_object->generate_text_for_display(),
  
  			'S_DISPLAY_PREVIEW'		=> true,
  		));
+ 
+ 		if ($this->attachments)
+ 		{
+ 			foreach ($parsed_attachments as $attachment)
+ 			{
+ 				phpbb::$template->assign_block_vars('preview_attachment', array(
+ 					'DISPLAY_ATTACHMENT'	=> $attachment,
+ 				));
+ 			}
+ 		}
  	}
  
  	/**

Modified: trunk/titania/styles/default/template/posting/posting_preview.html
==============================================================================
*** trunk/titania/styles/default/template/posting/posting_preview.html (original)
--- trunk/titania/styles/default/template/posting/posting_preview.html Sun Mar 21 00:38:05 2010
***************
*** 5,10 ****
--- 5,19 ----
  
  		<div class="content">{PREVIEW_MESSAGE}</div>
  
+ 		<!-- IF .preview_attachment -->
+ 			<dl class="attachbox">
+ 				<dt>{L_ATTACHMENTS}</dt>
+ 				<!-- BEGIN preview_attachment -->
+ 					<dd>{preview_attachment.DISPLAY_ATTACHMENT}</dd>
+ 				<!-- END preview_attachment -->
+ 			</dl>
+ 		<!-- ENDIF -->
+ 
  		<!-- IF PREVIEW_SIGNATURE --><div class="signature">{PREVIEW_SIGNATURE}</div><!-- ENDIF -->
  	</div>
  




More information about the customisationdb-commits mailing list