You are here

Hyper links

15 posts / 0 new
Last post
Rapscallion
Offline
Last seen: 3 years 4 months ago
Joined: 2008-11-18 16:19
Hyper links

Would it be possible to change all external hyperlinks in the forums to open a new tab/window. It is slightly frustrating when i forget to hold control when clicking on a link and then need to go back again. If I'm being overly picky, sorry Smile

BTW - I really appreciate all the hard work that everyone has put into making the PA platform/apps a success. I would be lost without it.

John T. Haller
John T. Haller's picture
Offline
Last seen: 4 hours 7 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Nope

Opening in a new window isn't what users expect. Websites that do it are annoying and take control away from the user in a lame attempt to try to keep the user from leaving their site. If you want it in a new window, you can middle or control-click yourself... that way you're in control.

Sometimes, the impossible can become possible, if you're awesome!

Rapscallion
Offline
Last seen: 3 years 4 months ago
Joined: 2008-11-18 16:19
Thanks for the quick

Thanks for the quick response. I understand your reasoning for doing it the way you do, however I would have to disagree that it is annoying. I personally like it when a site opens a external link in a new window. For example if I am browsing PA forums, its because I want to be in the PA forums. When I click on a link that brings me to another site it is usually "supplemental info" on what i am currently reading (more detailed info etc). To have to go back to the site/thread I was initially at is tiresome (in my opinion). I agree that this is definitely a personal preference, but in my experience it would seem that most prefer it this way.

It amazes me that on the internet you can be anything you want, and yet so many people still choose to be idiots.

Jimbo
Offline
Last seen: 4 years 3 months ago
Joined: 2007-12-17 05:43
100% with JTH on this one

Sorry, but a quick straw poll in the office here about forced new tabs adds five people who completely agree with JTH's view, and none who agree with yours.

The current way, if you wish, you can open the links wherever you like, including doing this automaticall, as was pointed out, if you use TMP.

Your way, no matter what we did, we would be unable to change the preference back to the one that isn't annoying, slower, wasteful of memory resources, and restricting of user choice.

When something is a matter of personal preference, and one option give the end-user control, whereas the other takes that control away, I'd say it was a no-brainer to go with the controllable one.

Rapscallion
Offline
Last seen: 3 years 4 months ago
Joined: 2008-11-18 16:19
I guess it depends on who you

I guess it depends on who you work with, because here most people prefer it "my way" Wink However I concede that both you and John are right, and "my way" would take the choice away from the end user. I tried to state that this was my personal preference, but did not do a good job of getting that across :-). I know that when managing a site you have to try to accommodate everyone, and as such "John's way" is the best way to do this.

I will use TMP to do what I want and everyone will be happy.

It amazes me that on the internet you can be anything you want, and yet so many people still choose to be idiots.

NathanJ79
NathanJ79's picture
Offline
Last seen: 4 years 3 months ago
Joined: 2007-07-31 15:07
Or use TMP

Tab Mix Plus for Firefox. I've got mine tuned just how I like it.

When I come up here for a daily visit (been here 24 hours before or less) I head right to the tracker (click "Recent posts" under your name on the left) and protect the tab - I do that by middle-clicking on it. Then every topic I open opens in a new tab. If it's uninteresting, I just close the tab to snap back to the list. Or if it is interesting, I leave my comment and close the tab, same situation.

If it's been a few days, I open the forum index and protect the tab. I then open the first forum, and protect that tab. And then the updated topics, it's business as usual.

I save a lot of time this way, and unless I have a really long reply to post, I can usually keep on top of what's new in the shortest amount of time possible.

Long story short: protect your tabs. It's a good feature if you learn it.

//edit: You said external links. Aren't external links supposed to open in a new window? Especially on a forum. With a tabbed browser, a link in a forum that opens in the same tab can be disruptive, especially if you've already started working on your reply (but then again, you could have protected your tab). I disagree that new-window links are necessarily malicious, unless, of course, they are, but as a general statement I think that's better. Though I might disagree if I were using IE.

Rapscallion
Offline
Last seen: 3 years 4 months ago
Joined: 2008-11-18 16:19
Great, thanks for the info.

Great, thanks for the info. I use Firefox almost exclusively (with tab mix plus), but have never used this feature. I will definitely do this from now on. Thanks Smile

It amazes me that on the internet you can be anything you want, and yet so many people still choose to be idiots.

