Tips & tricks

Contents:

1. Introduction
2. Making a link to a document for downloading
3. Page editor newline or paragraph
4. Changing the appearance of a section or page link
5. More Site@School CMS'es on one server
6. Logging
7. Using the 'Edit CSS' feature
8. Always an alert when something changes
9. Importing files from Hot Potatoes
10. RSS feed
11. A scrolling page
12. A slideshow page
13. Moving S@S to a new ISP

1. Introduction

This chapter is trying to give some hints and tips on the configuration of Site@School or changing some of its properties.
To effectively execute some of the tips, you need experience in:
- Knowing how to go to a directory or a file, i.e. finding your way in the file system of the server where S@S is running. Mostly this involves the use of a couple of Linux or Windows commands. Sometimes your FTP program can do these actions for you.
- Knowing how to copy files. This means knowing the 'copy' commands for the server where S@S is running. Mostly this use involves using the 'cp' command (Linux) or 'copy' (Windows). Also here your FTP program can sometimes help.
- Working with a text editor. Under Linux this can be Pico or Vi, under Windows it can be Notepad.

When you have no experience with the above skills, ask your local Linux or Windows user group or ask someone who has these capabilities.

(top)

2. Making a link to a document for downloading

When you are in the page editor, you can click on source:

[ ]
tips_source.jpg

and enter the following:

<a href="http://localhost/starnet/media/wordfile.doc">download wordfile.doc</a>
The same can be achieved by clicking the link icon:

[ ]
tips_link.jpg

and type in the following:

[ ]
tips_hyperlink.jpg

(top)

3. Page editor newline or paragraph

When in the page editor the "enter" key is pressed a <p> is entered in the text. Actually this indicates a new paragraph.
Sometimes we need just a 'new line': <br>. This can be archieved by doing a 'Shift + Enter'. This means, pressing the 'Shift' key on your keyboard and simultaneously pressing the 'Enter' key. After this action, release both keys.

(top)

4. Changing the appearance of a section or page link

With simple HTML tags you can change the appearance of the section or page text.
For example, let's assume you have a section called 'Our School'. When you put this text in the entry field, it will appear in 'normal' text.
However, when you put <b> and </b> around 'Our School', the characters will be bold:


tips_edit_section.png

Also other HTML tags can be used. Find the simplest HTML manual for 'underline', 'italics' and many other markup tags.

Remark: This tip is only needed when it has not been taken care of in the template for your site.

(top)

5. More Site@School CMS'es on one server

We have installed a 'normal' S@S installation, with the path:
'/home/httpd/html/starnet/'.
Let's call this one 'S@S 0'.
Suppose you want two extra S@S'es and you want to put them in different directories:
- S@S 1 is in a directory called cms1 and
- S@S 2 is in a directory called cms2.
Then we made a directory 'cms1' and a directory 'cms2' in '/home/httpd/html'. We copied the siteatschool2.2 zip in the respective directories and unzipped them.
Then we ran the normal installation procedure. For the URL's we specify 'http://www.yourschool.org/cms1' and 'http://www.yourschool.org/cms2' for cms2.

If you have the possibility of 'multiple databases' you can give each CMS its own database in MYSQL. When you run your own server, you can have multiple databases, each with a different name. When you have only one database (as is the case with many Internet Service Providers), you can give each CMS a different database prefix in the same database. For example: cms_1 and cms_2.

(top)

6. Logging

When you want to log which user uses the system, you can enable logging by going to /starnet/index.php, line 133. You find:

//include ("addons/logging.php");
Uncomment the line by removing the two forward slashes. Save your work.
Create the directory 'log' in the 'starnet' directory and, in 'log', create a file named 'access.log'. Chmod the 'log' directory and 'access.log' to 777. This is a security risk! Chown the dir and file to the owner and group of your webserver.

Here is an example of what you find in 'access.log':

[access log site@school]
[127.0.0.1 on 26-2-2004 at 14:48 userid:admin]

(top)

7. Using the 'Edit CSS' feature

In the 'Configuration manager', under 'S@S Options' you might find the 'Edit CSS' button, depending on the template you choose. You might see:


confman_options_css.png

With the 'Edit CSS' button you can edit the cascading style sheet.

By pressing the 'Edit CSS' button you will see:


confman_options_css_edit.png

Make sure the CSS file in ../starnet/themes/editable/style.css is writable, so you can save your changes.
When the CSS button is visible you find a 'style.css' file in the corresponding themes directory.

Two editable templates and CSS

