Print Page | Close Window

Show only some forums when lcid 1030 others 2057

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=20444
Printed Date: 11 April 2026 at 10:08am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Show only some forums when lcid 1030 others 2057
Posted By: BrownGhost
Subject: Show only some forums when lcid 1030 others 2057
Date Posted: 26 June 2006 at 9:18pm

Show only some forums when lcid 1030 and others on 2057

We have made it so the forum will display Danish language when reast of our site is in Danish.

Users can change site language to English, then the forum also change :)

Now in the old forum V7 we had this code, to show only DK forum to DK users

And eng forum to Eng users.

 

If strDatabaseType = "SQLServer" Then

            If Session("LCID") = 2057 Then

                        strSQL = "EXECUTE wwfSpCategoriesByEnglish"

            ElseIf Session("LCID") = 1030 Then

                        strSQL = "EXECUTE wwfSpCategoriesByDanish"

            End If

Else

            strSQL = "SELECT " & strDbTable & "Category.Cat_name, " & strDbTable & "Category.Cat_ID FROM " & strDbTable & "Category ORDER BY " & strDbTable & "Category.Cat_order ASC;"

End If

 

That was for V7.1 and we made 2 stored procedures  to match.

Now in V 8 this category thing is made in a hole different way.

Do you have any good idea on how to show only dk forum for Lcid 1030 and the others for lcid 2057

To explain better right now we have.

All forum 2 times, one is made in English and one is made in Danish to match the language we offer on the page.

 

You can see it here: http://www.babesline.dk/forum/default.asp - http://www.babesline.dk/forum/default.asp   DK forum are in top.  Eng are in bottom.



-------------
Thanks
BrownGhost

http://www.pitbull.dk" rel="nofollow - http://www.pitbull.dk



Replies:
Posted By: WebWiz-Bruce
Date Posted: 27 June 2006 at 7:53am
For performance reasons the default.asp page has been made so that only 1 SQL Query is used to get all the forums in all the categories. This cut load times by over 2000%

In version 8 you will need to change the ASP code rather than the SQL Query, and stored procedures are no longer used.

The simplest way is to change the ASP code that loops round to display the categories, only showing categories based on the ID number of the category.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: BrownGhost
Date Posted: 27 June 2006 at 8:15am
okay. :)

is it here that i have to make the changes.

    'Loop round to show all the categories and forums
    Do While intCurrentRecord <= Ubound(sarryForums,2)


-------------
Thanks
BrownGhost

http://www.pitbull.dk" rel="nofollow - http://www.pitbull.dk


Posted By: WebWiz-Bruce
Date Posted: 27 June 2006 at 9:55am
That looks like the loop to show categories. 

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



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