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)
 URL pop in new window
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

fletch
Starting Member

USA
9 Posts

Posted - 30 August 2000 :  01:23:02  Show Profile  Visit fletch's Homepage  Send fletch an AOL message  Send fletch an ICQ Message
It would be nice to have the web links pop a new window. That way users could stay in the forum and surf the web link in a new browser. A simple:
<pre id=code><font face=courier size=2 id=code> <a href="http://www.linkaddy.com" target="_new"></font id=code></pre id=code>

shoulde do the trick... but maybe I missed something.

-fletch

"Badgers! Badgers! We don't need no stinking Badgers" -UHF

Edited by - fletch on 30 August 2000 01:25:53

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 30 August 2000 :  01:27:29  Show Profile
But the links do pop up in a new window. When someone enters a url in thier post and you click on it, it opens a new window. Unless you are refering to the URLs on the front page of the forum.

"What part of 'Thou Shalt Not Kill' don't you understand?" - God
Go to Top of Page

fletch
Starting Member

USA
9 Posts

Posted - 30 August 2000 :  01:31:07  Show Profile  Visit fletch's Homepage  Send fletch an AOL message  Send fletch an ICQ Message
Yup, I was refering to the web links on the front page of the forum. <img src=icon_smile.gif border=0 align=middle>

"Badgers! Badgers! We don't need no stinking Badgers" -UHF
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 30 August 2000 :  01:31:21  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
fletch is referring to the urls you set for the category by clicking the earth icon <img src="icon_url.gif" border=0>. These are the ones that don't seems to point to a new target window.

- Alan <img src="http://smilecwm.tripod.com/net3/smileJap.gif" border=0>
Go to Top of Page

fletch
Starting Member

USA
9 Posts

Posted - 30 August 2000 :  02:26:55  Show Profile  Visit fletch's Homepage  Send fletch an AOL message  Send fletch an ICQ Message
Ok, I took a little time and stopped being whiney and looked at it myself. It actually is a very simple change. All I did was add a simple target="_new" to line 173 in the stock default.asp page of Version 3 final. I am still doing some testing on it. but it haven't come across any problems with IE and Netscape on Windows and Mac(yes is am testing freak). For those who might have some confusion on where to add this, or have a modified version of the Default.asp page here is the code:

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
<td<% if rsForum("F_TYPE") = 1 then Response.Write(" colspan=4") %> bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if rsForum("F_TYPE") = 0 then Response.Write("FORUM.asp?FORUM_ID=" & rsForum("FORUM_ID") & "&CAT_ID=" & rsForum("CAT_ID") & "&Forum_Title=" & ChkString(rsForum("F_SUBJECT"),"urlpath")) else if rsForum("F_TYPE") = 1 then Response.Write(rsForum("F_URL")) end if %>" target="_new"><% =ChkString(rsForum("F_SUBJECT"),"display") %></a><br>

<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

-fletch

"Badgers! Badgers! We don't need no stinking Badgers" -UHF


I switched from code to quote in hopes of saving some space and scoll.

Edited by - fletch on 30 August 2000 02:28:44
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 30 August 2000 :  02:47:09  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
Thanks for finding that line number.

I changed the target to "_blank" instead of "_new" because "_new" actually directs to a window named "_new" while "_blank" will point to a "blank" window for every link clicked.

- Alan <img src="http://smilecwm.tripod.com/net3/smileJap.gif" border=0>
Go to Top of Page

fletch
Starting Member

USA
9 Posts

Posted - 30 August 2000 :  02:53:36  Show Profile  Visit fletch's Homepage  Send fletch an AOL message  Send fletch an ICQ Message
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>

I changed the target to "_blank" instead of "_new" because "_new" actually directs to a window named "_new" while "_blank" will point to a "blank" window for every link clicked.

<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Yeah I came across that same problem once I got deeper into to testing it, I just had yet to post on it. I made that change and everything seems to be ok now.

