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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 help with - Display what page your on in Title Bar
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

milki
Junior Member

Israel
320 Posts

Posted - 27 April 2002 :  12:46:55  Show Profile  Visit milki's Homepage  Send milki an ICQ Message
i use this
 Subject says it, show page that your on in the title bar when loaded... a few simple changes marked below.

Inc functions.asp - top of file after comments


Function GetNewTitle(strTempScriptName)Dim StrTempScriptDim strNewTitle
arrTempScript = Split(strTempScriptName, "/")
strTempScript = arrTempScript(Ubound(arrTempScript))
strTempScript = lcase(strTempScript)Select Case strTempScriptCase "topic.asp"strTempTopic = request.querystring("TOPIC_ID")if not(strTempTopic = "") then
if request.querystring("archive") = "true" then
strsql = "SELECT T_SUBJECT, FORUM_ID FROM " & strActivePrefix & "TOPICS WHERE TOPIC_ID=" & strTempTopic
set ttopics = my_conn.execute(strsql)
strTempTopicTitle = ttopics("T_SUBJECT")
strTempForum = ttopics("FORUM_ID")
set ttopics = nothing
strsql = "SELECT F_SUBJECT FROM " & strActivePrefix & "FORUM WHERE FORUM_ID=" & strTempForum
set tforums = my_conn.execute(strsql)
strTempForumTitle = tforums("F_SUBJECT")
set tforums = nothing
strNewTitle = strTempTopicTitle & " - " & strTempForumTitle & " - " & strForumTitle else
strsql = "SELECT T_SUBJECT, FORUM_ID FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID=" & strTempTopic
set ttopics = my_conn.execute(strsql)
strTempTopicTitle = ttopics("T_SUBJECT")
strTempForum = ttopics("FORUM_ID")
set ttopics = nothing
strsql = "SELECT F_SUBJECT FROM " & strTablePrefix & "FORUM WHERE FORUM_ID=" & strTempForum
set tforums = my_conn.execute(strsql)
strTempForumTitle = tforums("F_SUBJECT")
set tforums = nothing
strNewTitle = strTempTopicTitle & " - " & strTempForumTitle & " - " & strForumTitle end ifelse strNewTitle = strForumTitleend ifCase "forum.asp"strTempForum = request.querystring("FORUM_ID")if not(strTempForum = "") then
strsql = "SELECT F_SUBJECT FROM " & strTablePrefix & "FORUM WHERE FORUM_ID=" & strTempForum
set tforums = my_conn.execute(strsql)
strTempForumTitle = tforums("F_SUBJECT")
set tforums = nothing
strNewTitle = strTempForumTitle & " - " & strForumTitle
else
strNewTitle = strForumTitle
end ifCase "members.asp"
strNewTitle = "Members - " & strForumTitleCase "active.asp"
strNewTitle = "Active Topics - " & strForumTitleCase "faq.asp"
strNewTitle = "Frequently Asked Questions - " & strForumTitleCase "search.asp"
strNewTitle = "Search - " & strForumTitleCase "pop_profile.asp"
if request.querystring("mode") = "display" then
strNewTitle = "View Profile - " & strForumTitle
elseif request.querystring("mode") = "edit" then
strNewTitle = "Edit Profile - " & strForumTitle
else strNewTitle = "Profile - " & strForumTitle end ifCase "policy.asp"
strNewTitle = "User Agreement - " & strForumTitleCase "register.asp"
strNewTitle = "Register - " & strForumTitleCase "active_users.asp"
strNewTitle = "Active users - " & strForumTitleCase else
strNewTitle = strForumTitleEnd Select
GetNewTitle = strNewTitleEnd Function

Inc_Top.asp Replace below...


Response.Write
"<html dir=rtl>" & vbNewline & vbNewline & _
"<head>" & vbNewline & _
"<title>" & strForumTitle & "</title>" & vbNewline

With the following

strScriptName = request.servervariables("script_name")Response.Write
"<html dir=rtl>" & vbNewline & vbNewline & _
"<head>" & vbNewline & _
"<title>" & GetNewTitle(strScriptName) & "</title>" & vbNewline

and this errer i have in my forum ...

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/test/inc_functions.asp, line 31

Function GetNewTitle(strTempScriptName)Dim StrTempScriptDim strNewTitle
------------------------------------------------------------^

and this is line 31
Function GetNewTitle(strTempScriptName)Dim StrTempScriptDim strNewTitle

some one know wahy ?



Deleted
deleted

4116 Posts

Posted - 27 April 2002 :  13:03:38  Show Profile
put a linebreak between ) and the DIM, also put a comma between dim'med variables ... So that it reads:


Function GetNewTitle(strTempScriptName)
Dim StrTempScriptDim,strNewTitle
arrTempScript = Split(strTempScriptName, "/")
...



Think Pink
==> Start Internationalization Here
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 27 April 2002 :  13:06:53  Show Profile
BTW, this functionality will be standart in v3.4...

Think Pink
==> Start Internationalization Here
Go to Top of Page

milki
Junior Member

Israel
320 Posts

Posted - 27 April 2002 :  13:08:20  Show Profile  Visit milki's Homepage  Send milki an ICQ Message
tanks man i will try !

Go to Top of Page

milki
Junior Member

Israel
320 Posts

Posted - 27 April 2002 :  13:15:42  Show Profile  Visit milki's Homepage  Send milki an ICQ Message
now i get this errer
Microsoft VBScript compilation error '800a0401' 

Expected end of statement

/TEST/inc_functions.asp, line 40

Dim StrTempScriptDim strNewTitle
---------------------^


in line 40 i have this !
Function GetNewTitle(strTempScriptName)
Dim StrTempScriptDim strNewTitle <----- line 40
arrTempScript = Split(strTempScriptName, "/")

Go to Top of Page

milki
Junior Member

Israel
320 Posts

Posted - 27 April 2002 :  13:26:02  Show Profile  Visit milki's Homepage  Send milki an ICQ Message
i have change this and i get this noe
Microsoft VBScript compilation error '800a0401' 

Expected end of statement

/test/inc_functions.asp, line 43

strTempScript = lcase(strTempScript)Select Case strTempScriptCase "topic.asp"strTempTopic = request.querystring("TOPIC_ID")if not(strTempTopic = "") then
------------------------------------^


this is the line 43 ...
	strTempScript = arrTempScript(Ubound(arrTempScript))
strTempScript = lcase(strTempScript)Select Case strTempScriptCase "topic.asp"strTempTopic = request.querystring("TOPIC_ID")if not(strTempTopic = "") then <------- line 43
if request.querystring("archive") = "true" then


Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 27 April 2002 :  13:56:29  Show Profile
I don't know where you get this script from but while copy-paste some CR-LF information (i.e. Enter's) got lost.

Try re-doing the copy paste. Please hit "answer with prompt" icon and copy-paste it from the editor. But do not post .


Think Pink
==> Start Internationalization Here
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07