Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Show only some forums when lcid 1030 others  2057
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Show only some forums when lcid 1030 others 2057

 Post Reply Post Reply
Author
BrownGhost View Drop Down
Groupie
Groupie


Joined: 26 November 2002
Status: Offline
Points: 193
Post Options Post Options   Thanks (0) Thanks(0)   Quote BrownGhost Quote  Post ReplyReply Direct Link To This Post Topic: Show only some forums when lcid 1030 others 2057
    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   DK forum are in top.  Eng are in bottom.

Thanks
BrownGhost

http://www.pitbull.dk
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
BrownGhost View Drop Down
Groupie
Groupie


Joined: 26 November 2002
Status: Offline
Points: 193
Post Options Post Options   Thanks (0) Thanks(0)   Quote BrownGhost Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2006 at 9:55am
That looks like the loop to show categories. 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.