Quote:
Originally Posted by Buddha
correct me if i'm wrong (not much of a php coder)... i pieced together some code from posts here, and was hoping it would workin forumdisplay, but it doesn't... any thoughts?
basically, if more than one column, don't display the table row with the descriptions. any help would be appreciated. this is for subforums on forumdisplay.
thanks.
|
I banged my head on this for a little while myself, so I'm gonna help you out here buddy. This does exactly what you want, as you can see from my site.
At the bottom of forumhome_forumbit_level1_nopost
PHP Code:
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<if condition="$forum['subforumcolumns'] > 1">
<tr align="center">
<td colspan="2" class="thead" width="43%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead">$vbphrase[posts]</td>
<td class="thead" width="43%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead">$vbphrase[posts]</td>
</tr>
<tr>
<td class="alt1" colspan="5">
<table style="border: none; width: 100%;">
$childforumbits
</table>
</td>
</tr>
<else />
<tr align="center">
<td class="thead"> </td>
<td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="200">$vbphrase[last_post]</td>
<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>
</tr>
$childforumbits
</if>
</if>
</tbody>
And your forumhome_forumbit_columncell should look like this:
PHP Code:
<td colspan="1">
<img src="$stylevar[imgdir_statusicon]/forums/forum_$forum[forumid].gif" alt="forum_$forum[statusicon].gif" title="">
</td>
<td colspan="40">
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<div class="smallfont">$forum[description]</div>
<if condition="$show['lastpostinfo']">
<div class="smallfont" align="$stylevar[left]">
<div class="smallfont">
<a href="showthread.php?$session[sessionurl]goto=newpost&t=$lastpostinfo[lastthreadid]" title="<phrase 1="$lastpostinfo[lastthread]">$vbphrase[go_first_unread_in_thread_x]</phrase>"><strong>$lastpostuser[trimthread]</strong></a>
<phrase 1="member.php?$session[sessionurl]find=lastposter&f=$lastpostinfo[forumid]" 2="$lastpostinfo[lastposter]">last post <strong>$vbphrase[by_x]</strong></phrase>
</div>
<div align="$stylevar[right]">
$lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if>
<a href="showthread.php?$session[sessionurl]goto=lastpost&t=$lastpostinfo[lastthreadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0"></a>
</div>
</div>
<else />
$lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostuser[lastpostuser]</span></if>
</if>
<td class="alt2" colspan="15" border="0"><center>$forum[replycount]</center></td>
Note this is for a liquid style, which you appear to be using. If you want to use it with fixed width, replace the percentages with your fixed px values (315 is a good start for the "forum" cell). Play around with it.
You may also want to play around with the "width" percentages a little to tweak it to your specific style. I did mine 1% at a time until it was juuuuust right.
Enjoy.