Doubt in Hyperlink_URL2

Posted by Halig on Tue 24 Feb 2015 04:04 PM — 10 posts, 30,247 views.

Portugal #0
Hi to all. I've downloaded the plugin. What do i have to change in order for the hyperlink showned to become blue?
For example, is someone sends me a tell with an http://afdscsa.com, it keeps showing that in yellow (colour of the tell). I wanted to make that blue.
Thank you.
USA Global Moderator #1
A large part of Hyperlink_URL2 is preserving the original color styling. You should look for the parts that set textcolour.
Portugal #2
Hi Fiendish. That's what i was trying to figure out, but i don't know where that is :(. Only want to change the colour from original to blue, an hyperlink colour.
USA Global Moderator #3
Ok, so with a glance I see a couple of quick and easy ways to do this.

One possible way to do it is...

In function reformat, where it says

table.insert(reformatted,
	{startpoint = v.start
	,endpoint = v.stop
	,textcolour = styles[styles_i].textcolour
	,backcolour = styles[styles_i].backcolour
	,style = styles[styles_i].style
	,hyperlink_number = hyperlink_number}
)

you can change that to

table.insert(reformatted,
	{startpoint = v.start
	,endpoint = v.stop
	,textcolour = ColourNameToRGB("blue")
	,backcolour = styles[styles_i].backcolour
	,style = styles[styles_i].style
	,hyperlink_number = hyperlink_number}
)
Portugal #4
Hi Fiendish. I tryed that, it changes the all line and not just the hyperlink colour.

Player tell you 'www.google.com

It would change only the www.google.com part, but it puts the all line in blue.
But thank you for your help :)
USA Global Moderator #5
I see what you mean.

Ok, instead do this...

in function onURL, where it says:


Hyperlink(
	hyperlinks[v.hyperlink_number].text -- Hyperlink
	,string.sub(line, v.startpoint, v.endpoint) -- Displayed text
	,"Go to " .. hyperlinks[v.hyperlink_number].text -- Hover text
	,RGBColourToName(v.textcolour) -- Foreground color
	,RGBColourToName(v.backcolour) -- Background color
	,1 -- Boolean: Open as a URL?
)


change that to

Hyperlink(
	hyperlinks[v.hyperlink_number].text -- Hyperlink
	,string.sub(line, v.startpoint, v.endpoint) -- Displayed text
	,"Go to " .. hyperlinks[v.hyperlink_number].text -- Hover text
	,"blue" -- Foreground color
	,RGBColourToName(v.backcolour) -- Background color
	,1 -- Boolean: Open as a URL?
)
Portugal #6
Hi Fiendish

I've tried that, but same thing. It doesn't change. If the original colour is yellow, it stays yellow.
Thank you.
USA Global Moderator #7
I tested the second one and it works for me.
Portugal #8
Fiendish,
I don't know what happened, but when i saw your post, went there and tried it again. Deleted the plugin and download it all over again. Changed what you sayed, and everything works now. Thank you for your help.
USA Global Moderator #9
Cool :)