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: General / Classic ASP versions(v3.4.XX)
 Make links open in same page.
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

James
Average Member

USA
539 Posts

Posted - 31 December 2003 :  15:11:51  Show Profile  Visit James's Homepage
I haven't messed with snitz much (other than mainting my site) for a while so maybe I forgot something. I'd like to know how to make links in a message open in the same browser window instead of opening a new browser page? Seems I remember there was a way to do this.

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

laser
Advanced Member

Australia
3859 Posts

Posted - 31 December 2003 :  15:34:29  Show Profile
This is on my "MODs to write" list, but I wanted only links from the current site to open in the current window, and external links in a new window.

Maybe I'll find the time in the next few days
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 31 December 2003 :  16:23:25  Show Profile  Visit James's Homepage
That's what I'm trying to do, open pages from my site in the same window. I'm happy with pages to external sites opening a new window.

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 31 December 2003 :  17:11:03  Show Profile
OK, I've narrowed it down to the ReplaceURLs function in inc_func_common.asp, and I'm working my way thru that but I have some other things on the agenda this morning so I'll get back to it when I can.
Go to Top of Page

Jeepaholic
Average Member

USA
697 Posts

Posted - 18 February 2004 :  17:55:47  Show Profile  Visit Jeepaholic's Homepage
Any code for this? I've been mutzing around with it, and can't seem to get it to work myself...

Al Bsharah
Aholics.com

Jeepaholics Anonymous
Broncoholics Anonymous
Network Insight
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 18 February 2004 :  18:27:16  Show Profile
LOL !!! .. I haven't touch it since it's off the radar completely at the moment.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 18 February 2004 :  19:57:28  Show Profile  Send ruirib a Yahoo! Message
Haven't tried it, but I guess, from a quick look at it, that it would be as easy as replacing all ocurrences of """ target=""_blank"">" by ">", in the replaceURLs function.

I also think you may need to remove the target=\"_blank\" parts from the edit_hrefs function, also in inc_func_common.asp.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 18 February 2004 :  20:12:09  Show Profile
You don't want to remove all though, only the ones where the link is the same domain you are on at the moment.
Go to Top of Page

Jeepaholic
Average Member

USA
697 Posts

Posted - 18 February 2004 :  20:35:44  Show Profile  Visit Jeepaholic's Homepage
quote:
Originally posted by ruirib

Haven't tried it, but I guess, from a quick look at it, that it would be as easy as replacing all ocurrences of """ target=""_blank"">" by ">", in the replaceURLs function.

I also think you may need to remove the target=\"_blank\" parts from the edit_hrefs function, also in inc_func_common.asp.

Already tried that, Rui... Actually, I added duplicate functions (one to open new links, one to not) for each of those, but it doesn't seem to be working. This is so that my main page (the "What's New" section) doesn't open up a new window:
http://www.jeepaholics.com/default.asp

The code is parsed using inc_func_common.asp, and the "GO" and "DISCUSS" buttons are directly in the post they came from.
AL

Al Bsharah
Aholics.com

Jeepaholics Anonymous
Broncoholics Anonymous
Network Insight

Edited by - Jeepaholic on 18 February 2004 20:36:25
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 19 February 2004 :  18:06:23  Show Profile  Send ruirib a Yahoo! Message
Al, I would say it must be one of those. Searched through all the Snitz files, and there is no "_blank" elsewhere that could be responsible for this behavior...


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Jeepaholic
Average Member

USA
697 Posts

Posted - 19 February 2004 :  18:10:15  Show Profile  Visit Jeepaholic's Homepage
That's the same conclusion I came to. Bizarre. Going to have to dig deeper and see if I'm missing something...

Al Bsharah
Aholics.com

Jeepaholics Anonymous
Broncoholics Anonymous
Network Insight
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 19 February 2004 :  18:24:32  Show Profile  Send ruirib a Yahoo! Message
For URLs that start with "http://", you just need to remove the red part, at line# 1545, in edit_hrefs function, inc_func_common.asp:

if (iType == 1) {
		sOutput = sOutput.replace(/\b(http\:\/\/[\w+\.]+[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
			"<a href=\"$1\" target=\"_blank\">$1<\/a>");

Just tested it and it worked as expected, that is, no new window when opening the URL.


Snitz 3.4 Readme | Like the support? Support Snitz too

Edited by - ruirib on 19 February 2004 18:27:12
Go to Top of Page

ajhvdb
Junior Member

Netherlands
392 Posts

Posted - 19 February 2004 :  18:49:47  Show Profile
I've a changed ReplaceURLs function. If an url does NOT start with "http:" the new page starts in the same window. I can post it if you want but it's large.
Go to Top of Page

Jeepaholic
Average Member

USA
697 Posts

Posted - 19 February 2004 :  23:17:04  Show Profile  Visit Jeepaholic's Homepage
Thanks guys, I'll play around some more. I'm sure it's something silly that I'm missing...

Al Bsharah
Aholics.com

Jeepaholics Anonymous
Broncoholics Anonymous
Network Insight
Go to Top of Page

Jeepaholic
Average Member

USA
697 Posts

Posted - 20 February 2004 :  02:20:59  Show Profile  Visit Jeepaholic's Homepage
Ok...so, it boils down to IMAGE LINKS. Regardless of the line we've been pointing to, if the link is an actual image (i.e. [ url = "blah.blah.blah" ] [ img ] blah.blah.blah [ /img ] [ /url ] ) it still pops open a new window.

So, thoughts on where to make this adjustment?

Realistically, I think what would be awesome is if links to the same site opened in the same window...whereas links to OTHER sites opened in new windows. But, beggars can't be choosers!

Al Bsharah
Aholics.com

Jeepaholics Anonymous
Broncoholics Anonymous
Network Insight

Edited by - Jeepaholic on 20 February 2004 02:22:51
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.59 seconds. Powered By: Snitz Forums 2000 Version 3.4.07