collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: ginfo help please  (Read 58959 times)

0 Members and 1 Guest are viewing this topic.

Offline Kyr

  • BeBot Apprentice
  • ***
  • Posts: 177
  • Karma: +0/-0
Re: ginfo help please
« Reply #15 on: January 19, 2011, 01:40:30 am »
Try this untested code:

Code: [Select]
return $this -> bot -> core("tools") -> make_blob(<font color=#6E328A face=HYBORIANSMALL>Gildeninfo!</font>", $txt, "style=text-decoration:none");


Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: ginfo help please
« Reply #16 on: January 19, 2011, 09:02:06 am »
Thanx Kyr!

I will test this later that day.
« Last Edit: January 19, 2011, 11:25:08 am by dillinger »

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: ginfo help please
« Reply #17 on: January 19, 2011, 11:25:42 am »
I testet your code and the output has the same look as before -_- The font type is correct (HYBORIANSMALL), but I'm not able to change the color at all! :(

Any idea pls?

dill

Offline Yite

  • BeBot Apprentice
  • ***
  • Posts: 152
  • Karma: +0/-0
    • Niflheim - Crom
Re: ginfo help please
« Reply #18 on: January 19, 2011, 11:55:46 am »
The colour is defined by the font color=#6E328A bit

this is a RGB (Red Green Blue) value in hex, so to analyze it:
6E is the amount of red
32 is the amount of green
8A is the amount of blue

If you want the letters to be bright red you could use:
font color=#FF0000

green => #00FF00

blue => #0000FF

white => #FFFFFF

grey => #777777

etc

A quick google search and you can find a page like this http://cloford.com/resources/colours/500col.htm which has a lot of colours and their RGB values.


-Yite [Crom]

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: ginfo help please
« Reply #19 on: January 19, 2011, 12:05:07 pm »
Ye ye Yite

I know the color tables for HTML, but my problem is: How can I colourize the static link in the !ginfo script. I tested it in a few ways, but all it changes is the font face and nothing more.

Unfortunately Kyr's code wont work also  :'(
Code: [Select]
return $this -> bot -> core("tools") -> make_blob("<font color=#6E328A face=HYBORIANSMALL>Gildeninfo!</font>", $txt, "style=text-decoration:none");
« Last Edit: January 19, 2011, 12:08:04 pm by dillinger »

Offline Yite

  • BeBot Apprentice
  • ***
  • Posts: 152
  • Karma: +0/-0
    • Niflheim - Crom
Re: ginfo help please
« Reply #20 on: January 19, 2011, 12:22:14 pm »
Right so you're not after changing the colours in the blob itself but want to change the colour of the link that is returned in guildchat or tells.

I know how to do it in static scripts with a blob, I'll post one this evening (if I remember :p) which might or might not be of help :-/

 


-Yite [Crom]

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: ginfo help please
« Reply #21 on: January 19, 2011, 12:26:41 pm »
Right so you're not after changing the colours in the blob itself but want to change the colour of the link that is returned in guildchat or tells.

I know how to do it in static scripts with a blob, I'll post one this evening (if I remember :p) which might or might not be of help :-/
Jay, that would be great! I can give you a reminder if u want ^^

Thanx!

Offline Kyr

  • BeBot Apprentice
  • ***
  • Posts: 177
  • Karma: +0/-0
Re: ginfo help please
« Reply #22 on: January 19, 2011, 02:35:28 pm »
Have you tried other color codes?  The color and face changes work for me in the scripts module.

Code: [Select]
<font color=#ff00ff face=hyborianlarge>Click here</font>

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: ginfo help please
« Reply #23 on: January 19, 2011, 03:07:54 pm »
Yeah, all I need is the code to change the link color in the "/tell" script of !ginfo...

Code: [Select]
return $this -> bot -> core("tools") -> make_blob("<font color=#6E328A face=HYBORIANSMALL>ildeninfo!</font>", $txt, "style=text-decoration:none");This code wont change the link color! -_-
« Last Edit: January 19, 2011, 03:10:48 pm by dillinger »

Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
  • Karma: +0/-0
    • AoC>TV
Re: ginfo help please
« Reply #24 on: January 19, 2011, 03:42:39 pm »
I haven't really tested this thoroughly since conanchat doesn't support hyboriansmall, but colors should work.

Code from main/14_Tools.php
Code: [Select]
        function make_blob($title, $content)
        {
                // Using " inside a blob will end the blob.
                // Convert opening and closing tags with " to '
                // Convert any other " to HTML entities.
                $content = str_replace("=\"", "='", $content);
                $content = str_replace("\">", "'>", $content);
                $content = str_replace("\"", "&quot;", $content);

                return "<a href=\"text://" . $content . "\">" . $title . "</a>";
        }
The code from Kyr won't work without modifications...

You can add a modified make_blob function to your ginfo module and use that instead of the one inside tools
(You could modify 14_Tools.php if you want, but your change will be lost when you upgrade bebot.)

Edit GuildInfo.php and add this function at the bottom or wherevever inside the class.
Code: [Select]
        function make_blob($title, $content, $attributes = '')
        {
                // Using " inside a blob will end the blob.
                // Convert opening and closing tags with " to '
                // Convert any other " to HTML entities.
                $content = str_replace("=\"", "='", $content);
                $content = str_replace("\">", "'>", $content);
                $content = str_replace("\"", "&quot;", $content);

                return "<a href=\"text://" . $content . "\"". ($attributes ? ' '. $attributes : '') .">" . $title . "</a>";
        }

Replace this:
Code: [Select]
return $this -> bot -> core("tools") -> make_blob("<font color='#6E328A' face='HYBORIANSMALL'>Gildeninfo!</font>", $txt);
with:
Code: [Select]
return $this -> make_blob("<font color='#6e328a' face='hyboriansmall'>Gildeninfo!</font>", $txt, 'style="text-decoration:none"');

Hope it works out for you.

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: ginfo help please
« Reply #25 on: January 19, 2011, 04:05:31 pm »
Big up's for you Kentarii and also thanx to Kyr!

Your code is working fine! PERFECT!

Thanx in advance!

dill

Offline Kritze

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: ginfo help please
« Reply #26 on: May 08, 2011, 10:39:08 am »
hey, how i can align the text left? <left> is not working :(

Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
  • Karma: +0/-0
    • AoC>TV
Re: ginfo help please
« Reply #27 on: May 09, 2011, 12:33:47 pm »
There is no such thing as <left>. All you need to do is remove the <center> & </center> tags.

Offline Kritze

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: ginfo help please
« Reply #28 on: May 10, 2011, 12:50:12 am »
There is no such thing as <left>. All you need to do is remove the <center> & </center> tags.

yay! works thank you so much! :D

Offline crom

  • BeBot Rookie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: ginfo help please
« Reply #29 on: June 15, 2014, 07:03:07 pm »
Hey. i know this is an old thread, but asking here anyway. is there a way to make the bot post recruit scripts in global chat?

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 149
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal