Skins in details


With version 2.0 SDClone introduce the possibility to use Skins to create your own and personal look of what the script will display in channels...
Here you will find :
  1. What is skinable
  2. Specials keywords to use
  3. How to build your skin
  4. Examples of skins



What is skinable

The script allow you to easilly change that :
  1. The ads or banner skin
    It's the message send in channels that show to users you are serving files.
    By default, that skin looks like that:
    Type: @dccserv for my list (30 July) of 6786 files (21.2G) == Free Slots: no == Files in que: 15 == Total Speed: 4492cps == Files served: 564 == Using SDClone v2.0b7 == @find: ON == Record send: 16897cps by Finlay
  2. The stats skin. This is the skin display when a user do @dccserv-stats By default, that skin looks like that:
    My list is date 07-30-2002 == I have sent it 98 times.
    I'm sharing 6786 files for a total of 21.2G
    I have send 565 files for a total of 2.2G since July, 29, 2002
    Slots Open/Min/in Use/Max: no/1/3/4 == Files in Que: 33 (17) == Users in Que: 15 (3)
    Uploading at: 18698cps == Downloading at: 0cps == Bandwith in use: 18698cps
    Today Record Send: 16897cps by Finlay == Top Record Send: 17063cps by Schmier
    Using SDClone v2.0b7 == CPU: Pentium III (Coppermine) 1004.285Mhz
    OS: Linux 2.4.18-3 == Running: 1 week 6 days 21 hours 54 minutes
  3. The Daily Report Skin. This one is send to channels every day (if the option is enable of course).
    I have send 565 files for a total of 2.2G since July, 29, 2002
    Today Record Send: 16897cps by Finlay == Top Record Send: 17063cps by Schmier
    OS: Linux 2.4.18-3 == Running: 1 week 6 days 21 hours 54 minutes
  4. The Slots skin. Show when a user do !dccserv-slots
    Sending : Androids == 5009cps == Size : 3.8M == File : Saxxon_-_Crusader_-_05_Set_Me_Free.mp3
    Sending : nick3 == 5431cps == Size : 6.0M == File : Saxxon_-_Crusader_-_04_Sailing_To_America.mp3
    Sending : Cyan22 == 4013cps == Size : 4.6M == File : Enigma_-_MCMXC_a.d._(Limited_Edition)_-_06_-_Mea_Culpa.mp3
    Sending : Ruger == 1048cps == Size : 3.3M == File : Top_gun_-_01_-_Kenny_loggins_-_Danger_zone.mp3
    Uploading at: 15501cps == Downloading at: 0cps == Bandwith in use: 15501cps
    Files Share: 6786 (21.2G) == Files in Que: 29 == Users in Que: 16
    Today Record Send: 16897cps by Finlay == Top Record Send: 17063cps by Schmier
  5. The custom ads skin. This skin is show in channels every x seconds (you define x in the skin too) and if you have activate it with /sdcustomads on



Specials Keywords



