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)
 topic/forum title in title tag
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 06 October 2000 :  21:52:22  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
<s>I've been half successful with this, I know there is an if then/else statement that would take care of this, but I'm not experienced enuf. Here's what I got.

In order to have the name of the topic in the <title> tag, and the forum name in the <title> tag, this is what I did.

I chopped up the inc_top.asp file, everything before the <title> tag was put into a file I named inc_topic_top.asp and everything below the <title> tag was put into a file named inc_topic_top1.asp.

I then went into topic.asp and changed the line include file="inc_top.asp" to

<!--#INCLUDE FILE="inc_topic_top.asp" -->
<title><% =ChkString(Request.QueryString("Topic_Title"),"display") %> - <% =ChkString(Request.QueryString("FORUM_Title"),"display") %> - <% =strForumTitle %></title>
<!--#INCLUDE FILE="inc_topic_top1.asp" -->

And for forum.asp

<!--#INCLUDE FILE="inc_topic_top.asp" -->
<title><% =ChkString(Request.QueryString("FORUM_Title"),"display") %> - <% =strForumTitle %></title>
<!--#INCLUDE FILE="inc_topic_top1.asp" -->

This is in use at http://dbd.gameglow.com/forum/default.asp - go into a forum then a topic and you will see in the title bar, it puts the topic title and forum name in

Edited by - da_stimulator on 06 October 2000 21:53:55

Edited by - da_stimulator on 06 October 2000 21:54:58</s>

<font color=red>[edited by admin on 10/12/2000]</font id=red>

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 08 October 2000 :  03:53:59  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
ok forget all that up there, I combined my knowledge of javascript and cgi to get a final product. i know I'm no einstein, but hey, this is my first time messin with asp.

Replace <title><% =strForumTitle %></title>

With the Following

<%
tt1forumtitle = request("FORUM_Title")
tt1forumtopic = request("Topic_Title")
if tt1forumtitle = "" and tt1forumtopic = "" then
%>
<title><% =strForumTitle %></title>

<% else if tt1forumtopic = "" then %>
<title><% =ChkString(Request.QueryString("FORUM_Title"),"display") %> - <% =strForumTitle %></title>
<% else %>
<title><% =ChkString(Request.QueryString("Topic_Title"),"display") %> - <% =ChkString(Request.QueryString("FORUM_Title"),"display") %> - <% =strForumTitle %></title>
<%
end if
end if
%>

-- http://aokingdom.com -- head webmaster/creator

-- He who has never made a mistake, has never made a discovery --
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 08 October 2000 :  04:19:02  Show Profile  Visit gor's Homepage
hmm, though the windows when minimized are too small to display much usefull information, I don't see why we couldn't display more usefull info than just the forum title.

Great idea, simple but yet a nice adition <img src=icon_smile_cool.gif border=0 align=middle>

<b>Pierre Gorissen</b>

<font color=blue><font size=1>A man who is 'of sound mind'
is one who keeps the inner madman under lock and key.
</font id=blue></font id=size1><font size=1><font color=black>Paul Valery</font id=size1></font id=black>
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 08 October 2000 :  12:37:03  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
heh, cool :) I just figured the same monotonous (spelled wrong I know) title is kinda... boring. The title is usually where I look first to remember what page I'm lookin at, cuz I usually have like 10-15 browser windows open at a time.

-- http://aokingdom.com -- head webmaster/creator

-- He who has never made a mistake, has never made a discovery --
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 08 October 2000 :  16:03:21  Show Profile
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
heh, cool :) I just figured the same monotonous (spelled wrong I know) title is kinda... boring. The title is usually where I look first to remember what page I'm lookin at, cuz I usually have like 10-15 browser windows open at a time.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Nope, spelled right.

======
Doug G
======
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 12 October 2000 :  17:36:50  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
I'm a better speller than I thought

-- http://aokingdom.com -- head webmaster/creator

-- He who has never made a mistake, has never made a discovery --
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 12 October 2000 :  22:09:48  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
Ok... I feel kinda silly asking this, but when you put a "request(value)" what exactly is it doing?

Request.Querystring?
Request.????

I apreciate the help in understanding this.

Also, I re-wrote your function a little as follows:

<pre id=code><font face=courier size=2 id=code>
<%
tt1forumtitle = request("FORUM_Title")
tt1forumtopic = request("Topic_Title")

if tt1forumtitle = "" and tt1forumtopic = "" then

Response.Write "<title>" & strForumTitle & "</title>" & vbcrlf

