ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Custom Links (https://www.esoui.com/forums/showthread.php?t=7409)

Drummerx04 10/13/17 03:00 PM

Custom Links
 
I got pretty excited when I came across custom links since it appeared that it would be a neat way to share data between addons in a few specific cases.

So naturally I gave it a try. Within my own addon windows and in d() prints, the custom link (and link handlers) works as advertised, but when posting the custom link in chat I just see the raw link text "|H1:custom:data1:...:dataN|htext|h"

Should I assume this is intended behavior... and in hindsight why I don't see custom links posted all over zone chat?

I guess the better question is why support custom links at all if they can't be shared (perhaps that would be a good disclaimer to include on the custom links page)?

Rhyono 10/13/17 04:05 PM

I've never actually seen that in action; I wonder if it was removed shortly thereafter.

Ayantir 10/13/17 04:41 PM

If I remember well, the character pipe is escaped when you send a message.

SendChatMessage(ANY_CHANNEL, "|H1:custom:data1:...:dataN|htext|h")

Will result in a EVENT_CHAT_MESSAGE with text = ||H1:custom:data1:...:dataN||htext||h

The double pipe is then hidden by the TextBuffer control itself.

You can check it by sending the data in saved vars.

Drummerx04 10/13/17 04:59 PM

Quote:

Originally Posted by Ayantir (Post 32906)
If I remember well, the character pipe is escaped when you send a message.

SendChatMessage(ANY_CHANNEL, "|H1:custom:data1:...:dataN|htext|h")

Will result in a EVENT_CHAT_MESSAGE with text = ||H1:custom:data1:...:dataN||htext||h

The double pipe is then hidden by the TextBuffer control itself.

You can check it by sending the data in saved vars.

So you suggesting that the StartMessage(message, channel, target) function and the like escape the | character before displaying?

That's interesting and unfortunate. (And also explains why I never see colored text in zone)

It prevents neat little things like an event calendar addon where one could send a link with event details through a whisper and then the recipient right clicking on the link to save it on his side.

Or when you want to invite a friend to a group but you don't have crown, you could like "Hey please invite [@Drummerx04] to the group" and you don't have to go through the stupid crown passing back and forth game.

Dolgubon 10/13/17 05:42 PM

http://www.esoui.com/downloads/info1582-ISummonThee.html

Also, all of these addons would need the user to press enter. And you can have addons that listen to chat.

Drummerx04 10/13/17 05:59 PM

Quote:

Originally Posted by Dolgubon (Post 32908)
http://www.esoui.com/downloads/info1582-ISummonThee.html

Also, all of these addons would need the user to press enter. And you can have addons that listen to chat.

Assuming you are talking about the little addon ideas I just stated, then pressing ENTER to send isn't really an issue for me since that's how item links already work in chat anyway.

And mentioning that addons can listen to chat sort of only validates my point. I could just have my addon scrape data from chat channels that contain the ugly exposed links and then parse that data the exact same way I would in a link handler... so why not just enable custom links within the chat channel to begin with? Chat supports item links in both display and link handlers, so I can't believe it's a technical limitation

How does one summon ZOS_ChipHilseberg for this sort of thing?

sirinsidiator 10/14/17 02:55 AM

I believe the escaping happens on the receiving end, since some links do work fine when sent via chat.
The color tags and custom links have been disabled in the past, probably because someone used them for some exploit. When the game launched it was still possible to send colored messages, but it's not something I would like to see again. ;)

Custom links on the other hand would be very useful. Right now I misappropriate a certain [Ancient Scroll] book link for my libAbilityTooltip in order to send custom links that don't look like garbage when seen by players without sidWarTools, but that's really just a hack.

p.s. some people say you need to sacrifice a goat in order to summon Chip, but I don't believe in that superstition.


All times are GMT -6. The time now is 11:54 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI