SphereCommunity
symbols in WEBLINK pls - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: symbols in WEBLINK pls (/Thread-symbols-in-WEBLINK-pls)

Pages: 1 2


symbols in WEBLINK pls - x77x - 11-27-2015 09:28 AM

can we have symbols in WEBLINK please?

Code:
[ITEMDEF i_weiwarboard]
ID=01e5e
FLIP=1
TYPE=t_normal
VALUE=80
WEIGHT=25.3
RESOURCES=20 i_board,4 i_cloth,1 i_nails,1 i_paper,1 i_feather,1 i_ink_well
SKILLMAKE=Carpentry 90.0,t_carpentry
CATEGORY=3KUO
SUBSECTION=WarBoards
DESCRIPTION=Wei
DUPELIST=01e5f

ON=@CREATE
COLOR=color_wei

ON=@DCLICK
SRC.WEBLINK chat.efnet.org:9090/?nick=<FINDLAYER(29).NAME>&channels=%23<tag.army>warroom&Login=Login
RETURN 1

notice the <FINDLAYER(29).NAME> and the <tag.army>

certain symbols dont work...

or something like this?

SRC.WEBLINK "chat.efnet.org:9090/?nick=<FINDLAYER(29).NAME>&channels=%23<tag.army>warroom&Login=Login"


RE: symbols in WEBLINK pls - Kanibal - 11-27-2015 11:11 AM

ON=@DCLICK
WEBLINK http://chat.efnet.org:9090/?nick=<src.findlayer(29).name>&channels=%23<tag.army>warroom&Login=Login
RETURN 1


RE: symbols in WEBLINK pls - x77x - 11-27-2015 12:41 PM

cant have the http

dont work

working is
WEBLINK google.com/pooponyourmom/

and you def cant have <xxx.blah> in there either

consider is a future request


RE: symbols in WEBLINK pls - Kanibal - 11-28-2015 03:12 AM

Code:
ON=@Dclick
src.weblink "forum.spherecommunity.net/Thread-symbols-in-WEBLINK-pls?test=<src.name>"
Return 1
works fine, and redirect me to
Code:
http://forum.spherecommunity.net/Thread-symbols-in-WEBLINK-pls?test=Kanibal



RE: symbols in WEBLINK pls - x77x - 11-28-2015 03:25 AM

what browser?

maybe its google chrome that sucks


try the link i originally posted

i think there is a symbol thats not recognized


RE: symbols in WEBLINK pls - Kanibal - 11-28-2015 03:28 AM

(11-28-2015 03:25 AM)x77x Wrote:  what browser?

Default system browser Firefox/IE11. Crome/Opera not tested.


RE: symbols in WEBLINK pls - Coruja - 11-28-2015 02:17 PM

it's not a sphere fault, but an HTML rule. All URLs on the entire internet must follow the HTML rules, which are followed by all browsers too
http://www.w3schools.com/tags/ref_urlencode.asp

I cant remember exactly, but in a short answer, it cant have symbols or whitespaces. Only a few symbols like &, ?, % and = are allowed, all the others symbols must be converted to their respective HTML code, eg:

! = %21
' = %27
etc

so using your example
Code:
SRC.WEBLINK chat.efnet.org:9090/?nick=<FINDLAYER(29).NAME>&channels=%23<tag.army>warroom&Login=Login
if the player name have any whitespaces it will break the URL, because URL can't have whitespaces. You must create another function to filter <FINDLAYER(29).NAME> doing all these conversions, turning whitespaces into %20, the ' symbol into %27, etc


RE: symbols in WEBLINK pls - x77x - 11-29-2015 03:48 AM

but i tried...

SRC.WEBLINK chat.efnet.org:9090/?nick=NAMEPOOP&channels=%23weiwarroom&Login=Login

and it didnt work

=)


RE: symbols in WEBLINK pls - Coruja - 11-29-2015 06:32 AM

just remove the :9090 from the URL and it will work fine
usually you don't need to specify the server port when connecting to an HTTP server, since the HTTP server already does it automatically


RE: symbols in WEBLINK pls - x77x - 11-29-2015 08:15 AM

hmmm

too different places

i need the port in there

i tired
SRC.WEBLINK chat.efnet.org%3A9090/?nick=BUBBA&channels=%23<src.tag.army>warroom&Login=Login

%3A to replace the :

and yes, the name space breaks the link =/