Tools

Content

1. Introduction
2. Backup database
    2.1 Introduction
    2.2 The backup process
    2.3 Restoring a database
3. Translation
    3.1 Introduction
    3.2 Making a translation
    3.3 Your translation is ready
    3.4 Integrating a language on your system
    3.5 Adapting a language
4. String replacement

1. Introduction

In the tools chapter you find the 'hammer and nails' of S@S. These tools should be handled with care.
You open the 'Tools manager' by clicking on its icon   [ tools icon. ]. You will see:


tools_open.png

Now you can click on the icons that give access to the tools. They will be treated in detail below.

(top)

2. Database backup

2.1 Introduction

The backup tool is an easy to use instrument to make backups of the MySQL database that is running on your server. In the database all the content of the pages, configuration information, news items, ads etc. is stored.
For the technical people: the backup will be stored on your computer as a file containing SQL statements. The file contains SQL statements to DROP (delete) a table, CREATE a table and INSERTS with the data it contained when it was backup was taken.
NOTICE: The database name is only stored as comment in the SQL file.
This SQL file can be used by MySQL or PhpMyAdmin to rebuild your database.
So, it's pretty complicated stuff and once you have lost or corrupted a database (I once screwed up the database of our school site...), you end up with a site that's a complete mess, and you are ready for a nervous breakdown. So, you better prevent this terrible situation. Use the easy backup tool! (This means that you can easily make many backups for security's sake).
Depending on the use of the school site, it can be necessary to backup the database, for example, once a day, or once a week. We will describe this process below.

Another good use of the tool is when you want to migrate the database to your newly donated server. Or, another example, suppose you want to change from one ISP (Internet Service Provider) to another. The backup tool makes this an easy process.

NOTICE: Backing up your data is most times an easy job. Restoring is the tough part.

NOTICE: We experienced that a very large part of the database is taken up by statistical data from 'Statistics'. These data are not necessary when backing up the contents of your site and, due to its quantity, can cause problems at some ISP's.
For this reason, the content of the statistics table is not backed up in the backup that is made with the Site@School backup tool. However, when you want backup the full database of Site@School, we recommend using the 'PhpMyAdmin' MySQL Management tool.

2.2 The backup process

  1. Click on 'Database backup', and a window on your computer will open.
  2. In the window you can choose the location to put your database backup. Maybe it's a good idea to make a separate directory for the backups of the database, called 'backups'. Keep the backups of your database in that directory. As you can see on the screen, the backup is called 'db_backup.sql'.
  3. With a few mouse clicks (depending on your operating system and its version) you save the database. Save the database.
  4. The next time you make a backup, the system will try to use the same name, i.e. 'db_backup.sql'.
    Do NOT store the backup under the same name! When you do this, you will overwrite your previously made database backup. Give it an extra suffix, for example 'db_backup-12-11-03.sql' and save it.
  5. Now you have two copies. It's not a bad idea to always have 5 copies, so you can restore, even when you found out that a previously backed-up database was also corrupt. When you have 6 copies you can delete the oldest.

2.3 Restoring a database

Let's hope this is only needed when you change servers or ISP. Otherwise you will be nervous at this moment because you have just seen the mess on your site, colleagues are complaining and all the pupils' papers seem lost.
Doing the following steps in a nervous state will probably make things worse. Relax, take a break, get a cup of tea and then take the following steps:

Now take the following steps to get your database backup on the server:

  1. At the left side of the PhpMyAdmin tool you can see 'sas'. That's the default name of the database S@S uses. Yours can be different, depending on your installation or your ISP.
    In the procedure below change the name 'sas' to the name you might be using.
  2. In the left site, click on 'sas'. At the right site you will see the tables (or what is left from them).
  3. In the right side of PhpMyAdmin, go to:
    'Run SQL query/queries on ...:':


    tools_database_restore.png

    Click on 'Browse'.

  4. Your computer's file browser will open and you can browse to the location where your backups are stored. Go there. You will see a lot of files, for example 'db_backup-2005-02-15.sql', 'db_backup-2005-02-01.sql', etc., up to 'db_backup-2005-02-23.sql'. That is the last backup you made and it's the corrupt database.
  5. Look for the file 'db_backup-2005-02-15.sql' and click on 'OK' , or on the 'filename', depending on your computers OS and version.
  6. You will see the 'db_backup-2005-02-15.sql' name appear in the field.
  7. Click 'Go'. After some time, depending on the size of your database, you will have restored your database on your server. Check if the site is ok.
  8. When you are moving your site from one provider (or your local machine) to a new provider there are some things to take care of:

(top)

3. Translation

3.1 Introduction

The Translate tool in Site@School is a very powerful instrument. It permits you to easily adapt S@S to other languages. This is especially important in primary schools where the knowledge of other languages beside the local one(s) is limited.
When S@S was delivered to you in your local language, you can make use of another powerful feature of the translate program: adapting the local language to your cultural preferences. On both we will give examples in this chapter.

When you have made a translation to another language, send it as attachment to Dirk, a member of the S@S development team. We will take care of uploading your translation to our Sourceforge site. In this way it will quickly be available worldwide.
In a new release of S@S, we will incorporate your language.

3.2 Making a translation

NOTICE: To be able to use the translation tool the ../starnet/languages directory has to have write permissions to be able to store the changed languages files!

How to get started?
In S@S Management, click on the 'Tools' icon.
Under the header of the page you will see:


tools_translate_top.png
----------------------------< skip a lot of lines > -----------------------------------

tools_translate_bottom.png
Explanation:
  1. Under the 'Menu' you find the different parts of Site@School that can be translated. This page opens with 'S@S Management', i.e. the general part of S@S. When you want to translate another part, click on its name.
  2. Choose a country code for your translation. For example, when you want to translate English to Italian, type IT in the input field.
  3. Click on the 'Send' button to make the directory on the server. This assumes you have writing permissions in the ../starnet/languages directory.

    For the technical oriented among you: when you click on 'Send' a directory is made in the ../starnet/languages/ directory called 'IT', and in it a file is created called 'IT.php'. The file content is the same as 'EN.php' in the 'EN' directory; the English language file. However, in 'IT.php' the changes you made are stored. In this way you make a new version.

  4. Start translating.

    NOTICE: Keep HTML code intact. Do not change stuff like <br> , <p>, <align="center"> , <font size="2"> , the '@' and '@' and all characters in-between.
    Also, in entries like [<< previous], do not touch the [<< ].
    These special characters form part of S@S code. Making changes in these expressions can cause malfunctioning of your translation and even of the complete CMS.
    You can expect these characters on entries: 81, 82, 83, 85, 86, 205, 206, 208, 209, and 217 in S@S management as well as in the modules. But, take care, maybe we forgot a couple

  5. When you are ready, or have done enough for the moment, go to the bottom of the page and click on the 'Save' button. The changes you made are saved.
    The next time you want to work, enter the same country code, e.g. in this example, enter 'IT'. Omit the single quotes.
    You will find your work and can continue. When you have translated everything: congratulations!

3.3 Your translation is ready

You will find your new translations (in our example, translations from English to Italian, we called the country code IT) in the directory: /starnet/languages/IT/.
Send the contents of the ../starnet/languages/IT directory as zipped attachment with a mail to schoutdi@knoware.nl. When you need help in this operation, mail us and we will help you.
A member of the S@S team will upload your translation to our Sourceforge download site ). In this way your translation will become available for the world.

