Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Apr 14, 2004 2:45 am   

Clickable HTML and E-mail links
 
Use These Two triggers to make Http:// Telnet:// ftp:// Email links open a webbrowser/email client when you click on them:

Limitations:
works with ~, Begining, End, and Middle of sentance etc. Just won't match ftp://user:pass@192.168.1.1 kind of lines. or Lines with more than one link in it with the second one containing ~
If I get back into this I'll work in out somemore

#TRIGGER {(%q)({http|ftp|telnet}://%x)(%q)} {#SUBSTITUTE {~<A '%quote(%2)'>%1%2%3~</A>}}
#TRIGGER {(%q)(%x)~@(%x)(%q)} {#SUBSTITUTE {~<A 'mailto: %quote(%2)~@%quote(%3)'>%1%2~@%3%4~</A>}}
Same as URL but for Mailto-Links
Reply with quote
geengyr
Newbie


Joined: 05 Sep 2004
Posts: 6

PostPosted: Sat Apr 23, 2005 6:25 pm   
 
does this script not work for the newest versions of zmud?
Reply with quote
Darkwytch
Novice


Joined: 20 Feb 2004
Posts: 41
Location: USA

PostPosted: Mon Jun 13, 2005 11:37 pm   
 
Ok i copied this into my command line and ... i had someone send me a link on the web... and it didnt work... am i assuming... that it doesnt work for www.whatever.com ?
Reply with quote
asm
Wanderer


Joined: 19 Jul 2004
Posts: 68

PostPosted: Tue Jun 14, 2005 12:48 am   
 
Apparently it'd need to be http://www.whatever.com.....Looks like it could be easily adapted to match something like www.whatever.com, though.
_________________
My collections of scripts.
Reply with quote
Baldur
Beginner


Joined: 20 Sep 2002
Posts: 26
Location: Austria

PostPosted: Sat Jul 02, 2005 1:21 pm   
 
You can also add https in the String list
Reply with quote
turian
Novice


Joined: 05 Jun 2004
Posts: 37
Location: USA

PostPosted: Tue Jul 05, 2005 4:40 pm   
 
asm wrote:
Apparently it'd need to be http://www.whatever.com.....Looks like it could be easily adapted to match something like www.whatever.com, though.


Only problem with just using www.whatever.com is that with http also in the list, the trigger will make it a dual link. Example:

Someone says: http://www.whatever.com

You click and it takes you. Now add in www. support.

Someone says: http://www.whatever.com

Now if you click on or after www. it doubles the link and it won't open correctly in your browser.

If this has changed since I last used a trigger like this, please let me know.
_________________
Marcus
zMUDamp v2.1 (http://www.artitumis.com/zmudamp.html)
Reply with quote
Krimzon
Newbie


Joined: 28 May 2006
Posts: 2

PostPosted: Sun May 28, 2006 12:33 am   
 
I made one that will work without having http:// at the beginning so here it goes..

#Trigger {(%q)({www.}%x)(%q)} {#SUBSTITUTE {~<A '%quote(%2)'>%1%2%3~</A>}}
Reply with quote
slicertool
Magician


Joined: 09 Oct 2003
Posts: 459
Location: USA

PostPosted: Sun May 28, 2006 2:40 am   
 
why not just do the following, since most of the time these URLs will be prefixed with a space of some sort
Code:
#trigger {(%s)({www.}%x)} {#SUBSTITUTE {"%1"~<A "http://%2">%2~</A>}}
_________________
Ichthus on SWmud: http://www.swmud.org/
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Sun May 28, 2006 6:45 pm   
 
#TRIGGER {(%q)({http://|ftp://|telnet://|www}%x)(%q)} {#SUBSTITUTE {~<A '%quote(%2)'>%1%2%3~</A>}}

Without the %q's, the period(.) at the end of the line may be captured as well.
_________________
Discord: Shalimarwildcat
Reply with quote
CyricDT
Beginner


Joined: 19 Jul 2006
Posts: 19

PostPosted: Wed Jul 19, 2006 3:10 pm   
 
sorry to be such a newbie, but where exactly does this script go? Embarassed
Reply with quote
phranq
Beginner


Joined: 11 Jul 2006
Posts: 13

PostPosted: Thu Jul 20, 2006 12:48 pm   
 
CyricDT wrote:
sorry to be such a newbie, but where exactly does this script go? Embarassed



When someone posts something in script form like

#TRIGGER {jalkjlkasdsa} Palksjdmsakld}
#ALIAS jasldkja {abskjd}

etc.

You can just copy and paste it into the command line and hit enter.
Reply with quote
CyricDT
Beginner


Joined: 19 Jul 2006
Posts: 19

PostPosted: Thu Jul 20, 2006 1:23 pm   
 
ahh, ok, thank you.
Reply with quote
Vandon
Newbie


Joined: 12 Mar 2006
Posts: 1

PostPosted: Mon Jun 18, 2007 6:28 pm   Re: Clickable HTML and E-mail links
 
[quote="nexela"]
Limitations:
works with ~, Begining, End, and Middle of sentance etc.....
[/quote]

This trigger seems to not work with a URL with a & in it...like ....quote&p=6725&id=1 It seems to make the url look like quote=6752=1
or am I just doing this wrong?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Jun 18, 2007 10:39 pm   
 
I wonder if the trigger couldn't just break the link on the first space since spaces are usually represented with %20 in pasted URLs anyway. That'd make it much more versatile for FTP links and should fix those problems too.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net