[Customisation Database Commits] r1096 - /trunk/titania/includes/overlords/posts.php
Nathan Guse
exreaction at phpbb.com
Tue Apr 20 03:04:10 BST 2010
Author: exreaction
Date: Tue Apr 20 03:04:10 2010
New Revision: 1096
Log:
This should output CP Fields for viewtopic
Modified:
trunk/titania/includes/overlords/posts.php
Modified: trunk/titania/includes/overlords/posts.php
==============================================================================
*** trunk/titania/includes/overlords/posts.php (original)
--- trunk/titania/includes/overlords/posts.php Tue Apr 20 03:04:10 2010
***************
*** 314,327 ****
--- 314,345 ----
$message = $post->generate_text_for_display();
$parsed_attachments = $attachments->parse_attachments($message);
+ // Build CP Fields
+ $cp_row = array();
+ if (isset(users_overlord::$cp_fields[$post->post_user_id]))
+ {
+ $cp_row = $cp->generate_profile_fields_template('show', false, users_overlord::$cp_fields[$post->post_user_id]);
+ }
+ $cp_row['row'] = (isset($cp_row['row']) && sizeof($cp_row['row'])) ? $cp_row['row'] : array();
+
phpbb::$template->assign_block_vars('posts', array_merge(
$post->assign_details(false),
users_overlord::assign_details($post->post_user_id),
+ $cp_row['row'],
array(
'POST_TEXT' => $message,
'S_FIRST_UNREAD' => ($post->post_time >= $last_mark_time && $prev_post_time <= $last_mark_time) ? true : false,
)
));
+
+ // Output CP Fields
+ if (!empty($cp_row['blockrow']))
+ {
+ foreach ($cp_row['blockrow'] as $field_data)
+ {
+ $template->assign_block_vars('posts.custom_fields', $field_data);
+ }
+ }
//S_IGNORE_POST
//POST_ICON_IMG
//MINI_POST_IMG
More information about the customisationdb-commits
mailing list