HomeAdmin | |||||||||||||||||
%FFVER% | |||||||||||||||||
|
Admin: PublishCreating web pagesWith the micro-authoring system included with this firmware, it is quite easy to customize the web pages on this device or add new ones. With the operating system Windows, you need to install two additional programs: The script language Perl and an archive program to pack TAR archives (e.g. UltimateZip). A standard Linux normally has this software included already. FunctioningA perl script (template.pl) will read in an HTML template file (template.html) looking for the character string "%BODY%". Next, the perl script will read all other HTML files in the current directory successively extracting the part between <BODY> and </BODY>. The extracted HTML code is then injected into the template at the %BODY% position and the outcome will be written to a new directory (./out-en/). Referenced files (e.g. images) are copied by the perl script into the new directory as well. The character string "$(echo -n %)DATE%" is replaced by the date/time stamp of the source file. The character string "$(echo -n %)TITLE%" is replaced bye the first H1 headline found in the source file. If the filename of the source file starts with "cgi-bin" appropriate shell commands will be inserted for web server execution. Own shell commands can be written between <SCRIPT LANGUAGE="shell"></SCRIPT> tags into the source file. During web server execution shell variables will be resolved in the standard way. Examples: "\$PWD" will output $PWD, "\$(ls /tmp)" will list the directory contents of /tmp. The resulting destination directory (./out-en/) is then packet with all subdirectories into a TAR-, TGZ- or TAR.GZ archive. The archive file can be uploaded via this admin page. Existing pages (such as these admin pages) are not deleted during this process. Brief Manual
Notes for Windows users: If the programs "tar" and "perl" are installed, the Linux commands will be accepted in the windows command prompt as well. You need to replace the "/" character with the backslash ("\"). The perl script can be executed also by double clicking the file name "template.pl". TipsWrite valid HTML and close open <Tags> with </Tags>. Use a validating HTML editor or use a text editor with a some discipline. Add a link to a new page to the template.html file. Copy one of the existing table rows (e.g. <TR>... Status ...</TR>) and change the tag <A HREF=""> and the text. It may be necessary to widen the left navigation bar. Search and change the WIDTH="150" attributes to the desired width. A new subdirectory will also need a new template.html. The perl script will read in separate templates for each subdirectory. To save space, change references to existing images such as "../images/". The TAR archive will be examined in order to cut out additional subdirectories in the archive file. Multi-language support may be added with <SPAN LANG="xx"> tags. Also TITLE, ALT and VALUE attributes are scanned for the "All languages!xx:Text for language A!yy:Text for language B" pattern. The perl script accepts a parameter to filter out the desired language.
Web page upload was aborted. Unpacking web pages.
Web page upload was cancelled. |
||||||||||||||||
Changed: 26.9.2006 | Top of page |