Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: show forum & topic title in browser title
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

rkattan
Starting Member

USA
12 Posts

Posted - 23 April 2001 :  15:38:40  Show Profile
Hi,

this is small improvement, it works well for me..


' ####################################### Page Titles ###########################
Forum_Page_Title = Request.QueryString("Forum_Title")
Topic_Page_Title = Request.QueryString("Topic_Title")
sScript = Request.ServerVariables("SCRIPT_NAME")
title_sep = " »" 'change this according to what seperator you want to use
strAdditionalTitle = ""
if Forum_Page_Title <> "" then
strAdditionalTitle = strAdditionalTitle & title_sep & " " & Forum_Page_Title
end if
if Topic_Page_Title <> "" then
strAdditionalTitle = strAdditionalTitle & title_sep & " " & Topic_Page_Title
if Request.QueryString("whichpage") <> "" then
strAdditionalTitle = strAdditionalTitle & " (Page " & Request.QueryString("whichpage") & ")"
end if
end if
if instr(sScript, "admin_") then
strAdditionalTitle = strAdditionalTitle & title_sep & " Administration"
elseif instr(sScript, "profile") then
strAdditionalTitle = strAdditionalTitle & title_sep & " Profile"
elseif instr(sScript, "recent.asp") then
strAdditionalTitle = strAdditionalTitle & title_sep & " Recent Topics"
elseif instr(sScript, "archive.asp") or instr(sScript, "archive_display")then
strAdditionalTitle = strAdditionalTitle & title_sep & " Archive"
elseif instr(sScript, "events") then
strAdditionalTitle = strAdditionalTitle & title_sep & " Events Calendar"
elseif instr(sScript, "bookmark") then
strAdditionalTitle = strAdditionalTitle & title_sep & " Bookmarks"
elseif instr(sScript, "active.asp") then
strAdditionalTitle = strAdditionalTitle & title_sep & " Active Topics"
elseif instr(sScript, "active_user") then
strAdditionalTitle = strAdditionalTitle & title_sep & " Active Users"
elseif instr(sScript, "members") then
strAdditionalTitle = strAdditionalTitle & title_sep & " Members"
elseif instr(sScript, "search") then
strAdditionalTitle = strAdditionalTitle & title_sep & " Search"
elseif instr(sScript, "faq") then
strAdditionalTitle = strAdditionalTitle & title_sep & " FAQ"
elseif instr(sScript, "cancel_replies") then
strAdditionalTitle = strAdditionalTitle & title_sep & " Cancel Replies"
elseif instr(sScript, "policy") OR instr(sScript, "register.asp") then
strAdditionalTitle = strAdditionalTitle & title_sep & " Registration"
elseif instr(sScript, "pm_") OR instr(sScript, "private") then
strAdditionalTitle = strAdditionalTitle & title_sep & " Private Messages"
elseif instr(sScript, "post.asp") then
Select Case Request("method")
Case "Topic" strAdditionalTitle = strAdditionalTitle & title_sep & " New Topic"
Case "Reply" strAdditionalTitle = strAdditionalTitle & title_sep & " Reply To Topic"
Case "Forum" strAdditionalTitle = strAdditionalTitle & title_sep & " New Forum"
Case "Category" strAdditionalTitle = strAdditionalTitle & title_sep & " New Category"
Case "EditTopic" strAdditionalTitle = strAdditionalTitle & title_sep & " Edit Topic"
Case "Edit" strAdditionalTitle = strAdditionalTitle & title_sep & " Edit Reply"
Case "EditForum" strAdditionalTitle = strAdditionalTitle & title_sep & " Edit Forum"
Case "EditCategory" strAdditionalTitle = strAdditionalTitle & title_sep & " Edit Category"
end Select
end if


Response.Write "<html>" & vbcrlf & vbcrlf & _
"<head>" & vbcrlf & _
"<title>" & strForumTitle & strAdditionalTitle & "</title>" & vbcrlf & _
"<meta name=""copyright"" content=""This code is Copyright (C) 2000 Michael Anderson and Pierre Gorissen"">" & vbcrlf
' ####################################### Page Titles ###########################


---------------------
Rami Kattan
http://www.kattanweb.com/forums
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 24 April 2001 :  23:28:59  Show Profile  Visit James's Homepage
Rkattan, I'm a little confused.

In the following:


Forum_Page_Title = Request.QueryString("Forum_Title")
Topic_Page_Title = Request.QueryString("Topic_Title")
sScript = Request.ServerVariables("SCRIPT_NAME")


Couldn't a varible contain the string returned from "Request.ServerVariables("SCRIPT_NAME")"? I had thought sScript did just this so excuse me if I was wrong. If one can, then you can use a select case on it.


-

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07