Zudane Apprentice

Virtual Cash: 1760
Joined: 10 May 2008 Posts: 173
Add Karma
 rated by 3 members
Add Comment
Show Comments
 |
Posted: Wed Jul 02, 2008 7:13 am Post subject: Subforum glitch |
|
|
Okay, not sure if something was changed or not, but I just noticed this...
With the code I posted earlier in the webpage design section, I found there was a small problem with it, and I can't figure out why.
The index looked fine, but when a forum with a subforum was opened, the entire table got thrown off like it wasn't there. I could remove the <table> tag and there would be no change, I had to move that tag to the before the begin forumrow tag. But it only did this in the sub forums.
I narrowed it down looking through the viewforum_body template, and the problem was fixed just by removing the include forumlist_body.html bit from the subforum section, so I know the problem has to be within that one, or related to it. I just can't figure it out!
Any ideas or help? Is there a separate name for the subforum categories? Perhaps the | Code: | | <!-- IF forumrow.S_IS_CAT --> | is where the error is, because in the the subforum that category might not exist, so it never executes the start of the table... but I'm not sure what to add to it, perhaps | Code: | | <!-- IF (forumrow.S_IS_CAT or forumrow.S_FIRST_ROW) --> | would do it?
_________________
Harsh Reality - A community forum
http://Harsh-reality.info |
|
| Back to top |
|
 |
Zudane Apprentice

Virtual Cash: 1760
Joined: 10 May 2008 Posts: 173
Add Karma
 rated by 3 members
Add Comment
Show Comments
 |
Posted: Wed Jul 02, 2008 7:20 am Post subject: |
|
|
Okay, so using the S_FIRST_ROW does give the table there, but it also gives the first row of the subforums as a category style. Showing the header bar and only the name - not posts/threads/last post or any of that.
Any other ideas? _________________
Harsh Reality - A community forum
http://Harsh-reality.info |
|
| Back to top |
|
 |
admin (no pm's please) Site Admin

 Virtual Cash: 43000
Joined: 22 May 2005 Posts: 19357
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
Posted: Wed Jul 02, 2008 10:11 am Post subject: |
|
|
The only subforum flag is S_HAS_SUBFOUM which is set when there are no sub forums, otherwise the index page and the forums part of the view forum page both use the same forumlist_body.tpl file. _________________
Family Friendly Shareware | | Web Design/Services | Free Forums
forum.myfreeforum.org |
|
| Back to top |
|
 |
Zudane Apprentice

Virtual Cash: 1760
Joined: 10 May 2008 Posts: 173
Add Karma
 rated by 3 members
Add Comment
Show Comments
 |
Posted: Thu Jul 03, 2008 5:40 pm Post subject: |
|
|
Any ideas to get around this?
I need the table tag inside the S_IS_CAT command to get separate tables on in the index, but if the table tag is inside the S_IS_CAT it doesn't initialize when the subforum hits, but the end of the table tag still does, making the forum with a subforum appear at the bottom of the page, under the left-side portal - and the Subforum list is outside of a table, and completely unorganized. _________________
Harsh Reality - A community forum
http://Harsh-reality.info |
|
| Back to top |
|
 |
admin (no pm's please) Site Admin

 Virtual Cash: 43000
Joined: 22 May 2005 Posts: 19357
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
|
| Back to top |
|
 |
Zudane Apprentice

Virtual Cash: 1760
Joined: 10 May 2008 Posts: 173
Add Karma
 rated by 3 members
Add Comment
Show Comments
 |
Posted: Fri Jul 04, 2008 10:55 pm Post subject: |
|
|
Don't quite think this is what you meant.. but I had an epiphany. If it doesn't initialize the table code since it's not a category.. why not just put the table tag inside the S_IF_SUBFORUM?
Tried that, and it worked... so I just added this into the viewforum_body template
| Code: | <table class="tablebg" cellspacing="1" width="100%">
<tr>
<th colspan="2"> {L_FORUM} </th>
<th width="50"> {L_TOPICS} </th>
<th width="50"> {L_POSTS} </th>
<th> {L_LAST_POST} </th>
</tr> |
Went between
| Code: | <!-- IF S_HAS_SUBFORUM -->
<!-- INCLUDE forumlist_body.html -->
|
so it automatically starts the table, and adds the header bar. ^_^ Finished code for the subforum looks like this...
| Code: | <!-- IF S_HAS_SUBFORUM -->
<table class="tablebg" cellspacing="1" width="100%">
<tr>
<th colspan="2"> {L_FORUM} </th>
<th width="50"> {L_TOPICS} </th>
<th width="50"> {L_POSTS} </th>
<th> {L_LAST_POST} </th>
</tr>
<!-- INCLUDE forumlist_body.html -->
<br clear="all" />
<!-- ENDIF --> |
_________________
Harsh Reality - A community forum
http://Harsh-reality.info |
|
| Back to top |
|
 |