From c3bfb1bddb96debf8425a13c0d9d084502cc338c Mon Sep 17 00:00:00 2001 From: lia <lisa@e107.org> Date: Thu, 4 Jan 2007 13:11:52 +0000 Subject: [PATCH] content; fixed template bug on the empty cell (finally, thx MrPete) --- e107_plugins/content/content.php | 11 ++++----- .../default/content_content_template.php | 23 +++++++++++-------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/e107_plugins/content/content.php b/e107_plugins/content/content.php index 97b46d96f..89929c00a 100644 --- a/e107_plugins/content/content.php +++ b/e107_plugins/content/content.php @@ -12,8 +12,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/content/content.php,v $ -| $Revision: 1.3 $ -| $Date: 2007-01-04 08:37:00 $ +| $Revision: 1.4 $ +| $Date: 2007-01-04 13:11:52 $ | $Author: lisa_ $ +---------------------------------------------------------------+ */ @@ -1334,12 +1334,11 @@ function show_content_item(){ $CONTENT_CONTENT_TABLE_INFO_POST_HEADDATA = FALSE; $CONTENT_CONTENT_TABLE_INFO_PRE = FALSE; $CONTENT_CONTENT_TABLE_INFO_POST = FALSE; - - if ($date!="" || $auth!="" || $ep!="" || $edit!="" || $par!="" || $com!="" || $score!="" || $ref!="" || $sub!="" || $rat!="" || $fil!="") { + + //if any of these exist, pre/post activate the container table + if ($ico!="" || $date!="" || $auth!="" || $ep!="" || $edit!="" || $par!="" || $com!="" || $score!="" || $ref!="" || $sub!="" || $rat!="" || $fil!="") { $CONTENT_CONTENT_TABLE_INFO_PRE = TRUE; $CONTENT_CONTENT_TABLE_INFO_POST = TRUE; - } - if($CONTENT_CONTENT_TABLE_INFO_PRE || $ico==''){ $CONTENT_CONTENT_TABLE_INFO_PRE_HEADDATA = TRUE; $CONTENT_CONTENT_TABLE_INFO_POST_HEADDATA = TRUE; } diff --git a/e107_plugins/content/templates/default/content_content_template.php b/e107_plugins/content/templates/default/content_content_template.php index b0fc41cf1..bbe772071 100644 --- a/e107_plugins/content/templates/default/content_content_template.php +++ b/e107_plugins/content/templates/default/content_content_template.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/content/templates/default/content_content_template.php,v $ -| $Revision: 1.1.1.1 $ -| $Date: 2006-12-02 04:35:09 $ -| $Author: mcfly_e107 $ +| $Revision: 1.2 $ +| $Date: 2007-01-04 13:11:52 $ +| $Author: lisa_ $ +----------------------------------------------------------------------------+ */ @@ -83,17 +83,22 @@ $sc_style['CONTENT_CONTENT_TABLE_PREV_PAGE']['post'] = "</div>"; $sc_style['CONTENT_CONTENT_TABLE_NEXT_PAGE']['pre'] = "<div style='float:right;'>"; $sc_style['CONTENT_CONTENT_TABLE_NEXT_PAGE']['post'] = "</div></div>"; +$sc_style['CONTENT_CONTENT_TABLE_INFO_PRE_HEADDATA']['pre'] = "<td style='vertical-align:top;'>"; +$sc_style['CONTENT_CONTENT_TABLE_INFO_PRE_HEADDATA']['post'] = ""; +$sc_style['CONTENT_CONTENT_TABLE_INFO_POST_HEADDATA']['pre'] = ""; +$sc_style['CONTENT_CONTENT_TABLE_INFO_POST_HEADDATA']['post'] = "</td>"; + $CONTENT_CONTENT_TABLE = "<table class='fborder' cellpadding='0' cellspacing='0' style='width:100%;'><tr><td> <div style='clear:both;'> {CONTENT_CONTENT_TABLE_INFO_PRE} {CONTENT_CONTENT_TABLE_ICON} - <td style='vertical-align:top;'> - {CONTENT_CONTENT_TABLE_SUBHEADING} - {CONTENT_CONTENT_TABLE_DATE} {CONTENT_CONTENT_TABLE_AUTHORDETAILS} {CONTENT_CONTENT_TABLE_EPICONS} {CONTENT_CONTENT_TABLE_EDITICON} {CONTENT_CONTENT_TABLE_PARENT} {CONTENT_CONTENT_TABLE_COMMENT} {CONTENT_CONTENT_TABLE_SCORE} {CONTENT_CONTENT_TABLE_REFER} - {CONTENT_CONTENT_TABLE_RATING} - {CONTENT_CONTENT_TABLE_FILE} - </td> + {CONTENT_CONTENT_TABLE_INFO_PRE_HEADDATA} + {CONTENT_CONTENT_TABLE_SUBHEADING} + {CONTENT_CONTENT_TABLE_DATE} {CONTENT_CONTENT_TABLE_AUTHORDETAILS} {CONTENT_CONTENT_TABLE_EPICONS} {CONTENT_CONTENT_TABLE_EDITICON} {CONTENT_CONTENT_TABLE_PARENT} {CONTENT_CONTENT_TABLE_COMMENT} {CONTENT_CONTENT_TABLE_SCORE} {CONTENT_CONTENT_TABLE_REFER} + {CONTENT_CONTENT_TABLE_RATING} + {CONTENT_CONTENT_TABLE_FILE} + {CONTENT_CONTENT_TABLE_INFO_POST_HEADDATA} {CONTENT_CONTENT_TABLE_INFO_POST} <div style='clear:both;'><br /></div> <table class='fborder' cellpadding='0' cellspacing='0' style='width:100%;'><tr><td class='forumheader3'>