So, I think I have a problem with my Index_Body.tpl page.. Can someone help??

Discussion in 'PHP' started by OfficialDebate, Jan 21, 2008.

  1. #1
    So, I have slight cosmetic issues at my forum and I have don't know how to fix it. The first thing is that the category names are not showing up unless you scroll over the area where it is hidden. Secondly, the dark blue background where the category name is supposed to appear stops before the end of the page. The code for the page is below. Any help / suggestions??? I am a beginner and don't know what to do..
    
    <table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
      <tr> 
    	<td align="left" valign="bottom"><span class="gensmall">
    	<!-- BEGIN switch_user_logged_in -->
    	{LAST_VISIT_DATE}<br />
    	<!-- END switch_user_logged_in -->
    	{CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
    	<td align="right" valign="bottom" class="gensmall">
    		<!-- BEGIN switch_user_logged_in -->
    		<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
    		<!-- END switch_user_logged_in -->
    		<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
      </tr>
    </table>
    
    <!-- BEGINONLY -->
    <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
      <tr> 
    	<th colspan="2" class="thCornerL" height="28" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
    	<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
    	<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
    	<th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
      </tr>
      <!-- BEGIN catrow -->
    <!-- BEGIN cat -->
      <tr> 
    	<td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
    	<td class="rowpic" colspan="3" align="right">&nbsp;</td>
      </tr>
    <!-- END cat -->
      <!-- BEGIN forumrow -->
      <tr> 
       <td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td> 
       <td class="row2" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br/> 
         </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br/> 
         </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}<br/></span>
    <!-- BEGIN sub -->
    <span class="gensmall"><b>{L_SUBFORUMS}:</b>
    <!-- BEGIN item -->
    <a href="{catrow.forumrow.sub.item.U_LAST_POST}" title="{catrow.forumrow.sub.item.L_LAST_POST}"><img src="{catrow.forumrow.sub.item.FORUM_FOLDER_IMG}" border="0" alt="{catrow.forumrow.sub.item.L_FORUM_FOLDER_ALT}" /></a>&nbsp;<a href="{catrow.forumrow.sub.item.U_VIEWFORUM}" title="{catrow.forumrow.sub.item.FORUM_DESC_HTML}">{catrow.forumrow.sub.item.FORUM_NAME}</a>{catrow.forumrow.sub.item.L_SEP}
    <!-- END item -->
    </span>
    <!-- END sub -->
    </td>
    	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
    	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
    	<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
      </tr>
      <!-- END forumrow -->
      <!-- END catrow -->
    </table>
    <!-- ENDONLY -->
    
    <table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
      <tr> 
     	<td align="left">
     	<!-- BEGIN switch_user_logged_in -->
     		<span class="gensmall"><a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a></span>
     	<!-- END switch_user_logged_in -->
     	</td>
    	<td align="right"><span class="gensmall">{S_TIMEZONE}</span></td>
      </tr>
    </table>
    
    <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
      <tr> 
    	<td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="{U_VIEWONLINE}" class="cattitle">{L_WHO_IS_ONLINE}</a></span></td>
      </tr>
      <tr> 
    	<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/Lustrous_Fluid/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
    	<td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
    	</td>
      </tr>
      <tr> 
    	<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
      </tr>
    </table>
    
    <table width="100%" cellpadding="1" cellspacing="1" border="0">
    <tr>
    	<td align="left" valign="top"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
    </tr>
    </table>
    <!-- BEGIN switch_user_logged_out -->
    <form method="post" action="{S_LOGIN_ACTION}">
      <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
    	<tr> 
    	  <td class="catHead" height="28"><a name="login"></a><span class="cattitle">{L_LOGIN_LOGOUT}</span></td>
    	</tr>
    	<tr> 
    	  <td class="row1" align="center" valign="middle" height="28"><span class="gensmall">{L_USERNAME}: 
    		<input class="post" type="text" name="username" size="10" />
    		&nbsp;&nbsp;&nbsp;{L_PASSWORD}: 
    		<input class="post" type="password" name="password" size="10" maxlength="32" />
    		<!-- BEGIN switch_allow_autologin -->
    		&nbsp;&nbsp; &nbsp;&nbsp;{L_AUTO_LOGIN} 
    		<input class="text" type="checkbox" name="autologin" />
    		<!-- END switch_allow_autologin -->
    		&nbsp;&nbsp;&nbsp; 
    		<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
    		</span> </td>
    	</tr>
      </table>
    </form>
    <!-- END switch_user_logged_out -->
    
    <!-- BEGINONLY -->
    <br clear="all" />
    <!-- ENDONLY -->
    
    <table cellspacing="3" border="0" align="center" cellpadding="0">
      <tr> 
    	<td width="20" align="center"><img src="templates/Lustrous_Fluid/images/folder_new_big.gif" alt="{L_NEW_POSTS}"/></td>
    	<td><span class="gensmall">{L_NEW_POSTS}</span></td>
    	<td>&nbsp;&nbsp;</td>
    	<td width="20" align="center"><img src="templates/Lustrous_Fluid/images/folder_big.gif" alt="{L_NO_NEW_POSTS}" /></td>
    	<td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
    	<td>&nbsp;&nbsp;</td>
    	<td width="20" align="center"><img src="templates/Lustrous_Fluid/images/folder_locked_big.gif" alt="{L_FORUM_LOCKED}" /></td>
    	<td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
      </tr>
    </table>
    PHP:

     
    OfficialDebate, Jan 21, 2008 IP
  2. OfficialDebate

    OfficialDebate Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Sorry for bumping - so, nobody can help me?? I know it's so freaking simple...I just can't figure it out!! :-(
     
    OfficialDebate, Jan 22, 2008 IP
  3. mvl

    mvl Peon

    Messages:
    147
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Your template clearly shows the use of CSS but without the CSS declarations it is pretty hard to tell what is wrong. Can you post an url to the page where things go wrong?
     
    mvl, Jan 23, 2008 IP
  4. OfficialDebate

    OfficialDebate Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes, it is OfficialDebate.com - it is the Index page. It'll be pretty clear where it is not showing up properly. Basically, the category names do not appear unless you scroll over them and the background where the category name is supposed to appear does not extend all the way to the end of the page (like it does for the affiliates box). I know this is just a minor but I've been struggling to figure it out for weeks...
     
    OfficialDebate, Jan 23, 2008 IP
  5. Krnl

    Krnl Peon

    Messages:
    60
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #5
    You need to find your "cattitle" class (or a.cattitle) in your template css file and update the color to #ffffff (white). That should correct the link color on your category titles.

    As for the category cell not reaching the end of the table, my first guess would be to increase the colspan value to get the cell to reach all columns. Try the following:

    Find:
    
        <td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
    
    
    Code (markup):
    Replace with:
    
        <td class="catHead" colspan="5" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
    
    Code (markup):
    i.e. replace the colspan value of 2 with a 5.

    See if that works.
     
    Krnl, Jan 23, 2008 IP
  6. OfficialDebate

    OfficialDebate Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Krnl,

    Thank you for that. Yes, the columns thing worked. However, the color was already set to #FFFFF in the style sheet. The funny thing is that when I put the original index_body.tpl file back into the forum, everything shows properly (other than the subforums of course). But when I put the new index_body.tpl file into the forum, that is when the category names do not show up anymore. It may be that the index_body.tpl file showed above is pointing to a different place for category colors. I have no clue. That's why I'm soliciting the help of the experts here at DP! ;) Anyone have other ideas as to what could correct this?
     
    OfficialDebate, Jan 24, 2008 IP
  7. Krnl

    Krnl Peon

    Messages:
    60
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #7
    Check to see what your initial link color is set to in the css file. Are you using phpbb 2 or 3? Find the css files (links.css or colours.css) and search for default link color values, i.e.
    
    a:link   { color: #105289; }
    
    Code (markup):
    Try changing that and see if you can get the links to show up that way. Make sure to save the original color so you can put it back if it doesn't work.

    Some of the color modifications that I have made in my forums have required that I create a new CSS class in order to affect only a specific link type, as some of the colors are global for all links or all table bg colors, etc.

    If changing the overall link color doesn't work...I'm not sure what your css files look like, but if I were you, I'd concentrate on any classes called "cattitle" and look for a reference to a link color there. Then look at td.catHead class and see if there is a link color defined there as well.
     
    Krnl, Jan 24, 2008 IP
  8. OfficialDebate

    OfficialDebate Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    These settings are already defined in the CSS file. I guess I'm screwed. Oh well....thanks for your help.....
     
    OfficialDebate, Jan 26, 2008 IP