Print Page | Close Window

Display category name in forum topics?

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=4971
Printed Date: 06 April 2026 at 11:58am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Display category name in forum topics?
Posted By: shovel
Subject: Display category name in forum topics?
Date Posted: 12 August 2003 at 3:16pm

Hi all,

I would like to display the category name in both the forum topics and the forum posts pages.  I've been fooling around with it for a while with no success.  Anybody have an easy solution?

Thanks, Jim




Replies:
Posted By: ljamal
Date Posted: 12 August 2003 at 11:16pm
Query the database for the Category name associated with the Forum and save it to a variable.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: shovel
Date Posted: 13 August 2003 at 1:23pm

Thanks Jámal ...

Now, I'm sure that sounds real easy to you, but as I am an ASP dabbler who mostly copies and pastes code from one place to another I'm not sure what that entails.   

Now, I can follow along in the default.asp page and see the flow of code related to categories, but I'm not sure how much of that is actually needed for this task, nor how to query regarding the particular forum or which part makes for the saving to a variable. 

I've done a lot of guessing and experimenting with a few things and surprisingly for me it often works.  I'm just at an impasse since I can't find the needed code in the pages to do what I want.  One day I'll most likely pick up an ASP book and learn it from the ground up, but that day is not today. 

Should you decide to help me any further it will be appreciated, and if not, it will be understood. 

Thanks, Jim



Posted By: fernan82
Date Posted: 13 August 2003 at 3:33pm
You can save a query or make it simplier by passing the category ID on the URL so you only have to query tblCategory, that's how I did it on my portal if it's not found on the URL then it queries tblForum and tblCategory i think..... you can even browse one category at the time in my forum.... http://www.uznetworkz.com/forum/ - http://www.uznetworkz.com/forum/ it can be a pain to get this done as you have to modify about every file on the forums...

-------------
FeRnAN
http://www.danasoft.com/">


Posted By: ljamal
Date Posted: 13 August 2003 at 4:24pm
I just created a MOD to do this for you.

http://forums.webwiz.net/forum_posts.asp?TID=5003&PN=1&TPN=1 - MOD

The problem with passing the Category ID is that it would be possible to produce a category ID that did not exist in the database and thus would not return the correct name. By querying it from the Forum ID you are guaranteed to get the correct Category ID for the froum

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: fernan82
Date Posted: 13 August 2003 at 5:10pm
I don't see how you're gonna produce a category ID that doesn't exist on the db when you're passing it from other pages where it's queried from the db... i've been doing it for a while like that and it never happened...

-------------
FeRnAN
http://www.danasoft.com/">


Posted By: ljamal
Date Posted: 13 August 2003 at 5:28pm
Any time you pass information via the querystring if opens it up for your users to change that information. This means that the information has to be checked to insure that it is at least of the variable type you need. This is an unnecessary step when the information is easily and more accurately queried from the database.

I wouldn't call you way wrong or incorrect, just not the simplest or more straightforward method of getting the data.


-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: shovel
Date Posted: 14 August 2003 at 12:39pm

Originally posted by ljamal ljamal wrote:

I just created a MOD to do this for you.

Jamal, thank you so much for this MOD.  I was able to easily copy and paste it into my already heavily modified pages, thanks to your clear notation!

By the way, I want to once again thank not only Bruce for such an outstanding job on this forum but also all those who have added so many useful and easily administered MODS!

Jim 



Posted By: JamesM
Date Posted: 19 November 2003 at 4:31am

Has anyone got this mod working with 7.51a yet ?

I have tried but all goes well until you click on a topic and then i just get an error 500 from the server.

Any help would be appreciated as I am new to asp.

Thanks in advance.

James



Posted By: ljamal
Date Posted: 19 November 2003 at 6:23am
To my knowledge there is no MOD to do this for 7.51a. This MOD I created is for 7.01 and if I have time the next MOD would be for whatever the most current version is at the time (currently 7.6). Due to other projects that I'm working on and the rapid version updates over the last few months, I don't have time to update the mods for each minor version.



-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming



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