ID:1899
 
A little while ago, on the forum, somebody was asking how to make a player view a website through Dream Seeker's browser (link() opens the URL passed through it in a new window).

I thought that others might want to do the same, so here's my solution:

/*
Arguments:
    url            (self-explanatory)
    recipient      (the object who will see [url] in its browser)
    browse_options (see the ref entry for browse())
*/
proc/browse_link(url,recipient,browse_options)
    recipient << browse(\
"<html><head></head><body onLoad=\"parent.location='[url]'\">\
</body></html>",browse_options)

//an example
client/verb/test_browse_link()
    //everybody will have google.com in their browser
    browse_link("http://google.com",world)
</<>
Gug, would you mind adding the following to this website's CSS?


.dmcode {color: #000010; background-color: #ffffff;}

.dmcomment {color: #808080;}

.dmpreprocessor {color: #008000;}

.dmkeyword {color: #0000ff;}

.dmstring {color: #0096b4;}

.dmbrace {color: #005064;}


This time, I ended up going through and manually going through my code, writing "<font color='whatever'>"
, but if you add the above in, I can just copy the source from whatever my DM Syntax Highlighter outputs. =P
<div class="dmcomment">It's done!</div>
Doh.
Thanks, Gug =).