3.4 Integrating a language on your system

When you have seen the language of your choice on our Sourceforge download site, you can download it. Let's assume you want to download the Spanish language version. On our Sourceforge site, you can see the name of the file: 'spanish_lang.zip'.
Then follow these steps:
  1. Download 'spanish_lang.zip'.
  2. Unzip the language file in your html root directory. All files will be unzipped in the right directory (i.e. in ../starnet/languages/ES).
  3. Go to S@S Management < Working Environment < Language.
  4. Open the dropdown menu and you find an entry called 'ES'. That's your Spanish version.
  5. Choose ES, click on 'Save' and reload your browser. You have a Spanish Site@School.

    NOTICE: Only the management part of the site is in Spanish. The site will remain in the language you made it.

3.5 Adapting a language

With the 'Translate' tool it is also easy to make adaptations within your own language or to adapt your S@S to the customs in your school.
For example, take entry 148. It's the content of the e-mail message a pupil sends to a teacher:
" Esteemed madam/sir,
I have created/changed my personal page,
< here comes the link to the pupil's page> could you check and approve it?,
with kind regards ".

When you are in a less formal situation, you may feel the need to change "Esteemed madam/sir" to something like "Hello".
This is how it is done:
Enter the 'Translate' tool. Make your changes and go to the bottom of the form and click on 'Save'.
Your changes are active immediately and the teacher will receive an email alert beginning with: "Hello".
With the start of version 2.4 the language changes are written to separate files (XX_user.php where XX is the language code). This will prevent that your changes will be lost when you upgrade to a newer version of Site@School. See 6.2 Upgrading and your language files

(top)

4. String replacement tool

This is a dangerous tool. Set the permissions to use this tool to 'No' in Configuration > Users for everybody. Only set it at 'Yes' when needed and only for someone who knows what she is doing. Think and write down what you want to do before using this tool. Make a backup copy of your database before replacing a string. Replacing strings can have unexpected results. You are warned!
When opening the tool you will see:


tools_string_replacement.png
Explanation:
  1. Replace string: Here you put the string in the database that you want to replace.
    For example, you have to change your URL because your school merges into another. The old school URL is 'http://oldschool.net'. The URL of the new school is 'http://newschool.net'. So put in http://oldschool.net.
  2. By: To remain in the above example, put in http://newschool.net.
  3. Go back: To undo your action and return to the previous menu.
  4. Save: To replace the string.

(top)

Author: Dirk Schouten <schoutdi (at) knoware (dot) nl>
Last updated: 2006-04-18