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
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

rkattan
Starting Member

USA
12 Posts

Posted - 14 April 2001 :  06:19:13  Show Profile
The forum uses for the title of the browser <title></title>, always, the forum owner name.
For me, in this forum, i visit many topics, then later cannot find them easily in the History, as all have name "snitz Forums", so i made this mod.

find in inc_top.asp:

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


and replace it with this code:

' ####################################### 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, "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") AND Request("method") = "Topic" then
strAdditionalTitle = strAdditionalTitle & title_sep & " New Topic"
elseif instr(sScript, "post.asp") AND Request("method") = "Reply" then
strAdditionalTitle = strAdditionalTitle & title_sep & " Reply To Topic"
elseif instr(sScript, "post.asp") AND Request("method") = "Forum" then
strAdditionalTitle = strAdditionalTitle & title_sep & " New Forum"
elseif instr(sScript, "post.asp") AND Request("method") = "Category" then
strAdditionalTitle = strAdditionalTitle & title_sep & " New Category"
elseif instr(sScript, "post.asp") AND Request("method") = "EditTopic" then
strAdditionalTitle = strAdditionalTitle & title_sep & " Edit Topic"
elseif instr(sScript, "post.asp") AND Request("method") = "EditForum" then
strAdditionalTitle = strAdditionalTitle & title_sep & " Edit Forum"
elseif instr(sScript, "post.asp") AND Request("method") = "EditCategory" then
strAdditionalTitle = strAdditionalTitle & title_sep & " Edit Category"
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 ###########################
%>

more page title can be added easily...

Download MOD http://www.kattanweb.com/webdev/download.asp?file=mod_forum_title.zip

This makes it easier, and please Snitz Forum Admins, add this to your forum, as it is hard to find a topic offline.

Demo: http://www.kattanweb.com/forums




Edited by - rkattan on 15 April 2001 05:40:58

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 14 April 2001 :  12:27:56  Show Profile
This has been reported as a bug:
link.asp?TOPIC_ID=2929

Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 14 April 2001 :  12:50:15  Show Profile  Visit Rob Poretti's Homepage
Hi rkattan,

Have you looked through the thread that Davio posted and checked to see if you are experiencing the same problem in your admin pages. This looks like its implemented slightly differently, and if it works for you, I'd like to implement it. It is a not to flashy but very "practical" mod.

Please let us know!


Cheers!



Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960
Go to Top of Page

rkattan
Starting Member

USA
12 Posts

Posted - 14 April 2001 :  14:37:09  Show Profile
Hi,

I don't know what do you mean ??
i read that topic, but for me, i can use the Admin features, and even the title is forumname - Administration
i can change, add, read, do everything.

also for the Events Calendar, the title will be Events Calendar....

anyway, if anyone find bugs in it, post them here...

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

blackinwhite
Average Member

Turkey
657 Posts

Posted - 14 April 2001 :  15:04:35  Show Profile
it works like a charm man, small mod but a great idea

Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 14 April 2001 :  16:33:24  Show Profile  Visit Rob Poretti's Homepage
quote:

Hi,

I don't know what do you mean ??
i read that topic, but for me, i can use the Admin features, and even the title is forumname - Administration
i can change, add, read, do everything.

also for the Events Calendar, the title will be Events Calendar....

anyway, if anyone find bugs in it, post them here...

---------------------
Rami Kattan
http://www.kattanweb.com/forums



Great! Glad to hear you're not having the same problem...

Thanks for the mod... very useful...

Cheers!




Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960
Go to Top of Page

wedont
Junior Member

Canada
344 Posts

Posted - 14 April 2001 :  19:04:42  Show Profile
Installed, Tested,

Works great!
Thanks rkattan

Wedont
snitz ver3.1 sr2
access 2k.
PS: an arrow ">>" instead of "-" looks even better: Forum >> General >> topic

