Author |
Topic |
rkattan
Starting Member
USA
12 Posts |
Posted - 14 April 2001 : 06:19:13
|
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 |
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 14 April 2001 : 12:50:15
|
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 |
|
|
rkattan
Starting Member
USA
12 Posts |
Posted - 14 April 2001 : 14:37:09
|
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 |
|
|
blackinwhite
Average Member
Turkey
657 Posts |
Posted - 14 April 2001 : 15:04:35
|
it works like a charm man, small mod but a great idea
|
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 14 April 2001 : 16:33:24
|
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 |
|
|
wedont
Junior Member
Canada
344 Posts |
Posted - 14 April 2001 : 19:04:42
|
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 |
|
|
James
Average Member
USA
539 Posts |
Posted - 15 April 2001 : 12:05:44
|
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 |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 16 April 2001 : 09:35:43
|
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 |
|
|
nemesis
Starting Member
43 Posts |
Posted - 16 April 2001 : 13:23:47
|
...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. |
|
|
wedont
Junior Member
Canada
344 Posts |
Posted - 16 April 2001 : 22:59:44
|
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 |
|
|
James
Average Member
USA
539 Posts |
Posted - 17 April 2001 : 00:00:44
|
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 |
|
|
Bassman
Junior Member
Netherlands
256 Posts |
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 17 April 2001 : 12:42:01
|
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 |
|
|
rkattan
Starting Member
USA
12 Posts |
Posted - 19 April 2001 : 14:42:53
|
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 |
|
|
James
Average Member
USA
539 Posts |
Posted - 20 April 2001 : 00:04:24
|
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 |
|
|
Topic |
|
|
|