Menu

Custom Signatures

Introduction

ezStats offers different signatures for each player, which you can adjust slightly. But perhaps you like only "med"-signature, but want two or more of them with different background images.

This article explains, how you can realize this by some modifications of ezStats. The program I use for editing of the source code is Notepad++.

Manual

Download the file tmp/defaults.js and open it in Notepad++. Scroll down to the end of the file, and copy the entries of the signature you want to duplicate. In this case med.
» See Picture 1

Now paste the code after "min_background_offset": "0". Change the prefix of the duplicated lines into "custom1" for example. And change the value of the signature type into "custom1". Please be sure that all lines end with a comma, exept the last one.
» See Picture 2

Now save the file and upload it. Then download the file classes/signatures.php and open it in Notepad++. In line 9, append the prefix "custom1" to the array.
» See Picture 3

Search now for the string function create_rankicon. The search function opens with "CTRL+F". Now paste the code OR $type == "custom1" in the If-loop of "med" for this example.
» See Picture 4

Then search for the string function create_text. To increase clarity, click on the boxes with the minus, on the left side of the If-loops. The lines inside the loops are hidden now.
» See Picture 5

Now paste paste again the code OR $type == "custom1" in the If-loop of "med" for this example.
» See Picture 6

Now save the file and upload it. Then download the file admin/templates/signatures.html and open it in Notepad++. Scroll to the bottom, duplicate the h2- and ul-code and rename "med" with "custom1".
» See Picture 7

Now save the file and upload it. Then download the latest version of ezStats. Extract the folder "install" in it, and upload it too. Open the installer with your browser, and click through all steps. Afterwards, you'll find your new signatures in the adminpanel of ezStats!


Related

Wiki: Home

MongoDB Logo MongoDB