Skinning 101
--------------
Here is a step-by-step tutorial on how to create a notifier for POP Peeper.
by: blind_phantom
--------------
Requirements
--------------
POP Peeper v3.x [update to be sure]
Notification Skin Plugin v3.0.0.1
--------------
Images
--------------
Right-click and save these images, you will need them to create your skin.




--------------
Step 1: Creating the folder
Create a folder in C:\Program Files\POP Peeper\Plugins\Skins (or where ever you have you POP Peeper setup) titled "Tutorial". This will be your working folder. Put all the above images in that folder.
Step 2: Creating the .ini
Create a file titled "tutorial.ini" by right clicking and selecting New>Text Document; rename the document to "tutorial.ini". This is where we will put the code to bring together all the image files so POP Peeper can read them. Open tutorial.ini and copy and paste the following code:
Code: Select all
############################################
[INFO]
############################################
Skin_Name = Tutorial
Skin_Info =
Skin_Author =
Skin_Mail =
Skin_Web =
Skin_Dim = 329 x 98
Step 3: Constants
Under INFO, you will need to paste this code:
Code: Select all
############################################
[CONSTANTS]
############################################
# Control Types
_TYPE_Window = 0
_TYPE_Button = 1
_TYPE_Editbox = 2
_TYPE_Static = 3
# System Button Commands
_IDOK = 1
_IDCANCEL = 2
# App-defined Constants
_CMD_OPENPP = 10
_CMD_CLIENT = 11
_CMD_DISMISS = 12
_CMD_RELOADSKIN = 25
############################################
[VARIABLES]
############################################
%NumNewMsg% = number of new messages
%Account1% = Account Name for first account with new messages
%NumNewAct1% = Number of New Messages for first account
%Account2% = Account Name for second account with new messages
%NumNewAct2% = Number of New Messages for second account
# etc.
Step 4: Main
Copy the following code again into tutorial.ini:
Code: Select all
############################################
[MAIN]
############################################
Bitmap = form.gif
BmpTrans = 0 255 0
Slider_Enabled = 1
Slider_Speed = 10
Slider_Timer = 10
Slider_Delay = 300000
FontName = Tahoma
FontColor = 255 255 255
FontSize = 8
This is also where you used to adjust the slider (what makes the notifier "pop-up"), but since you can control that yourself in the plugin, its really not needed to know what this stuff does. But here is an explanation of what everything means anyway:
Slider_Enabled = 1 enables slider, 0 disables
Slider_Speed = pixels-per-timer (see below)
Slider_Timer = how fast to move the window in milliseconds
Slider_Delay = pause in milliseconds for window
FontName, FontColor, and FontSize are all the default font settings that will be used. Tahoma is the default pre-Windows XP font, so it will do nicely. FontColor is a RGB number, just go into MS Paint and find the color you want with the color picker. 255 255 255 is white.
Step 5: Controls and Bitmap
Now for the meat of the code. Copy and paste this header:
Code: Select all
############################################
# CONTROLS
############################################
The first control we will code will be the POP Peeper logo.
Code: Select all
[popIcon]
Type = _TYPE_Static
Pos = 6 6
Bitmap = icon.gif
BmpTrans = 0 255 0
Step 6: Text
This control will now just place text onto the base image. Here is the following code:
Code: Select all
[titleBar]
Type = _TYPE_Static
Pos = 25 6
Size = 150 150
Label = POP Peeper - New Message
Step 7: Variables
Here is where we will code the variables that tell you from who the message is from, what account, and what the subject is.
Code: Select all
[msgFromVar]
Type = _TYPE_Static
Pos = 172 32
Size = 145 100
Label = %Msg_From_1%
FontColor = 0 0 0
[msgActVar]
Type= _TYPE_Static
Pos = 172 54
Size = 145 200
Label = %Msg_Account_1%
FontColor = 0 0 0
[msgSubVar]
Type = _TYPE_Static
Pos = 172 75
Size = 145 100
Label = %Msg_Subject_1%
FontColor = 0 0 0
Step 8: Buttons
The final step, add the buttons. Buttons can also use BmpTrans, but we are not going to. The first button we are going to add is the close button.
Code: Select all
[btnClose]
Type = _TYPE_Button
Pos = 307 6
Command = _CMD_DISMISS
Bitmap = x.gif
Bitmap2 = x_2.gif
Code: Select all
[btnOpenPOP]
Type = _TYPE_Button
Pos = 10 35
Size = 100 20
Label = Open POP Peeper
FontColor = 0 0 0
Command = _CMD_OPENPP
[btnOpenClient]
Type = _TYPE_Button
Pos = 10 65
Size = 100 20
Label = Open Email Client
FontColor = 0 0 0
Command = _CMD_CLIENT
Final Code
Code: Select all
############################################
[INFO]
############################################
Skin_Name = Tutorial
Skin_Info =
Skin_Author =
Skin_Mail =
Skin_Web =
Skin_Dim = 329 x 98
############################################
[CONSTANTS]
############################################
# Control Types
_TYPE_Window = 0
_TYPE_Button = 1
_TYPE_Editbox = 2
_TYPE_Static = 3
# System Button Commands
_IDOK = 1
_IDCANCEL = 2
# App-defined Constants
_CMD_OPENPP = 10
_CMD_CLIENT = 11
_CMD_DISMISS = 12
_CMD_RELOADSKIN = 25
############################################
[VARIABLES]
############################################
%NumNewMsg% = number of new messages
%Account1% = Account Name for first account with new messages
%NumNewAct1% = Number of New Messages for first account
%Account2% = Account Name for second account with new messages
%NumNewAct2% = Number of New Messages for second account
# etc.
############################################
[MAIN]
############################################
Bitmap = form.gif
BmpTrans = 0 255 0
Slider_Enabled = 1
Slider_Speed = 10
Slider_Timer = 10
Slider_Delay = 300000
FontName = Tahoma
FontColor = 255 255 255
FontSize = 8
############################################
# CONTROLS
############################################
[popIcon]
Type = _TYPE_Static
Pos = 6 6
Bitmap = icon.gif
BmpTrans = 0 255 0
[titleBar]
Type = _TYPE_Static
Pos = 25 6
Size = 150 150
Label = POP Peeper - New Message
[msgFromVar]
Type = _TYPE_Static
Pos = 172 32
Size = 145 100
Label = %Msg_From_1%
FontColor = 0 0 0
[msgActVar]
Type= _TYPE_Static
Pos = 172 54
Size = 145 200
Label = %Msg_Account_1%
FontColor = 0 0 0
[msgSubVar]
Type = _TYPE_Static
Pos = 172 75
Size = 145 100
Label = %Msg_Subject_1%
FontColor = 0 0 0
[btnClose]
Type = _TYPE_Button
Pos = 307 6
Command = _CMD_DISMISS
Bitmap = x.gif
Bitmap2 = x_2.gif
[btnOpenPOP]
Type = _TYPE_Button
Pos = 10 35
Size = 100 20
Label = Open POP Peeper
FontColor = 0 0 0
Command = _CMD_OPENPP
[btnOpenClient]
Type = _TYPE_Button
Pos = 10 65
Size = 100 20
Label = Open Email Client
FontColor = 0 0 0
Command = _CMD_CLIENT
Now just go into settings and test out your new skin. Everything should be working perfectly. Enjoy.
