Go Back   FlashFXP Forums > > > >

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-25-2004, 11:08 AM   #1
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default Different colors for different sections in dZSbot.tcl

Hi all. How can I have commands dealing with different sections in different colors? I know that in ioBanana is possible by setting which color u want to use per section, and then using the %scolor variable in the skin, but i couldnt find in dZSbot.tcl where to put sections/color settings.
I'm using ioFTPD + ioA last version, php_psio and dzsbot
Can anyone help?
Quincy is offline   Reply With Quote
Old 12-25-2004, 12:34 PM   #2
durulink
Senior Member
 
Join Date: Mar 2003
Posts: 102
Default

edit [proc basicreplace]

Code:
proc basicreplace {strin section} {
global sitename
set output [replacevar "$strin" "%sitename" "$sitename"]
set output [replacevar "$output" "%bold" "\002"]
set output [replacevar "$output" "%uline" "\037"]
if { [string match $section "APPS"] } { set section \0034$section\003 }
if { [string match $section "GAMES"] } { set section \0036$section\003 }
if { [string match $section "MV"] } { set section \0033$section\003 }
if { [string match $section "VCD"] } { set section \0037$section\003 }
if { [string match $section "SVCD"] } { set section \0031$section\003 }
if { [string match $section "DOX"] } { set section \00314$section\003 }
set output [replacevar "$output" "%section" "$section"]
return "$output"
}
from. glFTPd
durulink is offline   Reply With Quote
Old 12-25-2004, 01:15 PM   #3
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default

Ok, i understand that there's no %scolor variable in dzsbot.
But how can I use that code? Where to put it and how to customize it to dzsbot? (as thats one is for glFTPD aint it).

Thanka
Quincy is offline   Reply With Quote
Old 12-25-2004, 01:20 PM   #4
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default

oo..OK, i found it, thanks! I'll try it
Quincy is offline   Reply With Quote
Old 12-25-2004, 01:53 PM   #5
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default

ok. have changed dzsbot.tcl like this:

proc basicreplace {strin section} {
#putlog "proc basicreplace"
global sitename
set output [replacevar $strin "%sitename" $sitename]
set output [replacevar $output "%bold" "\002"]
set output [replacevar $output "%color" "\003"]
set output [replacevar $output "%uline" "\037"]
set output [replacevar $output "%section" $section]
return "$output"
if { [string match $section "Stuff"] } { set section \00311$section\003 }
if { [string match $section "old stuff"] } { set section \00314$section\003 }
if { [string match $section "text"] } { set section \00313$section\003 }
set output [replacevar "$output" "%section" "$section"]
return "$output"
}

But got NEWDIR announces in white, for any sections.

How should I change the NEWDIR command?
set announce(NEWDIR) "\..::%boldNew in %section%bold\::..

Have tried with %color but doesnt work.
Quincy is offline   Reply With Quote
Old 12-25-2004, 08:48 PM   #6
durulink
Senior Member
 
Join Date: Mar 2003
Posts: 102
Default

Code:
proc basicreplace {strin section} {
	#putlog "proc basicreplace"
	global sitename
	set output [replacevar $strin "%sitename" $sitename]
	set output [replacevar $output "%bold" "\002"]
	set output [replacevar $output "%color" "\003"]
	set output [replacevar $output "%uline" "\037"]
	if { [string match $section "Stuff"] } { set section \00311$section\003 }
	if { [string match $section "old stuff"] } { set section \00314$section\003 }
	if { [string match $section "text"] } { set section \00313$section\003 }
	set output [replacevar $output "%section" $section]
	return "$output"
}
try this.
durulink is offline   Reply With Quote
Old 12-26-2004, 04:16 AM   #7
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default

Thanks its workin but output is not what I was looking for. Infact, for any section I used to have the following outputs, each in their section colors:

..::New in Stuff::..
..::SFV in Stuff::..
..::URL in Stuff::..
..::First in Stuff::..
..::Half in Stuff::..
..::done in Stuff::..

