Ulteriori configurazioni

From rejetto wiki
Jump to navigation Jump to search

Editor HTML Editor e i Templates (Modelli)


Attenzione: alcuni utenti hanno incontrato problemi a visualizzare, nel loro browser web, i cambiamenti apportati.
Questi malfunzionamenti possono, solitamente, essere risolti resettando la cache del browser; (in molti sistemi è sufficiente utilizzare il tasto "F5").

Sebbene il modello predefinito di HFS soddisfi in maniera completa la maggior parte degli utenti, è anche possibile effettuare delle variazioni che consentono di cambiare l'aspetto del tuo sito.
Puoi provare liberamente e senza problemi in quanto HFS è munito di una utility, presente nell'editor dei modelli e chiamata "Restore default" che permette il ripristino dei valori originali del template predefinito (default *.tpl) fornito da HFS al momento della prima installazione.

Di seguito, si può vedere l'aspetto di base di un "sito di esempio" visualizzato con Firefox:

Error creating thumbnail: Unable to save thumbnail to destination

Nella figura successiva, lo stesso sito dopo aver apportato alcune variazioni al template originale (o averne inserito uno completamente nuovo):

Error creating thumbnail: Unable to save thumbnail to destination

(Note that the above pictures have been shrunk and truncated so that they are easy to view. In reality, the graph in the "black" template for example, displays (and works) perfectly.)

Modifica dei Templates

E' molto più facile modificare un modello esistente, piuttosto che crearne uno ex novo.
Puoi trovare ottimi esempi di templates da utilizzare all'indirizzo Forum e in site.

You should be aware that an HFS template ( a *.tpl file) contains the raw elements from which HFS builds the final HTML. Strictly speaking, it is not actually HTML, but you'll find that the HFS editor seamlessly handles verified HTML files from the above sites if you change the extension to *.tpl.

Before starting, it is good practice to make a folder named "Templates" under your "HFS" folder. Eg. C:\HFS\Templates.

Follow this procedure to apply the "black" template illustrated above.

  1. Download the file named "Beta Black Template v3.htm" from Templates, and copy (or move) it to "Templates". If necessary, rename this file to "Beta Black Template v3.tpl" (ie. change the file extension) so the HTML editor can recognize it.
  2. In HFS, select "Edit HTML template" which opens the editor and automatically loads the current template (the default if you haven't made any changes).
  3. Click "Import" and, if necessary, navigate to C:\HFS\Templates. Select "Beta Black Template v3.tpl" and click Ok.
  4. When the new template is loaded into the editor, click "Apply", and then "Ok" (to dismiss the editor).
  5. In the HFS window, select root (/), right-click and then click "Browse it" to see the effect of your changes. Remember to refresh the browser cache ("F5" on most systems), if necessary.

Changing Templates


You may now choose to make some small changes to the template to see their effects. To do this:

  1. In HFS, select "Edit HTML template" which opens the editor and automatically loads the current template ("Beta Black Template v3.tpl" if you haven't made any changes).
  2. Navigate to the style section of the template, and find this line: "body, .row { color: #000000 }"
  3. In HTML, colors are normally identified by their hex value.
    "0D8BE9" represents a reasonably classic blue. Change the above line to this: "body, .row { color: #0D8BE9 }" and click "Apply".
  4. Go back to the main HFS window, select root (/), right-click and then click "Browse it" to see the effect of your changes.
  5. You'll notice that the entries in this part of the site are now displayed in blue. Remember to refresh the browser cache ("F5" on most systems), if necessary.
  6. If you wish to keep this change permanent in the template, click "Ok" in the HTML editor. If you don't want to keep the change, click "Undo".
Error creating thumbnail: Unable to save thumbnail to destination

The above illustrates the principles of a method for safely editing an HTML template. The main alternative is to save ("Export") the different template versions as you apply and verify changes.

Background color


One of the most dramatic visual changes is to change the background color. This is controlled by this line in the style section: body { margin:0; background-color:#51595B; padding:10px; color:#FFFFFF; }. Try changing the color value here to "#0D8BE9".

Error creating thumbnail: Unable to save thumbnail to destination


Click to enlarge





Not everybody is familiar with hex color codes. You may care to download the free Pixeur application. This "pick" tool allows you to click anywhere on your screen and display the corresponding hex value (among other things).

Advanced example


The following illustration shows the template called "!!!ledufe.tpl".

Error creating thumbnail: Unable to save thumbnail to destination








At first glance it may just look like a fairly clean variation of the default template, but it actually uses some very advanced features.
If you click on the "Google" logo towards the bottom of the screen for example, your browser goes directly to the Google site where you can immediately perform Internet searches.
The central part of this webpage:

  • Shows whether you are logged into the "Hamachi" network, (and permits autologin if you're offline).
  • Allows you to invoke and sign-in to Skype messenger and use Skype phone.
  • Lets you sign into Windows messenger.
  • Lets you access other Microsoft services.

The toolbar across the top allows access to further features, including "Site" navigation, further "Hosted Sites", and to change the type of "CSS" that actually constructs this webpage within the HFS browser, a site "Search" box, and this:

Error creating thumbnail: Unable to save thumbnail to destination


This lets you use a self-made set of "HFS Tools", manipulate your browser's bookmarks or "Favorites", and lets you stream music files to site visitors using your favorite MP3 player.

There are many examples of good templates, together with notes about their construction, in the Template Examples Gallery.