Print Page | Close Window

Categories

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=21445
Printed Date: 29 March 2026 at 7:49pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Categories
Posted By: suedechaser
Subject: Categories
Date Posted: 30 September 2006 at 2:53am
Hi All,

I was wondering if the following is possible.

If I specify a link to a specific category -eg. default.asp?C=6 - is there a way to only have that forum category / forums show in default.asp instead of all the forum categories. I hope this makes sense.

thanks in advance

regards

suede



Replies:
Posted By: Hades
Date Posted: 30 September 2006 at 7:46pm

Let's see if I got this right.. You want a mod that, if you click on " http://forums.webwiz.net/default.asp?C=2 - Web Wiz Guide's ASP Applications Support Forums ", you don't see the "General Discussion", "Community Forums" and "Testing this forum" links below it.. ?

(This example is off course for Borg's Forum)
 
..I'm at work so I can't look into codes from here.. But what you have to search is the part where it is looking for the "C=" value. Then add that if there is a value and it is the one of this category, write the forum code. But if there is a value and it is NOT the one of this category, don't write anything.. And if there is no value, write the code for all categories.


-------------
Hades[hLcYb¿]

-What're quantum mechanics?
-I don't know. People who repair quantums, I suppose.

--Rincewind, Discworld


Posted By: Hades
Date Posted: 30 September 2006 at 11:14pm
So.. I had a look into the code to see how he defines this "C" value. I think what you are looking for (if it is what I understood) is quite simple. All you need to do is copy some lines around to include/exclude them from a condition.
 
I can't test what I'm writing, though.. I'm still at work :P
 
Find these lines :

'If the user only wants to see one category, only display the forums for that category
  If intCatShow = intCatID OR intCatShow = 0 Then
 
Cut, and past them just above the code for the table, getting this result :

  'Read in the details from the array of this category
  intCatID = CInt(sarryForums(0,intCurrentRecord))
  strCategory = sarryForums(1,intCurrentRecord)  
  
'If the user only wants to see one category, only display the forums for that category
  If intCatShow = intCatID OR intCatShow = 0 Then

%>
<table cellspacing="1" cellpadding="3" class="tableBorder" align="center">
 <tr class="tableLedger">
  <td width="4%">&nbsp;</td>
  <td width="56%"><% = strTxtForum %></td>
  <td width="6%" align="center"><% = strTxtTopics %></td>
  <td width="6%" align="center"><% = strTxtPosts %></td>
  <td width="28%" align="center"><% = strTxtLastPost %></td>
 </tr><%
  
  'Display the category name
  Response.Write vbCrLf & " <tr class=""tableSubLedger""><td colspan=""5""><a href=""default.asp?C=" & intCatID & strQsSID2 & """>" & strCategory & "</a></td></tr>"

And you'll need to move the "</table>" into the loop, just under the "Loop" command (before this line :

'Else we are not displaying forums in this category so we need to move to the next category in the array
Else
)
 
..like I said, I can't test the code here, you may have to fiddle a bit with it.


-------------
Hades[hLcYb¿]

-What're quantum mechanics?
-I don't know. People who repair quantums, I suppose.

--Rincewind, Discworld


Posted By: suedechaser
Date Posted: 01 October 2006 at 10:12pm
Hi Hades,

Yes, you've understood correctly - unfortunately though, I've not had a chance to work on this yet. I will have a go later today.

thank you for your assistance so far.

regards

suede


Posted By: suedechaser
Date Posted: 02 October 2006 at 7:39am
Hi Hades,

You don't actually need to move the </table> tag.

Simply moving the 'If the user only wants to see one category.......lines worked nicely.

Default.asp shows all categories. Default.asp?C=X shows only the category X with all forums.

quite sweet! nice teamwork.

regards

suede


Posted By: Hades
Date Posted: 02 October 2006 at 4:40pm
Actually you do need to move the table tag.. The reason is that if you link to an empty gallery, you won't enter the "If...then" condition, and there'll be a </table> tag that wasn't opened which can lead to funny results.
 
But it's nice to see that it actually works :)


-------------
Hades[hLcYb¿]

-What're quantum mechanics?
-I don't know. People who repair quantums, I suppose.

--Rincewind, Discworld


Posted By: suedechaser
Date Posted: 18 October 2006 at 1:52am
Yes Hades - you are correct....and didn't I have a time trying to sort this out.

I eventually worked out what the error " Expected statement..." means.

Don't forget to also move the <% .....%> tags with the </table> !!

Thank you again.

regards

suede



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net