-fletch[:D}
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 30 August 2000 :  03:20:56  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
Hey, wait a minute...There's an if/then statement in there that checks for the forum type. IF we just go target="_new" it WILL affect both the url's as well as the category so that they will both pop up in the new window. and we don't want categories to pop up in a different window.

Man that line 173 (in sr2) or line 248 (in beta 2) is one monster of a line.

- Alan <img src="http://smilecwm.tripod.com/net3/smileJap.gif" border=0>
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 30 August 2000 :  05:30:05  Show Profile  Visit gor's Homepage
Try this (split the line in 3 lines)

<pre id=code><font face=courier size=2 id=code><font color=red><s>
<td<% if rsForum("F_TYPE") = 1 then Response.Write(" colspan=4") %> bgcolor="<% =strForumCellColor %>" valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<a href="<% if rsForum("F_TYPE") = 0 then Response.Write("FORUM.asp?FORUM_ID=" & rsForum("FORUM_ID") & "&CAT_ID=" & rsForum("CAT_ID") & "&Forum_Title=" & ChkString(rsForum("F_SUBJECT"),"urlpath")) else if rsForum("F_TYPE") = 1 then Response.Write(rsForum("F_URL") <font color=blue>& " target=""_blank"" "</font id=blue>) end if %>">
<% =ChkString(rsForum("F_SUBJECT"),"display") %></a><br>
</s></font id=red></font id=code></pre id=code>


<b>Pierre Gorissen </b><img src="http://www.homepages.hetnet.nl/~pgoris01/burnout.gif" border=0>
<font color=purple><font size=1>A fool learns from experience... a wise man learns from others...</font id=size1></font id=purple>
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 30 August 2000 :  07:33:46  Show Profile  Visit gor's Homepage
Woops, wrong code. This code has been tested and added to Beta 3:

