|
|
|
|
Thread title: Warning, Leaving Site |
|
|
|
|
|
Thread tools
Search this thread
Display Modes
|
|
04-17-2008, 04:13 AM
|
#1
|
Status: Junior Member
Join date: Apr 2008
Location:
Expertise:
Software:
Posts: 27
|
Warning, Leaving Site
I have wordpress installed is their any plug in or script I can Install so when the user clicks a external link it displays a message?
|
|
04-17-2008, 04:52 AM
|
#2
|
Status: Creatistic
Join date: Jul 2006
Location: Arizona
Expertise:
Software:
Posts: 1,726
|
|
|
04-17-2008, 05:07 AM
|
#3
|
Status: Request a custom title
Join date: Dec 2005
Location: Arizona
Expertise:
Software:
Posts: 5,200
|
Originally Posted by BrokenFaith
|
IT'S A CONSPIRACY!
|
|
04-17-2008, 06:04 AM
|
#4
|
Status: Junior Member
Join date: Apr 2008
Location:
Expertise:
Software:
Posts: 27
|
Oh oops, So is their a way to do this?
|
|
04-17-2008, 06:13 AM
|
#5
|
Status: Creatistic
Join date: Jul 2006
Location: Arizona
Expertise:
Software:
Posts: 1,726
|
|
|
04-17-2008, 06:22 AM
|
#6
|
Status: Waving
Join date: Aug 2005
Location:
Expertise:
Software:
Posts: 2,694
|
<offtopic kinda="true" ignore="at-own-will">I was getting ready to make a smart ass comment due to the topic title...
kbyegoodtoknowukthxbye</offtopic>
One idea I have, is to use a tool like Prototype, to get every link with the http:// in the href attribute, and addon a "onclick" handler, which will take them to a url that is specified.
I will write one for you.
|
|
04-17-2008, 06:32 AM
|
#7
|
Status: Waving
Join date: Aug 2005
Location:
Expertise:
Software:
Posts: 2,694
|
www.xhtmlthis.com/tutorial/test.html
Update:
Download the Prototype Library, and include it on your page.
Then use this code:
Code:
Event.observe(window, 'load', function() {
$$('a[href^="http://"]').each(function(element) {
element.observe('click', function(event) {
window.location = 'http://www.xhtmlthis.com/tutorial/url.php?url='+this.href;
Event.stop(event);
}.bindAsEventListener(element))
});
});
It will look for all URLS with http:// in the beginning and do what you want when they click on it. So in this case go to a php page that asks them.
You can test it out, I have different examples on the page. When they redirect it will give you an example of what you wanted.
Update 2:
I am going to make a Greasescript for this, to prank people
All links will go to some random site.
|
|
04-17-2008, 06:45 AM
|
#8
|
Status: Member
Join date: May 2007
Location: Great Britain
Expertise:
Software:
Posts: 167
|
I'm not sure that's what he wanted exactly.
I think he wants something where you click a link which is linked to an external website and a pop-up appears with a message, then you click 'Ok' to continue..
Pretty much what you done though, Garrett. It's the same concept.
|
|
04-17-2008, 06:49 AM
|
#9
|
Status: Waving
Join date: Aug 2005
Location:
Expertise:
Software:
Posts: 2,694
|
Originally Posted by Josh Greenaway
I'm not sure that's what he wanted exactly.
I think he wants something where you click a link which is linked to an external website and a pop-up appears with a message, then you click 'Ok' to continue..
Pretty much what you done though, Garrett. It's the same concept.
|
For what he asked for, that's what he wants. He didn't say a new window, or anything about clicking.
Anyhow, this is very customizable as I said. The variable that has the url is "this.href" so you can go ahead and do what you want and replace window.location..
|
|
04-17-2008, 04:54 PM
|
#10
|
Status: #pugs {display: block;}
Join date: Jan 2007
Location: Chicago
Expertise: CSS, HTML, PHP
Software: Sublime Text 2
Posts: 1,187
|
It sounds like he wants something similar to how Myspace alerts you when you're leaving their website and if you want to continue to the link you clicked on.
|
|
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
|
|