m00ware /Home \Team \Projects \About \----------------------------------------------------\ | | | STD Page Generation Hack | | | | The original script is from Cockos | | | | New features : | | + Pages handling | | + Basic lang support | | + Tabs | | + Random quotes | | + (not so) Smart line wrapping | | + Internal links | | | | The hacked script is available here: | | + index.php | | + std.php | | | | Some features such as lang support only work if the hacked std.php is used | | with index.php. Links are created to be used with index.php and lang support | | is only done in index.php | | | | Pages handling | | The index.php script maps each page to a numeric id. In order to do so it | | needs pages.txt which lists the available pages. All the pages of the site | | have an entry in this file (an entry per line). The syntax of a single entry | | is : | | | | Name;file;tag | | | | or | | | | Name;file | | | | Where 'Name' is the name of the page and 'fichier' is the file for the page | | data. The keyword 'tag' is used for tabs, if it is here, the page will be | | among the tabs. | | | | Lang support | | In order to define which langs are supported by the site they must first be | | listed in the lang.txt file : one lang per line, identified by a 2 char code. | | The 1st lang is used as the default lang. Every single pages must exist in | | this default language, these are the pages listed by pages.txt. | | In order to define the pages for an other language, a lang-xx.txt file must | | be created where 'xx' is the 2 char code for this language. This file lists | | all the pages translated in this language, one entry per line. The syntax is | | as follows : | | | | Name in page.txt;Translated Name;file | | | | Where 'Name in page.txt' is the name of the page as in pages.txt (the name | | of the page in the default lang), 'Translated Name' is the name in the new | | language and 'file' the file where the tranlsation can be found. | | The script detects browser settings in order to choose the proper lang | | among the supported ones. | | | | Tabs | | All the pages with t3h 'tab' keyword are inserted in the tab bar. | | | | Random quotes | | The quotes are in the quotes.txt file, one quote per line. A random quote | | is choosed and diplayed at the bottom of the page. Take care not to use too | | long quotes! | | | | Smart line wrapping | | The Cockos script already supports automatic line wrapping. Here we added | | the possibility to have some negative indent for line created by line | | wrapping. This is done by adding 'w^x' at the *begining* of the line where 'x' | | is a *digit*. The indent on the creates line will be the same number of char | | as the first line where 'w^x' apears minus x (This is used to have more | | indentation on the first line of a block of text). One can alos use 'w^', in | | this case x = 0. | | | | internal links | | Tags like ${Name of the link;x} can be used to create a link named 'Name of | | the link' to the page whose ID is x (ie the page of the (x+1)th line in | | pages.txt). | | If 'Name of the link' is omited (${;x}), the link will have the name of the | | page. | | | \----------------------- m00ware -- Knowledge is power ---------------------------/ *en fr |