This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
r0t3n
Owner
Posts: 507 Joined: Tue May 31, 2005 6:56 pm
Location: UK
Post
by r0t3n » Fri Nov 11, 2005 12:58 pm
Hello there.
I need a proc to be used for my htcl webpage
http://81.7.142.2:3006/onchan.htcl?chan=%23all4us
As you can see, the topic section includes all the color/bold/underline tag etc. I need a proc to recognise these, and the colors, and to change them to html color/bold/underline tags. So then the actual color of the topic can be seen on my htcl website.
btw, htcl is html with tcl commands within the html.
Thanks in advance,
Chris
r0t3n @ #r0t3n @ Quakenet
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Fri Nov 11, 2005 2:37 pm
something like this might help:
Code: Select all
proc parseBold str {
set c 0
set htmlstring [lindex [split $str \002] 0]
foreach bs [lrange [split $str \002] 1 end] {
if {$c%2 == 0} {
lappend htmlstring "<bold>$bs</bold>"
} {
lappend htmlstring $bs
}
incr c
}
return [join $htmlstring]
}
this will replace
bold codes with <bold> & </bold> tags.
r0t3n
Owner
Posts: 507 Joined: Tue May 31, 2005 6:56 pm
Location: UK
Post
by r0t3n » Fri Nov 11, 2005 3:13 pm
thanks sir_fz
it returns:
Code: Select all
Channel topic: 3( ( 3( :: W elcome to # alfn 3:: B F2 s tats: http://bf2s.com/player/44315144/ 3:: A uth e quals OP 3:: A uths: 15 H osts: 16 3:: P rotection i s ON :3: ) ) 3)
Some spaces within the script where the bold tags were. Its one of these things which seem impossible to do
r0t3n @ #r0t3n @ Quakenet
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Fri Nov 11, 2005 7:46 pm
Why not try filtering or play around with it some more?
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
r0t3n
Owner
Posts: 507 Joined: Tue May 31, 2005 6:56 pm
Location: UK
Post
by r0t3n » Fri Nov 11, 2005 8:46 pm
because i have no idea of how to do it, if you could give me some starters, then i can try and make something of it
r0t3n @ #r0t3n @ Quakenet
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Fri Nov 11, 2005 9:08 pm
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM