Here a short documentation, to make you more comfortable with some functions.
Variables:
Variables are containers, where you are able to store data, which can be used afterwards. Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. A variable must not start with a number!!!
Example:
- Number: var=21;
- Text: var="Hello World";
- Hex-Colourcode: var="000000"; this will change the colour of the text to "black"
If you are using the command (e.g. "text()";), the variable must not have a number on the end!
Default-Variables
With these variables you define standard settings (Textcolor, Font, etc.) for the graphic.
The following variables ar available:
- defaults.color"Textcolour"
- defaults.font "Font"
- defaults.bgcolor "Background colour"
- defaults.align "Alignment (left, center, right)"
- defaults.size "Font size in Pixel"
- defaults.angle "Angle (45 corresponds to 45°, rotation goes counter-clockwise)"
Operators
"+" for Addition
"-" for Subtraktion
"*" for Multiplication
"/" for Division
"<" for Less than
">" for Greater than
"<=" for Less than or equal to
">=" for Greater than or equal to
"&&" for And
"||" for Or
Commands:
rectangle();
This command creates a rectangle. The following parameters are available:
- x: Distance on the x-axis
- y: Distance on the y-axis
- w: Width
- h: Height
- fill: Background colour
- color: Border colour
You can either use "fill" or "color". (Both options are unable to work together)
Example: rectangle(x:20, y:50, w:100, h:40, fill:"ffffff");
text()
This command is printing a text. The following commands are available:
- x: Distance on the x-axis
- y: Distance on the y-axis
- color: Text colour
- size: Font size (in Pixel)
- font: Font
- align: Alignment (left, center, right)
- angle: Angle (45 corresponds to 45°, rotation goes counter-clockwise)
- text: This will be the text you want to print on your graphic
Example: text(x:80, y: 25, color:"000000", size:"12", font:"Vera", align:"center", angle:45, text:"Here you have the example");
image()
This command is showing an image. The following commands are available:
You can choose a specific part of your image to use this part as the background. ("sx", "sy", "sw" and "sh").
- x: Distance on the x-axis
- y: Distance on the y-axis
- w: Width
- h: Height
- sx: Distance on the x-axis on the graphic
- sy: Distance on the y-axis on the graphic
- sw: Width of the graphic
- sh: Height of the graphic
- ownerid: ID of the registered user - This ID must be entered
- file: Filename of the uploaded graphic
- noresample Anti-Aliasing (1=on)
Example: image(file:"image_file.png", x:"0", y:"0", w:"468", h:"100", sx:"468", sy:"0", sw:"468", sh:"100", ownerid:"3", noresample:"1");
progress()
This command is necessary to show a progress bar in your signature. The following commands are available:
- type: Type (rank)
- curr: Current Score (e.g. "p.score")
- start: Initial Value
- next: Final Value
- w: Total width in Pixel
The parameters"start" and "next" are optional and should only be used when you have not defined "type".
Example: progress(type:"rank", curr:"p.score", w:"100");
transbg()
This command displays a transparent background. The following parameters are available:
- color: Background-Colour
The colour must be entered with the Alphachannel (0=100% to 127=0%).
Example:
transbg(); makes a transparent background
transbg(color:"000000-63"); displays a black background which is half (50%) transparent
Functions:
concat()
This function is connecting different elements.
Example: concat(4,"%"); displays: 4%
nf()
Format a number with grouped thousands (e.g. 120 000). Additionally you can show the decimals.
Example: nf(0.245632, 2); displays: 0.25
To prevent any errors, you should not do any calculations with formated numbers.
Example:
nf(0.245632*100, 2); True - displays: 24.56
nf(0.245632, 2)*100; False
cc()
see concat()
round()
Rounds a float.
Example:
round(1.2759, 2); displays: 1.28
round(1254328, -3); displays: 1254000
time()
This function returns the time from a UNIX timestamp.
Example: time(26494); display: 07h 21m 34s
thetime()
With this function you can do the same as with time(), however you can specify the output. You can use d(days), h(hours), i(minutes), s(seconds)
Example: thetime(26494, "h:i"); displays: 07:21
img_rank()
This function displays the rank image.
Example: image(file:img_rank(p.rank), x:60, y:20, w:60, h:60); - the owner ID is not necessary
img_rank_tiny()
This function displays the tiny rank image.
Example: image(file:img_rank_tiny(p.rank), x:60, y:20, w:16, h:16); - the owner ID is not necessary





Reply With Quote





Bookmarks