Thread Tools Display Modes
10/13/17, 03:00 PM   #1
Drummerx04
AddOn Author - Click to view addons
Join Date: Sep 2017
Posts: 54
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)?
  Reply With Quote
10/13/17, 04:05 PM   #2
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
I've never actually seen that in action; I wonder if it was removed shortly thereafter.
  Reply With Quote
10/13/17, 04:41 PM   #3
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
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.
  Reply With Quote
10/13/17, 04:59 PM   #4
Drummerx04
AddOn Author - Click to view addons
Join Date: Sep 2017
Posts: 54
Originally Posted by Ayantir View Post
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.
  Reply With Quote
10/13/17, 05:42 PM   #5
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 408
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.
  Reply With Quote
10/13/17, 05:59 PM   #6
Drummerx04
AddOn Author - Click to view addons
Join Date: Sep 2017
Posts: 54
Originally Posted by Dolgubon View Post
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?

Last edited by Drummerx04 : 10/13/17 at 06:02 PM.
  Reply With Quote
10/14/17, 02:55 AM   #7
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
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.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Custom Links

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off