The first step is to make some changes to the theme.inc file. Even though we gave our new theme a name when we renamed the folder, we still need to tell Gallery that this is a different theme from the Matrix theme. To do this, we will change a few lines of code in the theme.inc file. Open the theme.inc file in your text editor (not in Word or another word processing editor).
Here is the code with the areas that we will change highlighted. As you can see, we are changing the name, called a theme ID, from Matrix to the name of our theme. Here is what your new theme.inc code should look like.
- * REVISION OF THE MATRIX THEME
First we will add a line of code after line 21. We don't want to claim that this theme is anything but a customization of an existing theme by Bharat Mediratta. So we will put the text "*REVISION OF THE MATRIX THEME" on this new line. Don't omit the * in front of the text. This tells the server that the text is a comment and not part of the executable code. - class dCipolloTheme extends GalleryTheme {
On Line 29, we will use our theme name in the class code by changing MatrixTheme to "dCipolloTheme". - function dCipolloTheme() {
On line 31, we will again change the MatrixTheme to "dCipolloTheme". - $this->setId('dCipollo');
On line 34, we will change Matrix to "dCipollo". - $this->setName($gallery->i18n('dCipollo'));
On line 35, we will change Matrix to "dCipollo". - $this->setDescription($gallery->i18n('REVISION MADE TO MATRIX THEME'));
On line 36, we will add the text REVISION MADE TO MATRIX THEME as our description. - $this->setVersion('1.1.1');
On line 37, we will start our version numbering at 1.1.1.