elseif tt1forumtopic = "" then

Response.Write "<title>" & ChkString(Request.QueryString("FORUM_Title"),"display") & " - " & strForumTitle & "</title>" & vbcrlf

else

Response.Write "<title>" & ChkString(Request.QueryString("Topic_Title"),"display") & " - " & ChkString(Request.QueryString("FORUM_Title"),"display") & " - " & strForumTitle & "</title>" & vbcrlf

end if
%>
</font id=code></pre id=code>

with the understanding I gain from this "Request()" thing... I can probably do a little better.

<center>Reinsnitz (Mike)
<font color=red>><)))'></font id=red>

<font color=green>It's not a bug, it's a feature.</font id=green></center>
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 12 October 2000 :  22:10:44  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
<b>NOTE:</b> That last post is the style we are moving twords.

<center>Reinsnitz (Mike)
<font color=red>><)))'></font id=red>

<font color=green>It's not a bug, it's a feature.</font id=green></center>
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 12 October 2000 :  22:13:22  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
request("variable")

is the same as writing request.Querystring, I'm just too lazy :P

Oh yeah, and the tt1forumtitle thing, I named the variables so oddly so that it didnt interfere (sp?) with any of the other variables used among the forum.

-- http://aokingdom.com -- head webmaster/creator

-- He who has never made a mistake, has never made a discovery --

Edited by - da_stimulator on 12 October 2000 22:15:36
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 12 October 2000 :  22:18:08  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
oh yeah, and whats the 'vbcrlf' thing?

-- http://aokingdom.com -- head webmaster/creator

-- He who has never made a mistake, has never made a discovery --
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 12 October 2000 :  23:03:45  Show Profile
vbcrlf is a carriage-return line-feed string.

Response.write "this is " & vbcrlf & "a test"

comes out in your source as

this is
a test


======
Doug G
======
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 12 October 2000 :  23:05:17  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
vbCrLf is basicaly a carrage return

so it's writing out code... and it sees a vbCrLf, and it places a return (Char13?)

<center>Reinsnitz (Mike)
<font color=red>><)))'></font id=red>

<font color=green>It's not a bug, it's a feature.</font id=green></center>
Go to Top of Page

blkrogue
New Member

USA
79 Posts

Posted - 13 October 2000 :  05:37:12  Show Profile
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Ok... I feel kinda silly asking this, but when you put a "request(value)" what exactly is it doing?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Mike, the request("variabel-name") function, is a combination of request.querystring and the request.form ......... this way either a redirect to the asp (with all the needed variables added to the querystring) will be correctly translated by the asp redirected to (thus it will get the values for the variables) ....... but it will also correctly get the variables when you use a form (with an action and post type calling the asp-page).

We've switched here at work to using request("variable-name") is all our backend asp application as this way the frontend can either decide to have it's variables be shown in the querystring in the users browser or use hidden form fields to get the data across but not have the browser show the variables and their values.


Blkrogue

In the darkness of my soul a sparkling light has appeared
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 13 October 2000 :  05:59:53  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
Yeah I was looking around at the asp toolbox when I noticed an article saying the same thing (after I said it was another form of request.querystring, which it is in a way)

so what he said :)

<font color=red>Da_Stimulator</font id=red>
<font color=red>http://aokingdom.com</font id=red>
<font color=blue>response.write("I know what you coded last summer!")</font id=blue>
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 13 October 2000 :  11:10:40  Show Profile
If it's a concern, there is a performance hit using request("name") rather than request.form("name"). From MS:

Remarks
If the specified variable is not in one of the preceding five collections, the Request object returns EMPTY.

All variables can be accessed directly by calling Request(variable) without the collection name. In this case, the Web server searches the collections in the following order.

QueryString


Form


Cookies


ClientCertificate


ServerVariables


If a variable with the same name exists in more than one collection, the Request object returns the first instance that the object encounters.

It is strongly recommended that when referring to members of a collection the full name be used. For example, rather than Request.(AUTH_USER) use Request.ServerVariables(AUTH_USER). This will allow the server to locate the item more quickly.



======
Doug G
======
Go to Top of Page

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 13 October 2000 :  12:51:52  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
Doug is the MS Master!!

He always seems to know exactly what article is relevent for any situation relating to ASP development. It amazes me.....

Dave Maxwell
--------------
When's the next meeting of Snitzaholics Anonymous<img src=icon_smile_question.gif border=0 align=middle>
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.14 seconds. Powered By: Snitz Forums 2000 Version 3.4.07