José Pedro Arvela
Offline
Last seen: 5 years 4 months ago
Joined: 2007-07-10 07:29
Or Greasemonkey

I just made this Javascript snippet code to make all external links have the attribute necessary to make it open on a new window (target="_blank"). You need Greasemonkey or any way of injecting scripts into websites for it to work, so it works in browsers other than Firefox and doesn't need the tab to be protected using Tab Mix Plus.

// userscripts header would go into here if it wasn't automatic links
// Script made by PTMblogger

// identify all threads
var threads = document.getElementsByClassName("content");

// for each thread, do...
for (var nr = threads.length - 1; nr >= 0; nr--) {
	// identify this thread
	var thread = threads[nr];
	
	// get links of thread
	var threadlinks = thread.getElementsByTagName("a");
	
	// for each link, do...
	for (var amount = threadlinks.length - 1; amount >= 0; amount--) {
		// identify this link
		var link = threadlinks[amount];

		// detect link address
		var linkhref = link.getAttribute("href");

		// define a pattern to decide if the link goes to an outer domain or not
		var pattern = new RegExp("^http://(?!portableapps.com/)", "i");
		
		// if the pattern matches, result is true
		var result = pattern.test([linkhref]);

		// if the patter match is true, then the link is external and actions should be taken
		if ( result = true ) {
			// add it the new attribute that opens the link in a new window
			link.setAttribute("target", "_blank");
		}
	}
}

I am a beginner in Javascript, and if the regexp wasn't an enough hell, I absolutely failed to add a rel="external" to external links due to being unable to make the if/else statement work. So this only makes external links open in new tabs.

Blue is everything.

Bruce Pascoe
Offline
Last seen: 12 years 4 months ago
Joined: 2006-01-15 16:14
...

Protecting tabs seems superfluous. Personally, I've disciplined myself to always middle-click on index pages (forum lists, topic lists, etc.) so I don't lose the index. Protecting tabs just sounds like a way to confuse you if you're not careful (if you get too used to a left click opening a new tab, you might forget that it doesn't on an unprotected tab).

Firefox users depend too much on their extensions, methinks. I guess because I grew up with IE, I've never felt they were important. I used a few extensions back when Firefox was my browser of choice, but I'm now using Chrome and I don't really miss any of them (with the possible exception of CoLT, but I feel that "Copy Link Text" should be a standard feature in browsers anyway--why it's not is beyond me).

EspaÑaks (not verified)
Doesn't ur mouse have a wheel

Doesn't ur mouse have a wheel button? If you are using a web browser which is more modern that IE6, it would generate a new tab with the link you havee the mouse on, just as CTRL+click.

qwertymodo
qwertymodo's picture
Offline
Last seen: 11 years 10 months ago
Joined: 2008-03-17 19:08
Unless you're on Vista

where the wheel click is often set to window flip 3D.

Quamquam omniam nescio, nec nihil scio.

Bruce Pascoe
Offline
Last seen: 12 years 4 months ago
Joined: 2006-01-15 16:14
I've been using Vista

since it came out and now use the Windows 7 beta, and the wheel has never opened Flip3D for me--it's always a middle click. Must be specific to OEM-installed mouse software. I personally never leave a computer in its OEM factory state--it gets wiped out almost immediately after I buy it.

qwertymodo
qwertymodo's picture
Offline
Last seen: 11 years 10 months ago
Joined: 2008-03-17 19:08
Hmm

No, this is a custom built machine with a Logitech mouse, and the wheel-click is set to "system default" and when I click with the wheel (push it like a button), Flip3D comes up. I never use the button or Flip3D so I know I've never changed the setting... anyway, ctrl+click opens the link in a new tab regardless, which is kind of the point here.

Quamquam omniam nescio, nec nihil scio.

Bruce Pascoe
Offline
Last seen: 12 years 4 months ago
Joined: 2006-01-15 16:14
I bet you have the Logitech

I bet you have the Logitech software that comes with the mouse installed, then. Because the normal mouse control panel in Vista doesn't even have any options to change the behavior of the buttons (other than to swap the left/right buttons for southpaws).

qwertymodo
qwertymodo's picture
Offline
Last seen: 11 years 10 months ago
Joined: 2008-03-17 19:08
Aha

Yes, that's it... and apparently it updated itself recently. You're right, the wheel click is set to "Document Flip" which I assume translates to Flip3D...

Quamquam omniam nescio, nec nihil scio.

Log in or register to post comments