PDA

View Full Version : [Old][Fixed] Colors for different sections


Quincy
12-04-2004, 05:23 PM
Hi all.
I'm using ioBanana v2.0 and the ioB_dZS.skin and would like the IRC announces for different %sections colored differently (just the %sections part) Is that possible?

Harm
12-04-2004, 05:27 PM
There's a %scolor cookie that is replaced with the section's color code (or the default color code if there's none available).
Check the default ioBanana.tcl, there might be one or two examples of per section color codes. Then, use [c]%scolor <text> [c] in your *.skin file.

Quincy
12-04-2004, 06:29 PM
Have modified ioBanana.tcl in this way:
# Default color for irc announces
set ioBvar(color1) 3
# Per section colors
set color(stuff) 15
set color(txtfiles) 11
set color(pics) 4

and the skin like this:

set announce(NEWDIR) "\[[c]%scolor stuff [c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group."

set announce(NEWDIR) "\[[c]%scolor txtfiles [c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group."

set announce(NEWDIR) "\[[c]%scolor pics [c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group."

It gives different colors according to those set in ioBanana.tcl but on chan it announces the same directory (lets say txtfiles) whatever the section in which ur creating a new dir.
Feel thats not the way to modify the skin...
:rolleyes:

Harm
12-05-2004, 01:36 AM
Huh ? The %section cookie is still needed. And when you set a variable again, the old one is gone.

Quincy
12-05-2004, 04:52 AM
Ok thanks!
Still have problem tho. Now my ioB_dZS.skin look like this

set announce(NEWDIR) "\[[c]%scolor STUFF [b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"
set announce(NEWDIR) "\[[c]%scolor PICS[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"
set announce(NEWDIR) "\[[c]%scolor TXTFILES[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"
set announce(NEWDIR) "\[[c]%scolor OLD[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"

However, announcing in chan will always merge the dir in which a newdir is created and the last dir listed in the skin.
I.e. if you're uploading in PICS, announce in irc will be: [ PICSOLD].
Mmmhh:confused:

Harm
12-05-2004, 06:03 AM
You must have only *ONE* $announce(NEWDIR) variable.

set announce(NEWDIR) "\[[c]%scolor[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"

And that's all.

The %scolor cookie is replaced with the section's color and the %section one with the section's name.

Beware, sections are case sensitive.
set color(stuff) "7"
is different from
set color(STUFF) "7"

Quincy
12-05-2004, 08:08 AM
hey, THANKS:banana:

qba
12-05-2004, 03:48 PM
If you can only have one variable for the scookie, how can different sections have different colours?

give me a better explanation please

Quincy
12-05-2004, 05:34 PM
Colors per section are defined in iobanana.tcl, in the Appearance list, like this:

set color(section name) 7

where the number deals with the color palette in mirc

qba
12-05-2004, 05:38 PM
I knwo that, but the function does not work, how do i fix it manually?

Quincy
12-06-2004, 07:05 AM
Actually it didnt work for me too, but dunno whats wrong.

Anyway I temporarily solved the problem mentioned above by setting colors in iobanana.tcl and configuring the iob_dzsbot.skin in this way:

set announce(NEWDIR) "\[[c]%scolor OLD[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"

set announce(NEWDIR) "\[[c]%scolor STUFF[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"

set announce(NEWDIR) "\[[c]%scolor[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"

i.e. the last NEWDIR is without spaces or dirnames after the %scolor cookie. This way I've diff colors per sections and dont have 2 sections name merged in irc announce.
Needless to say that this requires a huge job designing the script as u need a %scolor command for any dir u have on site and for any command u want to announce (race, halfway, etc.)
Hope Harm can help some more

Harm
12-10-2004, 05:28 PM
qba: You can only use that cookie with ioBanana v20. If you are a registered user, please update your board profile.

Quincy: Let's rephrase. You don't need more than one line to define $announce(NEWDIR) or any other $announce variable.
Every time you add a line starting with "set announce(NEWDIR)", you define the $announce(NEWDIR) variable. Since there's only one variable with this name, this means previous lines are finally ignored.

The only line you need with set announce(NEWDIR) is: set announce(NEWDIR) "\[[c]%scolor[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"
The same goes for all other announces. You only have to add [c]%scolor and [c] to the existing announces and that isn't a huge job.

Quincy
12-11-2004, 04:20 AM
Eheh no its not. I said a huge work was when i added the %scolor variable to each sections for each announce. Now I got how it works, thanks :)

Frodo
04-28-2005, 05:11 PM
Hi!
Is it possible to get the same colors in the "free all" listing

Harm
04-28-2005, 05:50 PM
You can only use the %scolor cookie for announces related to a section. This means replies to commands (like !free) don't support it.

eXtoon
10-14-2005, 08:29 AM
iob_dzsbot.skin in this way:

set announce(NEWDIR) "\[[c]%scolor OLD[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"

set announce(NEWDIR) "\[[c]%scolor STUFF[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"

set announce(NEWDIR) "\[[c]%scolor[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"

i.e. the last NEWDIR is without spaces or dirnames after the %scolor cookie. This way I've diff colors per sections and dont have 2 sections name merged in irc announce.
Needless to say that this requires a huge job designing the script as u need a %scolor command for any dir u have on site and for any command u want to announce (race, halfway, etc.)
Hope Harm can help some more

set announce(NEWDIR) <-- you are setting a variable here.. setting it multiple times will only overwrite the previous one.