Edited by - wedont on 14 April 2001 19:10:30
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 15 April 2001 :  12:05:44  Show Profile  Visit James's Homepage
Thanks rkattan, works great. I had to make a few changes to make it work with my forum (3.0sr2) and I decided that I didn't need the added info that was added with "Script_Name". Mine went from looking like:

<head>
<title><% =strForumTitle %></title>


to looking like:

<head>
<%
' ####################################### Page Titles ###########################
Forum_Page_Title = Request.QueryString("Forum_Title")
Topic_Page_Title = Request.QueryString("Topic_Title")
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
%>
<title><% =strForumTitle & strAdditionalTitle %></title>


Notice that it's a little different as it wroks for the 3.0 version. This version didn't use the "Response.Write".

-

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*


Edited by - James on 16 April 2001 23:49:04
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 16 April 2001 :  09:35:43  Show Profile  Visit Rob Poretti's Homepage
Hey James,

Outside, the other changes that you made... what did you have to do specifically for an sr2 forum (which is what I'm using)...

Cheers!



Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960

Edited by - Rob Poretti on 16 April 2001 12:10:13
Go to Top of Page

nemesis
Starting Member

43 Posts

Posted - 16 April 2001 :  13:23:47  Show Profile  Send nemesis an ICQ Message
...brilliant Mod...

Question, is there a simple way to get rid of the "Microsoft Internet Explorer" without attacking the registry..? It takes up alot of space on the Title bar..

thanks


Nem
Depression is merely Anger without enthusiasm.
Go to Top of Page

wedont
Junior Member

Canada
344 Posts

Posted - 16 April 2001 :  22:59:44  Show Profile
quote:

Hey James,

Outside, the other changes that you made... what did you have to do specifically for an sr2 forum (which is what I'm using)...




Rob, I installed rkattan's script on v3sr2 and it works perfectly, just have to add a <%
at the beginning and %> at the end and removing the original <html> and <head> tags!

BTW Nemesis, to remove the "microsoft internet explorer" add "spaces" (& vbcrlf)to move it out of view!

Suggestion: Since this mod is in the include top_asp and since we may need to add quite a few <% if-end if%> I wonder if this slows down the download to much as oppose as using a "select" strategy, just asking?
Wedont
snitz ver3.1 sr2
access 2k.

Edited by - wedont on 16 April 2001 23:04:32
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 17 April 2001 :  00:00:44  Show Profile  Visit James's Homepage
quote:

Outside, the other changes that you made... what did you have to do specifically for an sr2 forum (which is what I'm using)...



I'm using 3.0sr2 (not 3.1sr2). If that's what you have, then my above post contained all the changes needed to make it work with my forum (I edited so that the code lines wouldn't wrap to the next line above). If you wanted the extra descriptions along with the forum and post in the browser title, then just add the "sScript =" line and the extra if/then statements so that the code would look like:


<head>
<%
' ####################################### 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, "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") AND Request("method") = "Topic" then
strAdditionalTitle = strAdditionalTitle & title_sep & " New Topic"
elseif instr(sScript, "post.asp") AND Request("method") = "Reply" then
strAdditionalTitle = strAdditionalTitle & title_sep & " Reply To Topic"
elseif instr(sScript, "post.asp") AND Request("method") = "Forum" then
strAdditionalTitle = strAdditionalTitle & title_sep & " New Forum"
elseif instr(sScript, "post.asp") AND Request("method") = "Category" then
strAdditionalTitle = strAdditionalTitle & title_sep & " New Category"
elseif instr(sScript, "post.asp") AND Request("method") = "EditTopic" then
strAdditionalTitle = strAdditionalTitle & title_sep & " Edit Topic"
elseif instr(sScript, "post.asp") AND Request("method") = "EditForum" then
strAdditionalTitle = strAdditionalTitle & title_sep & " Edit Forum"
elseif instr(sScript, "post.asp") AND Request("method") = "EditCategory" then
strAdditionalTitle = strAdditionalTitle & title_sep & " Edit Category"
end if
%>
<title><% =strForumTitle & strAdditionalTitle %></title>


Personally, I didn't feel like the added info gained from the "sScript =" line was needed or the added code from all the "if/then/else if" statements. All these changes were in the inc_top.asp file.
-

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*


Edited by - James on 17 April 2001 00:05:33
Go to Top of Page

Bassman
Junior Member

Netherlands
256 Posts

Posted - 17 April 2001 :  12:28:19  Show Profile  Visit Bassman's Homepage
verry nice mod rkattan, works perfectly







http://scoutingforum.121host.net/

Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 17 April 2001 :  12:42:01  Show Profile  Visit Rob Poretti's Homepage
Thanks guys for all the info! ...and rkattan for the mod!

Cheers!


Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960
Go to Top of Page

rkattan
Starting Member

USA
12 Posts

Posted - 19 April 2001 :  14:42:53  Show Profile
I was thinking in this, but it doesn't work (I mean Select),
Select instr(sScript)
case "admin"


any ideas for better performance ??
quote:

quote:

Hey James,

Outside, the other changes that you made... what did you have to do specifically for an sr2 forum (which is what I'm using)...




Rob, I installed rkattan's script on v3sr2 and it works perfectly, just have to add a <%
at the beginning and %> at the end and removing the original <html> and <head> tags!

BTW Nemesis, to remove the "microsoft internet explorer" add "spaces" (& vbcrlf)to move it out of view!

Suggestion: Since this mod is in the include top_asp and since we may need to add quite a few <% if-end if%> I wonder if this slows down the download to much as oppose as using a "select" strategy, just asking?
Wedont
snitz ver3.1 sr2
access 2k.

Edited by - wedont on 16 April 2001 23:04:32



---------------------
Rami Kattan
http://www.kattanweb.com/forums

Edited by - rkattan on 20 April 2001 03:20:54
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 20 April 2001 :  00:04:24  Show Profile  Visit James's Homepage
quote:

I was thinking in this, but it doesn't work (I ean Select),
Select instr(sScripte)
case "admin" do 1
...


any ideas for better performance ??



You could drop most of the else/if statements. Especially since most of the values returned in the sScript line are acceptable themselves.

Keep the line:
sScript = Request.ServerVariables("SCRIPT_NAME")


And use only the else/if statements that need to change the output of sScript such as:

if instr(sScript, "admin_") then sScript = "Administration"
elseif instr(sScript, "recent.asp") then sScript = "Recent Topics"
elseif instr(sScript, "active.asp") then sScript = "Active Topics"
elseif instr(sScript, "policy") OR instr(sScript, "register.asp") then sScript = "Registration"
elseif instr(sScript, "pm_") OR instr(sScript, "private") then sScript = "Private Messages"
elseif instr(sScript, "post.asp") AND Request("method") = "Topic" then sScript = "New Topic"
elseif instr(sScript, "post.asp") AND Request("method") = "Reply" then sScript = "Reply To Topic"
elseif instr(sScript, "post.asp") AND Request("method") = "Forum" then sScript = "New Forum"
elseif instr(sScript, "post.asp") AND Request("method") = "Category" then sScript = "New Category"
elseif instr(sScript, "post.asp") AND Request("method") = "EditTopic" then sScript = "Edit Topic"
elseif instr(sScript, "post.asp") AND Request("method") = "EditForum" then sScript = "Edit Forum"
elseif instr(sScript, "post.asp") AND Request("method") = "EditCategory" then sScript = "Edit Category"
end if


And then add the line:


strAdditionalTitle = strAdditionalTitle & title_sep & " " & sScript


This shortens it up a good bit. You could shorten it up further by doing something like adding another if/then statement to check for sScript = "post.asp". If it does, then make sScript = Request("method"). Then you could drop off the else/if statements for "EditTopic", EditForum" and "EditCategory" as they don't need changing. You could probably leave "Reply" alone too as it's assumed that you're replying to a topic.
-

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*


Edited by - James on 20 April 2001 00:34:23
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next 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.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07