with the whole output, except the ..:: ::.. colored in the section specified color, whreas now I have just Stuff in section color and "New in", "SFV in" etc are white.
Quincy is offline   Reply With Quote
Old 12-26-2004, 09:29 AM   #8
durulink
Senior Member
 
Join Date: Mar 2003
Posts: 102
Default

in dZSbot.tcl
set announce(NEWDIR) "..::New in %section::.. ~~~"
set announce(NFO) "..::NFO in %section::.. ~~~"
set announce(NFOURL) "..::URL in %section::.. ~~~"


Others are under the control of PHP_pSio.
and very complex. beacuse of
Code:
set announce(DEFAULT)		"%section :: %msg"
durulink is offline   Reply With Quote
Old 12-26-2004, 10:22 AM   #9
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default

Hi

I had already:

set announce(NEWDIR) "\..::%boldNew in %section%bold\::..

and I'm getting "NEW in " in white and just %section appearing with the appropriate color., in particular:

"..:: ::.." are white, which is fine
"New in" is white, while should be same color as %section
"%section" is in appropriate color
Quincy is offline   Reply With Quote
Old 12-26-2004, 11:43 AM   #10
durulink
Senior Member
 
Join Date: Mar 2003
Posts: 102
Default

set announce(NEWDIR) "\..::%boldNew in %section%bold\::..

Why did you use '\' char.
It is not sure that erase the char '\'.

or try this setting exactly.

Code:
set announce(NEWDIR) "..::New in %section::.. ~~~"
set announce(NFO) "..::NFO in %section::.. ~~~"
set announce(NFOURL) "..::URL in %section::.. ~~~"
durulink is offline   Reply With Quote
Old 12-26-2004, 05:25 PM   #11
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default

Have tried this as u suggested

set announce(NEWDIR) "..::New in %section::.. ~~~"

But still have :

New in ---> white
%section --> appropriate color (blue)

Quincy is offline   Reply With Quote
Old 12-27-2004, 03:44 AM   #12
Luke
Member
 
Join Date: Oct 2003
Posts: 50
Default Tried this ?

Example:
set announce(DEFAULT) "-%sitename- \[%color03%section%color\] + %msg"

Luke is offline   Reply With Quote
Old 12-27-2004, 04:53 AM   #13
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default

thats way i would have all sections colored as %color03, aint it, whereas i want each sections having its own color.
Quincy is offline   Reply With Quote
Old 03-04-2005, 09:01 AM   #14
chruez
Junior Member
 
Join Date: Dec 2003
Posts: 7
Default

i solved it like this:

first: change the procedure 'basicreplace' to something like this:

Code:
proc basicreplace {strin section} {
	#putlog "proc basicreplace"
	global sitename col obrack cbrack sep
	set output [replacevar $strin "%sitename" $sitename]
	set output [replacevar $output "%bold" "\002"]
	set output [replacevar $output "%color" "\003"]
	set output [replacevar $output "%uline" "\037"]
	set output [replacevar $output "%section" "$col($section)[b][b]$section"]
	set output [replacevar $output "%scolor" "$col($section)[b][b]"]
	return "$output"
}
2nd step is to setup what color u want for each section. You should do that somewhere at the beginning of the dzsbot.tcl file so you can easily change the values:

Code:
set col(EBOOK) "[c]13"
set col(APPS)  "[c]3"
...
You will have to set it for every section but also for stuff like INVITE and UPTIME which also use the %section cookie (set col(UPTIME) "[c]0" e.g.)

Be sure to check the partyline of your eggdrop if you notice an error and add the missing set col line to dzsbot.tcl.
chruez is offline   Reply With Quote
Old 03-04-2005, 10:28 AM   #15
Luke
Member
 
Join Date: Oct 2003
Posts: 50
Default [c] thingy

Tcl error in file 'eggdrop.conf':
invalid command name "c"
while executing
"c"
invoked from within
"set col(APPS) "[c]3""
Luke is offline   Reply With Quote
Reply

Tags
colors, dzsbot.tcl, find, put, sections

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

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

Forum Jump


All times are GMT -5. The time now is 05:14 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)