Separate Categories Question

This forum is now closed. Please ask all styles-related questions in the phpBB 3.0 Styles Support & Discussion Forum.
Billabong2k2
Registered User
Posts: 46
Joined: Tue Mar 19, 2002 8:52 pm

Separate Categories Question

Post by Billabong2k2 »

Hey, my forums are at
http://vginsider.com/forums/index.php

And I am using the BlueSilver template.

What I want to do is make them all seperated for each catogory. Like

GENERAL
- forum1
- forum2

space

GENERAL
- forum1
- forum2


So pretty much each catogory is its own table with its own border and there is a space inbetween each catogory. Could someone please help, because I tried so many things.
AJ Riddle
I've Been Banned!
Posts: 94
Joined: Tue May 14, 2002 12:42 am
Location: BCII (Black-Cell Insane Isylum in Cukkuton, Missouri)
Contact:

Post by AJ Riddle »

try having a blank catagory..
Billabong2k2
Registered User
Posts: 46
Joined: Tue Mar 19, 2002 8:52 pm

Post by Billabong2k2 »

but the border would remain...
User avatar
Daz
Registered User
Posts: 5236
Joined: Fri Dec 07, 2001 2:39 pm
Location: Yorkshire, UK

Post by Daz »

Hi,

I don't really see a way around this as phpBB reads the info for the Categories and forums from the database. A Category has to have a forum in it to show up.
Please and Thank You works wonders...
I reserve the right to post illogical (and totally wrong) replies.
...It's the subtle perfection in attention to detail that makes your work rock the way it does - cdkrg
Think simple - it's not necessarily what you draw that matters, it's what you perceive - Daz

Note: ForumImages<dot>com is no longer anything to do with me.
User avatar
Black Fluffy Lion
Former Team Member
Posts: 6057
Joined: Sat Dec 15, 2001 11:37 am

Post by Black Fluffy Lion »

This is possible I believe...

try opening index_body.tpl and look for

Code: Select all

  <!-- BEGIN catrow -->
  <tr> 
	<td class="catLeft" 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>
  <!-- BEGIN forumrow -->
  <tr> 
	<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
	<td class="row1" 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}</span></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 -->
basically you can see that the comments are loops - the catrow loops the code between <!-- BEGIN catrow --> and <!-- END catrow -->

so, in theory, just adding the code in there should work, like

Code: Select all

<!-- BEGIN catrow -->
  <tr> 
	<td class="catLeft" 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>
  <!-- BEGIN forumrow -->
  <tr> 
	<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
	<td class="row1" 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}</span></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 --><br /><br />
  <!-- END catrow -->
note the <br />s at the bottom... backup the files first! this is just a guess but may well work :)
E-Darkone
Registered User
Posts: 430
Joined: Thu Apr 11, 2002 11:19 am
Location: UK
Contact:

Post by E-Darkone »

That above will work, and that is how all of my templates work ;)

Adam
evilenglishman
Registered User
Posts: 190
Joined: Mon Jan 14, 2002 2:19 pm
Location: UK
Contact:

Post by evilenglishman »

doesnt work for me :?
User avatar
Black Fluffy Lion
Former Team Member
Posts: 6057
Joined: Sat Dec 15, 2001 11:37 am

Post by Black Fluffy Lion »

you sure?? You're not viewing a cached verison or something :? hmm...I'll have a look at the code in a minute
evilenglishman
Registered User
Posts: 190
Joined: Mon Jan 14, 2002 2:19 pm
Location: UK
Contact:

Post by evilenglishman »

my forums stayed the same, i tried moving the <br /> tags around and the only thing that happened was a huge space above my forums. no splitting though.
User avatar
Black Fluffy Lion
Former Team Member
Posts: 6057
Joined: Sat Dec 15, 2001 11:37 am

Post by Black Fluffy Lion »

ok, I got it, the trick's to move the forum, topics, posts, last post stuff into the catrow...

here's the code

Code: Select all

<!-- BEGIN catrow -->
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr> 
	<th colspan="2" class="thCornerL" height="25" 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>
 <tr> 
	<td class="catLeft" 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>
  <!-- BEGIN forumrow -->
  <tr> 
	<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="27" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
	<td class="row1" 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}</span></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 -->
 </table><br /><br />
 <!-- END catrow -->
make sure you delete

Code: Select all

<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr> 
	<th colspan="2" class="thCornerL" height="25" 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>
from before <!-- BEGIN catrow --> before making the changes above.

AND BACKUP YOUR FILES FIRST!!
E-Darkone
Registered User
Posts: 430
Joined: Thu Apr 11, 2002 11:19 am
Location: UK
Contact:

Post by E-Darkone »

all you have to do is move the Begin Catrow comment, to the top of the table.

then put <br /> in front of the End Catrow comment....

Adam
Billabong2k2
Registered User
Posts: 46
Joined: Tue Mar 19, 2002 8:52 pm

Post by Billabong2k2 »

Black Fluffy Lion,


Thanks a lot, it worked great, someone should document this, because other people will probably want to know how. :)

Thanks again.
indiejones
Registered User
Posts: 6
Joined: Sat Jul 13, 2002 1:51 am

Black Fluffy Lion

Post by indiejones »

Hi I am new here uploaded phpBB2 two days ago and I have been on it every chance I get, the tutorials are just great I have been looking for this code all night just done the code how you described above then hey prestow!!! it all works.

check out what I have done so far:

:arrow: http://www.thexboxfiles.com/phpBB2/index.php
mrnewbie
Registered User
Posts: 17
Joined: Sat Aug 10, 2002 11:17 pm

Post by mrnewbie »

i followed your instructiosn but i get the topics and post colums are out of allignment ?
http://fanclub.ms/warcraft3 MY WARCRAFT3 FORUM
User avatar
Daz
Registered User
Posts: 5236
Joined: Fri Dec 07, 2001 2:39 pm
Location: Yorkshire, UK

Post by Daz »

Hi,

Have you reverted to the previous layout then?
Please and Thank You works wonders...
I reserve the right to post illogical (and totally wrong) replies.
...It's the subtle perfection in attention to detail that makes your work rock the way it does - cdkrg
Think simple - it's not necessarily what you draw that matters, it's what you perceive - Daz

Note: ForumImages<dot>com is no longer anything to do with me.
Locked

Return to “[2.0.x] Styles Development & Discussion”