The editable template has its own CSS file. Suppose you want an editable template on both the site and the protected area, and you also want two different style sheets. This is done in the following way:
Go to the '../starnet/themes' directory. In it you find all the available theme names as directories. You also see the directory 'editable'. That's the directory of the editable template. Make a copy of that directory and its contents under a different name ('editable2' for example). Now you have two template editors with two different style sheets. You use 'editable' for the site and 'editable2' for the protected area. Keep in mind not to use the protected area in 'editable' and not to use the site in 'editable2', i.e. putting protected content on the public site.

(top)

8. Always an alert when something changes

Default setting for sending email alerts is one per day. This is a feature. When you have a class of 20 pupils and they all work on their pages, you easily can get 200 mails per day!
However, for testing purposes, or when you specially want an alert for every change, do the following:
Go to ../starnet/core/pag_start.inc.php. Go to line 119. You will see:

if($change_date < $d) {                                         //send alerts only the first time on a date
 include("core/send_alerts.php") ;                              //check to see if need to send alerts
}
Change this code to read:

//if($change_date < $d) {                  //send alerts only the first time on a date
 include("core/send_alerts.php") ;     //check to see if need to send alerts
//}
The above is for the site pages, do the same for the pupil pages, in file ../starnet/editors/fckeditor/studenteditor.php. Go to line 184. You will see:

if (($teacher_email != "") and ($send_email == "1") and ($change_date < $d))
Change this code to read:

if (($teacher_email != "") and ($send_email == "1"))
I.e. put two forward slashes in two places in the code. Save your work.
Now you will receive alerts every time something changes.

NOTICE: you still need to properly set 'Send alerts (Y/N)' and 'Alerts per section (Y/N)'.

(top)

9. Importing files from Hot Potatoes

When you want to import quizzes from HotPotato you need the 'include' module. This module enables including files with javascript in them.
The module includes a *.html or *.htm file (you can adapt this for *.php) file and the filename (without extention) has to be the same as the pagename on which you install this module.
Best is to create a directory in starnet\media eg. include where you place your files.
In the module admin you can specify the path to the include files.
In the configuration table you need:
INSERT INTO sn_configuration VALUES ('include_module_path', 'starnet/media/javascript', NULL);
You need to add a record to the modules table:
INSERT INTO sn_modules VALUES (NULL, 'Include module', 'include', 'include.php, Include a file', 'admin.php', '');

(top)

10. RSS feed

The file 'rss.php' in the ./starnet/addons' directory can be used to create an RSS feed of the last 20 pages of your site that have been recently changed.

Give your RSS reader the following link: http://www.yourschoolsite.org/starnet/addons/rss.php
(the URL is fictional, replace the 'www.yourschoolsite.org' with the real URL of your school)

Real RSS feed programs give only the changes of the page. This script show the page itself for normal content and for modules it gives the page link only.

(top)

11. A scrolling page

The 'scroll_page.php' script in the ./starnet/addons' directory can scroll down a page from S@S automatically and at the end of the page it starts again.
Can be useful to display announcements etc.

The welcome text has to be set in the configuration table via:
the config_key scroll_page_welcome.
If you install the 'TV module' you can set from there.

Options:

http://www.yourschoolsite.org/starnet/addons/scroll_page.php?page=1&speed=1

As you can see the selected page to display is page '1'. You can find the page number in the 'Page manager'.
The 'speed' option determines the scrolling speed. '1' is the default and does not need to be given. The higher the number, the faster the scrolling.

(top)

12. A slideshow page

Slideshow_full.php is a full screen version of the ALLbum slideshow which can run on a standalone PC in the school lobby, for example.
It runs without the template and can show pictures at full screen.

Be careful to have images of the same dimensions.

The URL to point to is:

http://www.yourschoolsite.org/addons/slideshow_full.php?album_name=albumname
where the albumname is the name of album in the ALLbum module.

You can give the refresh time, transition type (only for IE) and the width of the screen.

this can be done as follows:

http://www.yoursite.com/addons/slideshow_full.php?album_name=albumname&s=1&t=3&w=800

(top)

13. Moving S@S to a new ISP


Best approach is:

  1. Do a new installation at your new provider and make sure the basic S@S installation is working.
  2. Use PhpMyAdmin to restore the database from your local system.
    See section 2 of the Tools chapter.
  3. Check the webserverpath and site URL in the configuration, they might not be the same as on your previous (local) site
  4. Use the string replace tool to change all the image links to the new situation.
    See section 4 of of the Tools chapter.
  5. Upload all the content from the starnet/media and the starnet/studentapges directories to the same directories at your new ISP.
  6. Check permissions and ownership of files and directories since they might differerent because not all ISP's have the same policy on security.

(top)

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