From: MikeMannix Date: Sat, 15 Sep 2001 05:49:30 +0000 (+0000) Subject: none X-Git-Url: https://git.openafs.org/?p=openafs-wiki.git;a=commitdiff_plain;h=312fc6b281647f980644bbc3beb5161c84b517ae none --- diff --git a/TWiki/TWikiInstallationGuide.mdwn b/TWiki/TWikiInstallationGuide.mdwn index 2c29242..5ae9078 100644 --- a/TWiki/TWikiInstallationGuide.mdwn +++ b/TWiki/TWikiInstallationGuide.mdwn @@ -44,12 +44,13 @@ Request and download the TWiki 01-Sep-2001 distribution in Unix ZIP format from ### Step 1: Create & Configure the Directories -**_NOTE:_** _If you don't have access to your Web server configuration files - for example, if you're installing on an ISP-hosted account - use the [[alternative Step 1|Main/WebHome#StepOneB]] instead._ +- **_NOTE:_** _If you don't have access to your Web server configuration files - for example, if you're installing on an ISP-hosted account - use the [[alternative Step 1|Main/WebHome#StepOneB]] instead._ +- **_NOTE:_** To install TWiki on SourceForge, for use on a software development project, read TWiki:Codev/SourceForgeHowTo. - Create directory `/home/httpd/twiki` and unzip the TWiki distribution into this directory. - The `twiki/bin` directory of TWiki must be set as a cgi-bin directory. Add `/home/httpd/twiki/bin` to file `/etc/httpd/httpd.conf` with only `ExecCGI` option. - The `twiki/pub` directory of TWiki must be set so that it is visible as a URL. Add `/home/httpd/twiki` to file `httpd.conf` with normal access options (copy from `/home/httpd/html` ). -- Now add `ScriptAlias` for `/twiki/bin` and `Alias` for `/twiki` to file `httpd.conf` .
**_Note:_** The `ScriptAlias` **must** come before the `Alias` in Apache, otherwise it will fail to correctly set up `/twiki/bin/` , due to the fact that it sees that as being just another subdirectory of the `/twiki/` alias.
+- Now add `ScriptAlias` for `/twiki/bin` and `Alias` for `/twiki` to file `httpd.conf` .
**_NOTE:_** The `ScriptAlias` **_must_** come before the `Alias`, otherwise, Apache will fail to correctly set up `/twiki/bin/`, by treating it as just another subdirectory of the `/twiki/` alias. > **Example `httpd.conf` entries:** > @@ -88,13 +89,13 @@ To install TWiki on a system where you don't have server administrator privilege > > twiki/bin > CGI bin -> cgi-bin enabled dir +> cgi-enabled dir > /home/smith/public_html/cgi-bin > > > twiki/lib > library files -> same level like twiki/bin +> same level as twiki/bin > /home/smith/public_html/lib > > @@ -116,8 +117,6 @@ To install TWiki on a system where you don't have server administrator privilege > /home/smith/twiki/templates > > -> -> (Read TWiki:Codev/SourceForgeHowTo in case you want to install TWiki on SourceForge, to use on a software development project.) diff --git a/TWiki/TWikiTemplates.mdwn b/TWiki/TWikiTemplates.mdwn index 27c8797..1d9a348 100644 --- a/TWiki/TWikiTemplates.mdwn +++ b/TWiki/TWikiTemplates.mdwn @@ -4,13 +4,21 @@
  • Overview
  • Major changes from the previous template system
  • Functional Specifications
  • -
  • New Template System by Example
  • @@ -51,7 +59,117 @@ The main difference is that templates are now defined using variables to include - Templates and [[TWikiSkins]] work transparently and interchangeably. For example, you can create a skin that overloads just the `twiki.tmpl`, like `twiki.print.tmpl`, that redefines the header and footer. - **_Note:_** The template directives work only for templates, they do not get processed in topic text. -## New Template System by Example +## TWiki Master Template + +All common parts are defined in a master template, **twiki.tmpl**, that all other templates use. + +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +>
    Template variable: Defines:
    %TMPL:DEF{"sep"}% "|" separator
    %TMPL:DEF{"htmldoctype"}% Start of all HTML pages
    %TMPL:DEF{"standardheader"}% Standard header (ex: view, index, seach)
    %TMPL:DEF{"simpleheader"}% Simple header with reduced links (ex: edit, attach, oops)
    %TMPL:DEF{"standardfooter"}% Footer, excluding revision and copyright parts
    %TMPL:DEF{"oops"}% Skeleton of oops dialog
    + +## Types of Template + +There are two types of templates: + +- **HTML Page Templates**: Defines layout of %WIKITOOLNAME% pages +- **Template Topics**: Defines default text when you create a new topic + +### HTML Page Templates + +%WIKITOOLNAME% uses HTML template files for all actions like topic view, edit, preview and so on. This allows you to change the look and feel of all pages by editing just some template files. + +The template files are in the **twiki/templates** directory. As an example, **twiki/templates/view.tmpl** is the template file for the **twiki/bin/view** script. Templates can be overloaded per web. The following search order applies: + +1. **twiki/templates/$webName/$scriptName.tmpl** +2. **twiki/templates/$scriptName.tmpl** + +**_Note:_** **$webName** is the name of the web ( i.e. **Main** ), and **$scriptName** is the script ( i.e. **view** ). + +**_Note:_** [[TWikiSkins]] can be defined to overload the standard templates. + +Some special variables are used in templates ( especially **view** ) to show meta data - see [[Meta Data Rendering|Main/TWikiDocumentation#Meta_Data_Rendering]] + +### Template Topics + +Template topics define the default text for new topics. There are three types of template topics: + +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +>
    Topic Name: What it is:
    [[Main/WebTopicViewTemplate]] Help text shown when you view a non existing topic.
    [[Main/WebTopicNonWikiTemplate]] Help text shown when you view a non existing topic that has not a [[Main/WikiName]].
    [[Main/WebTopicEditTemplate]] Default text shown when you create a new topic.
    + +All template topics are located in the TWiki web. The [[WebTopicEditTemplate]] can be overloaded. The following search order applies when you create a new topic: + +1. The topic name specified by the `templatetopic` parameter. +2. WebTopicEditTemplate in the current web. +3. WebTopicEditTemplate in the TWiki web. + +#### Template Topics in Action + +Here is an example for creating new topics based on a specific template topic: + +
    + +
    + +Above form asks for a topic name. A hidden input tag of name "templatetopic" specifies the [[ExampleTopicTemplate]] as the template topic. Here is the HTML source of the form: + +
    + * New example topic: + + + + (date format is YYYYMMDD) +
    + +The "onlywikiname" parameter enforces [[WikiWords]] for topic names. + +**_Note:_** Use can use the `%WIKIUSERNAME%` and `%DATE%` variables in your topic templates as the signature; those variables are expanded when a new topic is created. The standard topic signature is:
    `-- %WIKIUSERNAME% - %DATE%` + +## Templates by Example Attached is an example of an oops base template `oopsbase.tmpl` and a example oops dialog `oopstest.tmpl` which is based on the base template. **_NOTE:_** This isn't the release version, just a quick, simple demo. @@ -59,7 +177,7 @@ Attached is an example of an oops base template `oopsbase.tmpl` and a example oo The first line declares the delimiter variable called "sep", used to separate multiple link items. The variable can be called anywhere by writing `%TMPL:P{"sep"}%` -> +>
    > >
     > %TMPL:DEF{"sep"}% | %TMPL:END%
    @@ -107,7 +225,7 @@ The first line declares the delimiter variable called "sep", used to separate mu
     
     Each oops template basically just defines some variables and includes the base template that does the layout work.
     
    -> 
    +> 
    > > >
     > %TMPL:DEF{"titleaction"}% (test =titleaction=) %TMPL:END%
    @@ -145,54 +263,8 @@ With URL: **.../bin/oops/Test/TestTopic2?template=oopstest&param1=WebH
     >   
    -## TWiki master template - -All common template parts are defined in one master template, `twiki.tmpl`, that all other templates include. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Template variable: Defines:
    %TMPL:DEF{"sep"}% "|" separator
    %TMPL:DEF{"htmldoctype"}% Start of all HTML pages
    %TMPL:DEF{"standardheader"}% Standard header (ex: view, index, seach)
    %TMPL:DEF{"simpleheader"}% Simple header with reduced links (ex: edit, attach, oops)
    %TMPL:DEF{"standardfooter"}% Footer, excluding revision and copyright parts
    %TMPL:DEF{"oops"}% Skeleton of oops dialog
    - -> **Example: `oopspreview.tmpl` template** -> -> %TMPL:INCLUDE{"twiki"}% -> %TMPL:DEF{"titleaction"}% (oops) %TMPL:END% -> %TMPL:DEF{"webaction"}% *Attention* %TMPL:END% -> %TMPL:DEF{"heading"}% Topic is not saved yet %TMPL:END% -> %TMPL:DEF{"message"}% Please go back in your browser and save the topic. %TMPL:END% -> %TMPL:DEF{"topicaction"}% -> %TMPL:END% -> %TMPL:P{"oops"}% - ## Known Issues - A drawback of referring to a master template is that you can only test a template from within TWiki, where the include variables are resolved. In the previous system, each template is a structurally complete HTML document with a `.tmpl` filename extension - it contains unresolved `%VARIABLES%`, but can still be previewed directly in a browser. --- [[PeterThoeny]] - 23 Jul 2001
    -- [[MikeMannix]] - 30 Aug 2001 +-- [[PeterThoeny]] - 23 Jul 2001
    -- [[MikeMannix]] - 14 Sep 2001
    diff --git a/TWiki/TextFormattingFAQ.mdwn b/TWiki/TextFormattingFAQ.mdwn index 2886fa6..601fcae 100644 --- a/TWiki/TextFormattingFAQ.mdwn +++ b/TWiki/TextFormattingFAQ.mdwn @@ -11,7 +11,7 @@ The most frequently asked questions about text formatting are answered. Also, [[
  • How can I write fixed font text?
  • Text I enter gets wrapped around. How can I keep the formatting as it is?
  • How do I create tables?
  • -
  • Can I include images and pictures?
  • +
  • Can I include images on a page?
  • Can I write colored text?
  • @@ -20,7 +20,7 @@ The most frequently asked questions about text formatting are answered. Also, [[ > > ### How do I make a separator? > -> You can make a horizontal separator by entering three dashes at the beginning of a line: `---`. +> Create a separator - a horizontal rule - by entering three dashes at the beginning of a blank line: `---`. You can enter more than three if you like, for a more visible separator in edit mode:
    `--------------` > > ---- > @@ -36,7 +36,7 @@ The most frequently asked questions about text formatting are answered. Also, [[ > > ### Text enclosed in angle brackets like <filename> is not displayed. How can I show it as it is? > -> TWiki interprets text as HTML. The '<' and '>' characters are used to define HTML commands. Text contained in angle brackets is interpreted by the browser if it's a valid HTML instruction, or ignored if it isn't - either way, the brackets and its contents are not displayed. +> TWiki interprets text as HTML, and the '<' and '>' characters define where HTML commands start and end. Text _inside_ angle brackets is treated as HTML, and ignored if it doesn't actually do anything - either way, the brackets and its contents are not displayed. > > If you want to display angle brackets, enter them as HTML codes instead of typing them in directly: > @@ -68,7 +68,7 @@ The most frequently asked questions about text formatting are answered. Also, [[ > > ### Text I enter gets wrapped around. How can I keep the formatting as it is? > -> TWiki interprets text as HTML, so you can use the `preformatted` HTML text option to keep the new line of text as is. Enclose the text in <pre> </pre>, or in TWiki's own <verbatim> </verbatim> tags: +> TWiki interprets text as HTML, so you can use the `preformatted` HTML option to keep the new line of text as is. Enclose the text in <pre> </pre>, or in TWiki's own <verbatim> </verbatim> tag: > > This text will keep its format as it is: > @@ -77,7 +77,7 @@ The most frequently asked questions about text formatting are answered. Also, [[ > aaa 12.00 3 36.00 > > -> The `pre` tag is standard HTML; `verbatim` is a special TWiki tag that also forces text to fixed font mode, and also prevents other tags and TWiki shortcuts from being expanded. +> The `pre` tag is standard HTML; `verbatim` is a special TWiki tag that forces text to fixed font mode, and also prevents other tags and TWiki shortcuts from being expanded. > > ---- > @@ -144,31 +144,35 @@ The most frequently asked questions about text formatting are answered. Also, [[ > > ---- > -> ### Can I include images and pictures? +> ### Can I include images on a page? > -> Yes, this is possible. The easiest way of including images is to attach a GIF, JPG or PNG file to a topic and then to include it with text `%ATTACHURL%/myImage.gif` . [[FileAttachment]] has more. +> Yes. The easiest way is to [[attach|Main/FileAttachment]] a GIF, JPG or PNG file to a topic and then to place it with: `%ATTACHURL%/myImage.gif`. This works only for the page that the image is attached to. > -> There are actually two ways of including inline images. +> To place an image on any page, ther are two ways of including inline images. > > **1\. Using URL ending in .gif, .jpg, .jpeg, .png** > -> This is a simple and automatic way of including inline images. Simply write the URL of the image file, this will create the inline image for you. **Note:** The images must be accessible as a URL. +> This is a simple and automatic way of including inline images. Simply write the URL of the image file, this will create the inline image for you. **_NOTE:_** The images must be [[accessible|Main/WebHome#ImgUpload]] as a URL. > > - **_You enter:_** ` TWiki http://www.dementia.org/twiki//view/wikiHome.gif logo.`
    **_Result:_** TWiki ![wikiHome.gif](http://www.dementia.org/twiki//view/wikiHome.gif) logo. > +> You can upload images directly to your server with FTP access. You can also [[attach|Main/FileAttachment]] image files to a topic - you could even create a dedicated image topic, like `ImageLibrary` - and then link to the images directly: +> +> - Attach `pic.gif` to `Someweb.SomeTopic`
    Display with http://www.dementia.org/twiki//view/Someweb/SomeTopic/pic.gif +> > **2\. Using <img> tag** > -> This is a manual process where you have more control over the rendering of the image. Use the <img> tag of HTML to include GIF, JPG and PNG files. **Note:** The display of the topic is faster if you include the WIDTH and HEIGHT parameters that have the actual image size. has more on inline images. +> This is a manual process where you have more control over the rendering of the image. Use the <img> tag of HTML to include GIF, JPG and PNG files. **Note:** The display of the topic is faster if you include the `WIDTH` and `HEIGHT` parameters that have the actual image size. has more on inline images. > -> - **_You enter:_** `TWiki logo.`
    **_Result:_**
    TWiki logo. +> - **_You enter:_** `TWiki logo logo.`
    **_Result:_**
    TWiki logo logo. > > ---- > > ### Can I write colored text? > -> Sure. The quickest way is to use the <font color="colorCode"> and </font> tags - they're HTML tags that work in any browser, (although they've been phased in the latest version). +> Sure. The quickest way is to go <font color="colorCode">colorize</font> - `font` is an HTML tag that works in any browser, although it's been phased out in the latest HTML specs. > -> You can also use a `style` attribute: `style="color:#ff0000"`, placed in most HTML tags - `span` is an all-purpose choice: "<span style="color:#ff0000">. +> You can also use the up-to-date `style` attribute - ex: `style="color:#ff0000"` - placed in most HTML tags. `span` is an all-purpose choice: "<span style="color:#ff0000">CoLoR</span>. Only old (like 3.x IE & NS) browsers have a problem with `style`. > > "colorCode" is the _hexadecimal RGB color code_, which is simply Red, Green and Blue values in hex notation (base 16, 0-F). For pure red, the RGB components are 255-0-0 - full red (255), no green or blue. That's FF-0-0 in hex, or "#ff000=" for Web page purposes. For a basic color selection (you can [[StandardColor|Main/StandardColors]] names instead of hex code in the =font tag only): > diff --git a/TWiki/WebHome.mdwn b/TWiki/WebHome.mdwn index dd0cc3e..e8d0c57 100644 --- a/TWiki/WebHome.mdwn +++ b/TWiki/WebHome.mdwn @@ -38,9 +38,9 @@ - - [[TWikiHistory]]: The TWiki development timeline - [[TWikiDocumentation]]: Complete current reference... - 1. [[TWiki System Requirements|Main/TWikiImplementationNotes]] - 2. [[TWiki Installation Guide|Main/TWikiInstallationGuide]] - 3. [[TWiki Upgrade Guide|Main/TWikiUpgradeGuide]] + 1. [[System Requirements|Main/TWikiImplementationNotes]] + 2. [[Installation Guide|Main/TWikiInstallationGuide]] + 3. [[Upgrade Guide|Main/TWikiUpgradeGuide]] 4. [[User Authentication|Main/TWikiUserAuthentication]] 5. [[Access Control|Main/TWikiAccessControl]] 6. [[TWikiTemplates]] @@ -50,9 +50,9 @@ 10. [[TWikiForms]] 11. [[TWikiPlugins]] 12. [[Monitoring Activity|Main/MonitoringSiteActivity]] - 13. [[Managing Topics|Main/ManagingTopics]] + 13. [[Managing Pages|Main/ManagingTopics]] 14. [[Managing Webs|Main/ManagingWebs]] - 15. [[A: TWiki File System|Main/AppendixFileSystem]] + 15. [[A - TWiki File System|Main/AppendixFileSystem]] ### TWiki Site Tools @@ -75,6 +75,6 @@ Site tools include utilities for navigating and keeping up with site activity on - TWikiTM is a trademark of [[PeterThoeny]] - TWiki is developed as Free Software under the [[GNU/GPL|Main/GnuGeneralPublicLicense]] -- Get the current version from [TWiki.org Downloads](http://TWiki.org/download.html)
    %TLS% +- Get the current version from [TWiki.org Downloads](http://TWiki.org/download.html)
    ![twikilogo88x31.gif](http://www.dementia.org/twiki//view/twikilogo88x31.gif) -- [[MikeMannix]] - 14 Sep 2001