Ok here is the list of specials keywords you can use in a Skin... Look down for an explain on How to use specials words
Keyword Effect you should have Sample Result
%%SDVersion%% The script version (number only) Script is at version "%%SDVersion%%"
= Script is at version "2.0"
%%SDAuthor%% Hey it should be me ! Who made it ? --->%%SDAuthor%%
= Who made it ? --->dccserv
%%SDHigh%% Switch to High color (depend on what color you have choose for that) %%SDHigh%%a sample text
=a sample text
%%SDLow%% Switch to Low color (depend on what color you have choose for that) %%SDLow%%a sample text
=a sample text
%%SDColor0%%
...
%%SDColor15%%
Switch to color number %%SDColor4%%a sample text
=a sample text
%%SDColor7%%another sample
=another sample
%%SDBGColor0%%
...
%%SDBGColor15%%
Switch to background 1 color number %%SDBGColor4%%why text is white ?
=why text is white ?
%%SDColor4%%Read %%SDBGColor2%%the%%SDColor7%% note
=Read thenote
%%SDColorRandom%% Switch to a random text color (background unchanged). Everytime this is display a new color is pick 2 %%SDColorRandom%%the%%SDColorRandom%% color %%SDColorRandom%%change
=the color change
=the color change
=the color change
%%SDColorBold%% Switch to bold color I'm a bold %%SDColorBold%%sample
=I'm a bold sample
%%SDColorNormal%% Switch to normal color, kill colors & bold effect Eh %%SDColor4%%the red%%SDColorNormal%% or %%SDColorBold%%bold %%SDColorNormal%%die with that !
= Eh the red or bold die with that !
%%SDSpacer%% Put the text you have choose in the skin for %%Spacer%% 1 %%SDSpacer%% 2 %%SDSpacer%% 3
%%SDSpacer%% is **
= 1 ** 2 ** 3
%%SDSpacer%% is OoO
= 1 OoO 2 OoO 3
%%SDFilesShare%% It's the number of files you are actually sharing. The total files you have in your list if you prefer You are sharing %%SDFilesShare%% files...
= You are sharing 3490 files...
%%SDFilesShareSize%% It's total size (formatted with b, K, M, G...) of all files you are sharing. Size of your files %%SDFilesShareSize%%
= Size of your files 14M...
= Size of your files 21.3G
%%SDFilesSent%% It's the number of files you have sent You have upload %%SDFilesSent%% files...
= You have upload 234 files...
%%SDFilesSentSize%% It's total size (formatted with b, K, M, G...) of all files you have sent. Total size upload: %%SDFilesSentSize%%
= Total size upload: 23M...
= Total size upload: 7.1G
%%SDList%% It's the current name of you list. My list is %%SDList%%
= My list is bob-3-7-2002.txt
Get that file %%SDList%%
= Get that file john-3-9-2002.zip
%%SDListDate%% Return your list date. It's a language dependant date, gb=m-d-yyyy, fr=d-m-yyyy My list is %%SDListDate%%
= My list is 11-3-20002
Ma liste est %%SDListDate%%
= Ma liste est 3-11-2002
%%SDListDateNMonth%% Return your list date but only the month numeric value My list month is %%SDListDateNMonth%%
= My list month is 11
%%SDListDateWMonth%% Return your list date but only the month but this time as a word. Again the word is language dependant My list month is %%SDListDateWMonth%%
= My list month is november
Le mois de ma liste est %%SDListDateWMonth%%
= Le mois de ma liste est novembre
%%SDListDateDay%% Return your list date but only the day numeric value I have build my list the %%SDListDateDay%% of this month
= I have build my list the 5 of this month
%%SDListDateYear%% Return your list date but only the day numeric value in yyyy format I build that list this year : %%SDListDateYear
= I build that list this year : 2001
%%SDListSent%% Return the number of times you have sent your list Whaoo i have sent my list %%SDListSent%% times !!!
= Whaoo i have sent my list 345 times !!!
%%SDFirstDate%% Return the first time you have build a list (month, d, yyyy), language dependant too I use SDClone since %%SDFirstDate%%
= I use SDClone since June, 13, 2002
J'utilise SDClone depuis le %%SDFirstDate%%
= J'utilise SDClone depuis le 13 Juin 2002
%%SDTrigger%% Just return your trigger (without anything add, just the word) Do @%%SDTrigger%% for my list or "!%%SDTrigger%% afile" to get a file
= Do @dccserv for my list or "!dccserv afile" to get a file
%%SDTopCPS%% Return the Top record number of cps (your maximum send speed) hey look my top speed : %%SDTopCPS%%cps
= Hey look my top speed : 200cps
%%SDTopNick%% Return the Top record nick (the guy to who you have send the fastest) %%SDTopNick%%'s modem is burning
= JohnDo's modem is burning
%%SDDailyCPS%% Return the record of the day number of cps (your maximum send speed today) Today i can do %%SDTopCPS%%cps
= Today i can do 34435cps
%%SDDailyNick%% Return the record of the day nick (the guy to who you have send the fastest today) I'm good with %%SDDailyNick%% today
= I'm good with Madonna today
%%SDcpsUP%% Return your current bandwith taken by uploads I'm uploading @ %%SDcpsUP%%cps
= I'm uploading @ 3455cps
%%SDcpsDOWN%% Return your current bandwith taken by downloads I'm getting at %%SDcpsDOWN%%cps
= I'm getting at 63044cps
%%SDcpsTOTAL%% Return your current total bandwith in use (Uploads + Downloads) My modem is smoking at %%SDcpsTOTAL%%
= My modem is smoking at 89900cps
%%SDCPU%% Return your CPU as a string My poor computer is a %%SDCPU%%
= My poor computer is a Pentium III (Coppermine)
%%SDCPUspeed%% Return your CPU speed in MHZ (not for BSD user) My brain runs at %%SDCPUspeed%%
= My brain runs at 1003Mhz
%%SDOS%% Return your OS String identifier Yeah my OS rocks, it's %%SDOS%%
= Yeah my OS rocks, it's OpenBSD 3.1
%%SDUptime%% Return your uptime stats (not language dependant for now, only english) I'm working like a slave since %%SDUptime%%
= I'm working like a slave since 2 weeks 6 days 2 hours 5 minutes
%%SDSlotsMin%% Return your current settings for Minimum Slots I have %%SDSlotsMin%% minimum slots
= I have 3 minimum slots
%%SDSlotsMax%% Return your current settings for Maximum Slots I can upload %%SDSlotsMax%% files max
= I can upload 4 files max
%%SDSlotsFree%% Return "YES" if you have a free slot, else return "no" (it's language dependant) Will you received the file now ? hmmm %%SDSlotsFree%%
= Will you received the file now ? hmmm no
%%SDSlotsUse%% Return number of slots taken by users %%SDSlotsUse%% users are download a file from me
= 3 users are downloading a file from me
%%SDFindTrigger%% Return the current word you have choose for the find command Try "%%SDFindTrigger%% *.jpg" to see the jpg i have
Try "@find *.jpg" to see the jpg i have
%%SDFindStatus%% Return the current status of the find command "ON" or "off" (again language dependant) My find function is %%SDColor4%%%%SDFindStatus%%
= My find function is off
%%SDQueSize%% It's the total files you have in your queue waiting to be send I have %%SDQueSize%% files in queue
= I have 34 files in queue
%%SDQueSizeActive%% It's the total files you have in your queue waiting to be send, but only the files that are from users that are present Ok my queue got %%SDQueSize%% waiting, but you will received a file only after %%SDQueSizeActive%% files sent
= Ok my queue got 430 files waiting, but you will received a file only after 11 files sent
%%SDQueUsers%% It's the different users that have files in your queue Look that %%SDQueUsers%% leechers want something
=Look that 34 leechers want something
%%SDQueUsersActive%% It's the total different users that have files in your queue, but this time only users that are present %%SDQueUsers%% users request me something, but only %%SDQueUsersActive%% had the patience and are still waiting
= 34 users request me something, but only 4 had the patience and are still waiting
%%SDQuePerUsers%% It's the value you have define for the queue size per users in $queNick You can only queue %%SDQuePerUsers%% files
= You can only queue 8 files
%%SDEND%% This is a even more special keyword, see lower for it's usage !!!
Notes:
1: Also switch to text color 15. So it change text color to 15 + Background #, this is to avoid a bug in mirc, without a text color mirc don't change the background color. Xchat handle both methods. So to switch to text color 4 with BGColor 7 do %%SDBGColor7%%%%SDColor4%%
2: The text color is randomize at display time, but the background color isn't change, and isn't detected so the script can randomize and pick the same color as the background color, if this happen, then the text will look invisible.



How to build your skin



I - Skin file format


Skin file format is a simple text file with lines ending with a \n charactor (standard unix file format)...
Now let's see what's in it (i put lines number to help but no lines number should be in the skin file itself)
001 Here you should put the language the skin is for (ie: Français, English...)
002 The target SDClone version the skin is for. Yes for SDClone 2.0 target version number is 1.1 because i have built v2.0 from the 1.1 and forgot to change that number
003 Skin author name. Yours if you build a skin... But if you reuse a skin, it should be original author name + your name (ie: dccserv & Slackster)
004 It's the %%SDSpacer%% value
005 It's the %%SDLow%% value
006 It's the %%SDHigh value
007 from this line you can put comments in your skin
Also this is the starting point for SDClone to count lines number in a skin to verify its validity
Banner skin - line 1 - Skin is 5 lines long
008 Banner skin - line 2
009 Banner skin - line 3
010 Banner skin - line 4
011 Banner skin - line 5
012 @trigger-stats skin - line 1 - Skin is 10 lines long
013 @trigger-stats skin - line 2
014 @trigger-stats skin - line 3
015 @trigger-stats skin - line 4
016 @trigger-stats skin - line 5
017 @trigger-stats skin - line 6
018 @trigger-stats skin - line 7
019 @trigger-stats skin - line 8
020 @trigger-stats skin - line 9
021 @trigger-stats skin - line 10
022 Daily report skin - line 1 - Skin is 5 lines long
023 Daily report skin - line 2
024 Daily report skin - line 3
025 Daily report skin - line 4
026 Daily report skin - line 5
027 @trigger-slots skin - line 1 - Skin is 5 lines long
028 @trigger-slots skin - line 2
029 @trigger-slots skin - line 3
030 @trigger-slots skin - line 4
031 @trigger-slots skin - line 5
032 Custom ads skin - Timer value - Skin is 5 lines long
Timing x
033 Custom ads skin - line 1
034 Custom ads skin - line 2
035 Custom ads skin - line 3
036 Custom ads skin - line 4
037 Custom ads skin - line 5

You can put comments in the skin file (or language file) by using ``. You can only comment a full line and only use it after line #6
If you put comments before line #6 or try to comment a part of a line, you will certainly have an invalid skin.
`` this is a valid comment line
For my list... `` this is not valid, you can't comment like that.

SDClone will check that the skin file is valid, ignoring comments lines, it will count all lines, so you must always have 37 lines in your skin file
After that the script remove the lines from 1-6 and setup proper values with them.
So: for SDClone a valid skin file is 37 lines - 6 lines = 31 lines long
You can check that. When the script load a skin file, it will display these informations.
Loading skin file lang/sdclone-skin-gb.txt Skin loaded... English
Skin version.. 1.1 - OK
Skin author... dccserv & Slackster
Skin spacer... ==
Skin position. #62
Skin length... 150 lines     It's the total lines in the skin, including comments
Skin Size..... 31 - OK       See, 31 lines for a valid SDClone v2.0 skin file

II - Setting up your skin

As you have saw upper skins have different size, and you must always respect that size or you will get an invalid skin...

So how could we build a skin that is smaller than that size and is still valid ? (i will getting crazy asking question to myself like that !)
Simply by using the special keyword %%SDEND%%. This keyword indicate to SDClone that your skin is end and that the next lines must be ignore.
Let's see some samples to get clear... We build a skin that is 5 lines long
1 line long 4 lines long 5 lines long
001 this line is read 001 this line is read 001 this line is read
002 %%SDEND%% 002 this line is read 002 this line is read
003 this line is ignore 003 this line is read 003 this line is read
004 this line is ignore 004 this line is read 004 this line is read
005 this line is ignore 005 %%SDEND%% 005 this line is read

III - Creating a Skin


Ok, now you know how to build a skin file (or you could simply copy and use an already made skin as a base) and how to setup up your new skin, so let's see how you really create a skin.
You will use the specials keywords to build your skin, look at the table to see how many specials keywords you could use and what they will do.
The script will simply replace the keyword with the good value, just take care of the spaces, it's important, the script will kept them as-is.
Look that (space is replace with _ to get clear) :
%%SDColor4%%123%%SDSpacer%%456_789%%SDSpacer%%_ABC
=123**456_789**_ABC
Understand ? Just keep in mind the script will simply do a search/replace with the keywords...
Search: %%SDSpacer%%
Replace: **

Samples skins

If you build your own skin and you think everyone should see it, send me the skin source code by email and i will add it.
Choose a skin to see : Try another spacer:
High color : Low color : Background :
Skin code :
Skin preview:
Some browsers do not display the preview correctly. Use a full CSS ready one....


Join Linux, share your knowledge...
Host by ETECHNOVA !
Hosted by www.Geocities.ws

1