<pre id=code><font face=courier size=2 id=code>
else
if rsForum("F_TYPE") = 1 then %>
<a href="<% =rsForum("F_URL") <font color=blue>& """ target=""_blank"</font id=blue> %>"><img src="icon_url.gif" height=16 width=16 border=0 hspace=0></a>
<%
end if
end if %>
</td>
<td<% if rsForum("F_TYPE") = 1 then Response.Write(" colspan=4") %> bgcolor="<% =strForumCellColor %>" valign="top">
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if rsForum("F_TYPE") = 0 then Response.Write("FORUM.asp?FORUM_ID=" & rsForum("FORUM_ID") & "&CAT_ID=" & rsForum("CAT_ID") & "&Forum_Title=" & ChkString(rsForum("F_SUBJECT"),"urlpath")) else if rsForum("F_TYPE") = 1 then Response.Write(rsForum("F_URL") <font color=blue>& """ target=""_blank"</font id=blue>) end if %>"><% =ChkString(rsForum("F_SUBJECT"),"display") %></a><br>
<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<% = rsForum("F_DESCRIPTION") %>
</font></td>
</font id=code></pre id=code>

Take a good look at where I used <b>"""</b> , <b>""</b> and were <b>"</b> !


<b>Pierre Gorissen </b><img src="http://www.homepages.hetnet.nl/~pgoris01/burnout.gif" border=0>
<font color=purple><font size=1>A fool learns from experience... a wise man learns from others...</font id=size1></font id=purple>
Go to Top of Page

fletch
Starting Member

USA
9 Posts

Posted - 30 August 2000 :  09:24:12  Show Profile  Visit fletch's Homepage  Send fletch an AOL message  Send fletch an ICQ Message
Thanks Pierre, found the similar code in the version i have and it works like a charm.

-fletch
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 30 August 2000 :  13:18:01  Show Profile
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
<pre id=code><font face=courier size=2 id=code>
else
if rsForum("F_TYPE") = 1 then %>
<a href="<% =rsForum("F_URL") <font color=blue>& """ target=""_blank"</font id=blue> %>"><img src="icon_url.gif" height=16 width=16 border=0 hspace=0></a>
<%
end if
end if %>
</td>
<td<% if rsForum("F_TYPE") = 1 then Response.Write(" colspan=4") %> bgcolor="<% =strForumCellColor %>" valign="top">
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if rsForum("F_TYPE") = 0 then Response.Write("FORUM.asp?FORUM_ID=" & rsForum("FORUM_ID") & "&CAT_ID=" & rsForum("CAT_ID") & "&Forum_Title=" & ChkString(rsForum("F_SUBJECT"),"urlpath")) <font color=red>else if</font id=red> rsForum("F_TYPE") = 1 then Response.Write(rsForum("F_URL") <font color=blue>& """ target=""_blank"</font id=blue>) end if %>"><% =ChkString(rsForum("F_SUBJECT"),"display") %></a><br>
<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<% = rsForum("F_DESCRIPTION") %>
</font></td>
</font id=code></pre id=code>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Should it be "else if" or "elseif" ?

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

fletch
Starting Member

USA
9 Posts

Posted - 30 August 2000 :  13:40:46  Show Profile  Visit fletch's Homepage  Send fletch an AOL message  Send fletch an ICQ Message
Doh, open mouth insert foot, replied and forgot to scroll that mile to the right =)

Good question Doug <img src=icon_smile.gif border=0 align=middle>

My next question is going to be about how to fix the scrolling so I don't aquire a taste for my foot.



Edited by - fletch on 30 August 2000 13:44:50
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 30 August 2000 :  13:56:47  Show Profile  Visit gor's Homepage
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Should it be "else if" or "elseif" ?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Doug -

It should be "else if"
Both would be right, it just happened to be that way in the code
<pre id=code><font face=courier size=2 id=code>
if test1 then
action 1
else
if test 2 then
action 2
end if
end if
</font id=code></pre id=code>
does the same as:
<pre id=code><font face=courier size=2 id=code>
if test1 then
action 1
elseif test 2 then
action 2
end if
</font id=code></pre id=code>

fletch -

The scrolling is by design, the place you put your foot however was <b>not</b> designed for that ! <img src=icon_smile_tongue.gif border=0 align=middle><img src=icon_smile_wink.gif border=0 align=middle>


<b>Pierre Gorissen </b><img src="http://www.homepages.hetnet.nl/~pgoris01/burnout.gif" border=0>
<font color=purple><font size=1>A fool learns from experience... a wise man learns from others...</font id=size1></font id=purple>
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 30 August 2000 :  16:08:21  Show Profile
But I don't see the closing "end if" for the way it's written. The code resembles

<pre id=code><font face=courier size=2 id=code>
if test1 then
action 1
else
if test 2 then
action 2
end if
<font color=red>where is the end if?</font id=red>
%>
</font id=code></pre id=code>
Or am I missing something? The code would have the correct number of end if's if the statement was "elseif"



======
Doug G
======

Edited by - Doug G on 30 August 2000 16:10:16
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 30 August 2000 :  18:27:14  Show Profile  Visit gor's Homepage
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
But I don't see the closing "end if" for the way it's written. The code resembles

<pre id=code><font face=courier size=2 id=code>
if test1 then
action 1
else
if test 2 then
action 2
end if
<font color=red>where is the end if?</font id=red>
%>
</font id=code></pre id=code>
Or am I missing something? The code would have the correct number of end if's if the statement was "elseif"
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

If you would enter the code like you did it would cause an error.
<b>But</b> you don't need an end if, when you use if XXX then YYY on one line.

You have to read the code like this:
<pre id=code><font face=courier size=2 id=code>
if test1 then
action 1
else
if test 2 then action 2
end if
</font id=code></pre id=code>

You can try it with some simpler code. This doesn't cause an error:
<pre id=code><font face=courier size=2 id=code>
<%
test = 1
if test = 1 then
Response.Write("hello")
else
if test = 1 then Response.Write("bye")
end if
%>
</font id=code></pre id=code>




<b>Pierre Gorissen </b><img src="http://www.homepages.hetnet.nl/~pgoris01/burnout.gif" border=0>
<font color=purple><font size=1>A fool learns from experience... a wise man learns from others...</font id=size1></font id=purple>
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.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07