Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Doubt in Hyperlink_URL2

Doubt in Hyperlink_URL2

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Halig   Portugal  (123 posts)  Bio
Date Tue 24 Feb 2015 04:04 PM (UTC)
Message
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.
Top

Posted by Fiendish   USA  (2,535 posts)  Bio   Global Moderator
Date Reply #1 on Tue 24 Feb 2015 06:41 PM (UTC)
Message
A large part of Hyperlink_URL2 is preserving the original color styling. You should look for the parts that set textcolour.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Halig   Portugal  (123 posts)  Bio
Date Reply #2 on Tue 24 Feb 2015 07:18 PM (UTC)
Message
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.
Top

Posted by Fiendish   USA  (2,535 posts)  Bio   Global Moderator
Date Reply #3 on Sat 28 Feb 2015 11:45 PM (UTC)
Message
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}
)

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Halig   Portugal  (123 posts)  Bio
Date Reply #4 on Sun 01 Mar 2015 08:17 AM (UTC)
Message
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 :)
Top

Posted by Fiendish   USA  (2,535 posts)  Bio   Global Moderator
Date Reply #5 on Sun 01 Mar 2015 05:16 PM (UTC)
Message
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?
)

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Halig   Portugal  (123 posts)  Bio
Date Reply #6 on Sat 07 Mar 2015 03:10 PM (UTC)
Message
Hi Fiendish

I've tried that, but same thing. It doesn't change. If the original colour is yellow, it stays yellow.
Thank you.
Top

Posted by Fiendish   USA  (2,535 posts)  Bio   Global Moderator
Date Reply #7 on Sun 08 Mar 2015 05:29 PM (UTC)
Message
I tested the second one and it works for me.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Halig   Portugal  (123 posts)  Bio
Date Reply #8 on Sun 08 Mar 2015 05:35 PM (UTC)
Message
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.
Top

Posted by Fiendish   USA  (2,535 posts)  Bio   Global Moderator
Date Reply #9 on Sun 08 Mar 2015 05:36 PM (UTC)
Message
Cool :)

https://github.com/fiendish/aardwolfclientpackage
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


21,819 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.