From 1636e576934c7c34c52b4601a92e431ab7cc176f Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 15 Aug 2007 09:55:49 +0200 Subject: Clean Trash/. --- Trash/BochsEmulator.mdwn | 3 - Trash/DistribWebMenu.mdwn | 19 -- Trash/GNUWebMenu.mdwn | 19 -- Trash/HurdLinks.mdwn | 7 - Trash/HurdTwikiMoveComments.mdwn | 15 -- Trash/HurdWebMenu.mdwn | 19 -- Trash/IrcChannels.mdwn | 24 --- Trash/MachWebMenu.mdwn | 19 -- Trash/MainWebMenu.mdwn | 19 -- Trash/MigWebMenu.mdwn | 19 -- Trash/MonitoringSiteActivity.mdwn | 56 ------ Trash/NewConsole.mdwn | 5 - Trash/PortToL4.mdwn | 1 - Trash/RelatedDocuments.mdwn | 7 - Trash/RelatedProjects.mdwn | 7 - Trash/TWikiTemplatingSystem.mdwn | 407 -------------------------------------- Trash/TestWebMenu.mdwn | 25 --- 17 files changed, 671 deletions(-) delete mode 100644 Trash/BochsEmulator.mdwn delete mode 100644 Trash/DistribWebMenu.mdwn delete mode 100644 Trash/GNUWebMenu.mdwn delete mode 100644 Trash/HurdLinks.mdwn delete mode 100644 Trash/HurdTwikiMoveComments.mdwn delete mode 100644 Trash/HurdWebMenu.mdwn delete mode 100644 Trash/IrcChannels.mdwn delete mode 100644 Trash/MachWebMenu.mdwn delete mode 100644 Trash/MainWebMenu.mdwn delete mode 100644 Trash/MigWebMenu.mdwn delete mode 100644 Trash/MonitoringSiteActivity.mdwn delete mode 100644 Trash/NewConsole.mdwn delete mode 100644 Trash/PortToL4.mdwn delete mode 100644 Trash/RelatedDocuments.mdwn delete mode 100644 Trash/RelatedProjects.mdwn delete mode 100644 Trash/TWikiTemplatingSystem.mdwn delete mode 100644 Trash/TestWebMenu.mdwn (limited to 'Trash') diff --git a/Trash/BochsEmulator.mdwn b/Trash/BochsEmulator.mdwn deleted file mode 100644 index bc20d2f6..00000000 --- a/Trash/BochsEmulator.mdwn +++ /dev/null @@ -1,3 +0,0 @@ -# Hurd.Bochs IA-32/64 Emulator - -[[Distrib/Bochs]] diff --git a/Trash/DistribWebMenu.mdwn b/Trash/DistribWebMenu.mdwn deleted file mode 100644 index 2798f677..00000000 --- a/Trash/DistribWebMenu.mdwn +++ /dev/null @@ -1,19 +0,0 @@ -See the [[TWiki/WebMenuFormat]] for formatting tips. If you don't understand anything of this, or you screw things up entirely, don't worry. Simply email [[Main/JoachimNilsson]] and ask him to fix the menu. :) - -# Default items for this web - -* SET DEFAULTITEMS = - -%WEB\{name="Hurd" home="Hurd" expand="always"\}% - -%WEB\{name="GNU" home="GNU"\}% - -%WEB\{name="Distrib" home="Distrib"\}% Items here will soon be listed as percentITEMopenbracename="About" topic="TheGnuHurd"closebracepercent - -%WEB\{name="Mach" home="Mach"\}% - -%WEB\{name="Mig" home="Mig"\}% - -%WEB\{name="Main" home="Main"\}% - -%WEB\{name="TWiki" home="TWiki"\}% diff --git a/Trash/GNUWebMenu.mdwn b/Trash/GNUWebMenu.mdwn deleted file mode 100644 index 356d984c..00000000 --- a/Trash/GNUWebMenu.mdwn +++ /dev/null @@ -1,19 +0,0 @@ -See the [[TWiki/WebMenuFormat]] for formatting tips. If you don't understand anything of this, or you screw things up entirely, don't worry. Simply email [[Main/JoachimNilsson]] and ask him to fix the menu. :) - -# Default items for this web - -* SET DEFAULTITEMS = - -%WEB\{name="Hurd" home="Hurd" expand="always"\}% - -%WEB\{name="GNU" home="GNU"\}% Items here will soon be listed as percentITEMopenbracename="About" topic="TheGnuHurd"closebracepercent - -%WEB\{name="Distrib" home="Distrib"\}% - -%WEB\{name="Mach" home="Mach"\}% - -%WEB\{name="Mig" home="Mig"\}% - -%WEB\{name="Main" home="Main"\}% - -%WEB\{name="TWiki" home="TWiki"\}% diff --git a/Trash/HurdLinks.mdwn b/Trash/HurdLinks.mdwn deleted file mode 100644 index 6fcab65e..00000000 --- a/Trash/HurdLinks.mdwn +++ /dev/null @@ -1,7 +0,0 @@ -Important links to Hurd related material. - -* [GNU's Hurd pages](http://hurd.gnu.org) -* [Debian GNU/Hurd](http://www.debian.org/ports/hurd/) -* [Misc. Docs @Etherhogz](http://www.etherhogz.org/doc/) - --- [[Main/JoachimNilsson]] - 11 May 2002 diff --git a/Trash/HurdTwikiMoveComments.mdwn b/Trash/HurdTwikiMoveComments.mdwn deleted file mode 100644 index 9ee91af5..00000000 --- a/Trash/HurdTwikiMoveComments.mdwn +++ /dev/null @@ -1,15 +0,0 @@ -Potential places to move Hurd Twiki to in order of preference: - -* other -* savannah.gnu.org -* gnu.org - --- - -I favor removing gnu.org from the above list. There are copyright issues that are technically impossible to address in the way that RMS wants copyright assigned to all content hosted on gnu.org. While we probably could bend over backwards to accomodate it, fundamentally I think that this and other potential problems are not worth the effort of making this Hurd Twiki an official part of the GNU project. - -Technically I think that savannah.gnu.org might be possible but I will defer to others for a decision from this perspective. Assuming it's possible, I think we may have similar problems as above. - -I favor looking for another solution, an "other". - --- [[Main/GrantBow]] - 22 Sep 2002 diff --git a/Trash/HurdWebMenu.mdwn b/Trash/HurdWebMenu.mdwn deleted file mode 100644 index adc55d1d..00000000 --- a/Trash/HurdWebMenu.mdwn +++ /dev/null @@ -1,19 +0,0 @@ -See the [[TWiki/WebMenuFormat]] for formatting tips. If you don't understand anything of this, or you screw things up entirely, don't worry. Simply email [[Main/JoachimNilsson]] and ask him to fix the menu. :) - -# Default items for this web - -* SET DEFAULTITEMS = - -%WEB\{name="Hurd" home="Hurd" expand="always"\}% %ITEM\{name="About" topic="TheGnuHurd"\}% %ITEM\{name="Documentation" topic="WebHome"\}% %ITEM\{name="Installation" topic="InstallNotes"\}% %ITEM\{name="Getting Help" topic="NewbieQuestions"\}% %ITEM\{name="Seen Hurd" topic="SeenHurd"\}% - -%WEB\{name="GNU" home="GNU"\}% %DEFAULTITEMS% - -%WEB\{name="Distrib" home="Distrib"\}% %DEFAULTITEMS% - -%WEB\{name="Mach" home="Mach"\}% %DEFAULTITEMS% - -%WEB\{name="Mig" home="Mig"\}% %DEFAULTITEMS% - -%WEB\{name="Main" home="Main"\}% %DEFAULTITEMS% - -%WEB\{name="TWiki" home="TWiki"\}% %DEFAULTITEMS% diff --git a/Trash/IrcChannels.mdwn b/Trash/IrcChannels.mdwn deleted file mode 100644 index c9235bc7..00000000 --- a/Trash/IrcChannels.mdwn +++ /dev/null @@ -1,24 +0,0 @@ -We happen to have developers in Australia, Europe, Canada and the US so we have most time zones covered most of the time. Most of the logs are [kept here](http://web.walfield.org/~hird/) and collected by the Deride bot ([source code](http://ftp.walfield.org/pub/people/neal/deride/)). - -* #hurd - main discussion channel - * [7 day](http://web.walfield.org/~grant/hurd-irc-stats-thisweek.html) summary (run nightly) - * [Full log](http://web.walfield.org/~grant/hurd-irc-stats-thisweek.html) summary (run nightly) -* #hurd-es - Spanish discussion - * [7 day](http://web.walfield.org/~grant/hurd-es-irc-stats-thisweek.html) summary (run nightly) - * [Full log](http://web.walfield.org/~grant/hurd-es-irc-stats.html) summary (run nightly) -* #hurdfr - French discussion - * [7 day](http://web.walfield.org/~grant/hurdfr-irc-stats-thisweek.html) summary (run nightly) - * [Old log](http://web.walfield.org/~grant/hurdfr-irc-stats.html) summary - logs no longer recorded - * logs not taken September 9, 2002 - October 14+, 2002. Neal told me it will start at the next reboot of hird whenever that is. - -* #hurd-bunny - mostly non-technical, off topic & fun - * [Summary](http://bender.yi.org/hurd-bunny/) - * [Old log](http://web.walfield.org/~grant/hurd-bunny-irc-stats.html) summary - logs no longer recorded at this location - --- [[Main/GrantBow]] - 01 Oct 2002 - -_and we happen to have [[Hurd/HurdIRC]] already :)_ - -Oh, oops, sorry Michael, my mistake. We should refactor these pages together. I'm feeling a growing desire to refactor all kinds of stuff to help direct the inevitable growth of pages. - --- [[Main/GrantBow]] - 09 Oct 2002 diff --git a/Trash/MachWebMenu.mdwn b/Trash/MachWebMenu.mdwn deleted file mode 100644 index e8571f44..00000000 --- a/Trash/MachWebMenu.mdwn +++ /dev/null @@ -1,19 +0,0 @@ -See the [[TWiki/WebMenuFormat]] for formatting tips. If you don't understand anything of this, or you screw things up entirely, don't worry. Simply email [[Main/JoachimNilsson]] and ask him to fix the menu. :) - -# Default items for this web - -* SET DEFAULTITEMS = - -%WEB\{name="Hurd" home="Hurd" expand="always"\}% - -%WEB\{name="GNU" home="GNU"\}% - -%WEB\{name="Distrib" home="Distrib"\}% - -%WEB\{name="Mach" home="Mach"\}% %ITEM\{name="MachHistory"\}% %ITEM\{name="OskitMach"\}% %ITEM\{name="GnuMach"\}% - -%WEB\{name="Mig" home="Mig"\}% - -%WEB\{name="Main" home="Main"\}% - -%WEB\{name="TWiki" home="TWiki"\}% diff --git a/Trash/MainWebMenu.mdwn b/Trash/MainWebMenu.mdwn deleted file mode 100644 index 51601d36..00000000 --- a/Trash/MainWebMenu.mdwn +++ /dev/null @@ -1,19 +0,0 @@ -See the [[TWiki/WebMenuFormat]] for formatting tips. If you don't understand anything of this, or you screw things up entirely, don't worry. Simply email [[Main/JoachimNilsson]] and ask him to fix the menu. :) - -# Default items for this web - -* SET DEFAULTITEMS = - -%WEB\{name="Hurd" home="Hurd" expand="always"\}% - -%WEB\{name="GNU" home="GNU"\}% - -%WEB\{name="Distrib" home="Distrib"\}% - -%WEB\{name="Mach" home="Mach"\}% - -%WEB\{name="Mig" home="Mig"\}% - -%WEB\{name="Main" home="Main"\}% %ITEM\{name="Users" topic="TWikiUsers"\}% %ITEM\{name="Groups" topic="TWikiGroups"\}% - -%WEB\{name="TWiki" home="TWiki"\}% diff --git a/Trash/MigWebMenu.mdwn b/Trash/MigWebMenu.mdwn deleted file mode 100644 index f7daf7b7..00000000 --- a/Trash/MigWebMenu.mdwn +++ /dev/null @@ -1,19 +0,0 @@ -See the [[TWiki/WebMenuFormat]] for formatting tips. If you don't understand anything of this, or you screw things up entirely, don't worry. Simply email [[Main/JoachimNilsson]] and ask him to fix the menu. :) - -# Default items for this web - -* SET DEFAULTITEMS = - -%WEB\{name="Hurd" home="Hurd" expand="always"\}% - -%WEB\{name="GNU" home="GNU"\}% - -%WEB\{name="Distrib" home="Distrib"\}% - -%WEB\{name="Mach" home="Mach"\}% - -%WEB\{name="Mig" home="Mig"\}% Items here will soon be listed as percentITEMopenbracename="About" topic="TheGnuHurd"closebracepercent - -%WEB\{name="Main" home="Main"\}% - -%WEB\{name="TWiki" home="TWiki"\}% diff --git a/Trash/MonitoringSiteActivity.mdwn b/Trash/MonitoringSiteActivity.mdwn deleted file mode 100644 index b0576963..00000000 --- a/Trash/MonitoringSiteActivity.mdwn +++ /dev/null @@ -1,56 +0,0 @@ -%TOC% %STARTINCLUDE% - -# Monitoring Site Activity - -_Services for tracking content editing and general site usage_ - -## Overview - -TWiki provides two highly configurable, automated site monitoring tools, **WebNotify**, to email alerts when topics are edited, and **WebStats**, to generate detailed activity reports. - -## WebNotify Recent Changes Alert - -Each TWiki web has an automatic email alert service that sends a list of recent changes on a preset schedule, like once a day. Users can subscribe and unsubscribe using %NOTIFYTOPIC% in each web. - -### Setting Up WebNotify - -The Perl script `mailnotify` is called by a deamon in regular intervals. The script sends an automated email to subscribed users if topics were changed in a web within last interval. - -#### Configuring Outgoing Mail - -%WIKITOOLNAME% will use the `Net::SMTP` module in case it is installed on your system. You need to specify the `SMTPMAILHOST` variable in [[TWiki/TWikiPreferences]]. - -You can use an external mail program like `sendmail` in case the `Net::SMTP` module is not installed. In this case specify the `$mailProgram` in `twiki/bin/TWiki.cfg`. - -#### Setting the Automatic Email Schedule - -**For Unix platforms:** Edit the `cron` table so that `mailnotify` is called in an interval of your choice. Please consult `man crontab` of how to modify the table that schedules program execution at certain intervals. Example: - - % crontab -e - 15,45 * * * * (cd ~twiki/public_html/bin; ./mailnotify -q) - -The above line will call mailnotify at 15 minutes and 45 minutes past every hour. The `-q` switch suppresses all normal output. - -**For ISP installations:** Many ISPs don't allow hosted accounts direct cron access, as it's often used for things that can heavily load the server. Workaround scripts are available. - -**On Windows NT/2000:** You can use a scheduled task. **_Note:_** AT on an NT machine is pretty limited. Microsoft has a [replacement](http://www.microsoft.com/ntserver/partners/findoffering/serversolutions/Maintnce.asp#cron). - -## Site Usage Statistics - -### Configuring for Automatic Operation - -* You can automatically generate usage statistics for all webs. To enable this: - * Make sure variable `$doLogTopicView, $doLogTopicSave and $doLogTopicUpload` in `TWiki.cfg` are set. This will generate log entries in file `twiki/data/log.txt` . - * Topic [[TWiki/WebStatistics]] must be present in all webs where you want to have statistics. You can use the topic in the Main web as a template. - * Call the `twiki/bin/statistics` script from a cron job, once a day is recommended. This will update the [[TWiki/WebStatistics]] topics in all webs. - * **_Attention:_** The script must run as the same user as the CGI scripts are running, which is user `nobody` on most systems. Example crontab entry:
`0 0 * * * (cd /path/to/TWiki/bin; ./statistics >/dev/null 2>&1)` - * There is a workaround in case you can't run the script as user `nobody` : Run the utility `twiki/bin/geturl` in your cron job and specify the URL of the `twiki/bin/statistics` script as a parameter. Example:
`0 0 * * * (cd /path/to/TWiki/bin; ./geturl mydomain.com /urlpath/to/TWiki/bin/statistics >/dev/null 2>&1)` - -### Generating Statistics Manually by URL - -* The `twiki/bin/statistics` script can also be executed as a CGI script, just enter the URL in your browser. Examples: - * Update current month for all webs:
`http://mydomain.com/twiki/bin/statistics` - * Update current month for Main web only:
`http://mydomain.com/twiki/bin/statistics/Main` - * Update January 2000 for Main web:
`http://mydomain.com/twiki/bin/statistics/Main?logdate=200001` - --- [[TWiki/PeterThoeny]] - 16 Mar 2001
-- [[TWiki/MikeMannix]] - 01 Sep 2001 diff --git a/Trash/NewConsole.mdwn b/Trash/NewConsole.mdwn deleted file mode 100644 index 4dec9c1b..00000000 --- a/Trash/NewConsole.mdwn +++ /dev/null @@ -1,5 +0,0 @@ -Here's a June [status report](http://mail.gnu.org/pipermail/bug-hurd/2002-June/009437.html) - -In September there was a [request for testers](http://mail.gnu.org/pipermail/bug-hurd/2002-September/010459.html). There's been quite a bit of discussion on about updates, test results and changes. - --- [[Main/GrantBow]] - 22 Oct 2002 diff --git a/Trash/PortToL4.mdwn b/Trash/PortToL4.mdwn deleted file mode 100644 index de2102a7..00000000 --- a/Trash/PortToL4.mdwn +++ /dev/null @@ -1 +0,0 @@ -This page has moved to a [[Mach/PortToL4]]. diff --git a/Trash/RelatedDocuments.mdwn b/Trash/RelatedDocuments.mdwn deleted file mode 100644 index e2c7993f..00000000 --- a/Trash/RelatedDocuments.mdwn +++ /dev/null @@ -1,7 +0,0 @@ -This topic lists interesting documents for anyone interested in operating system design, performance and research. - -**_Micro kernels:_** - -* -- An article by Chris Maeda and Brian N. Bershad discussing optimizations of an UDP driver. - --- [[Main/JoachimNilsson]] - 20 Jul 2002 diff --git a/Trash/RelatedProjects.mdwn b/Trash/RelatedProjects.mdwn deleted file mode 100644 index 48368d95..00000000 --- a/Trash/RelatedProjects.mdwn +++ /dev/null @@ -1,7 +0,0 @@ -Projects not directly related to the Hurd effort, but non the less interesting: - -**_Micro kernels:_** - -* [rtmk.org](http://www.rtmk.org/) - This has nothing in particular to do with Mach and there are no shared developers that I am aware of, but one of the goals is to get the Hurd running on it. - --- [[Main/JoachimNilsson]] - 20 Jul 2002 diff --git a/Trash/TWikiTemplatingSystem.mdwn b/Trash/TWikiTemplatingSystem.mdwn deleted file mode 100644 index 7f15e56c..00000000 --- a/Trash/TWikiTemplatingSystem.mdwn +++ /dev/null @@ -1,407 +0,0 @@ -%TOC% %STARTINCLUDE% - -## TWiki Templating System - -We have a need for more advanced template handling. As [[Main/JohnTalintyre]] pointed out in [[CommonHeaderFooterTemplate]] it makes sense to separate the header and footer into one file so that it can be easily altered (or even overloaded by a skin). Also the oops dialog messages are all identical except for a few variables like heading, and so on. - -Using external modules like the [[TemplateToolkit]] would be one way to go, but this will add a lot of baggage to TWiki. - -### Needs of the TWiki templating system - -* Separate common parts into one (or more) base template file(s) and include that from other template files like `view.tmpl`. -* Define common variables like a "|" separator in the base template and use them in other template files -* Define variable text in templates (i.e. `view.tmpl`) and pass them to the base template - -### Functional Spec - -I tried to define a simple but powerful solution that can be extended over time. Here we go: - -* Special template directives (or preprocessor commands) are embedded in normal templates. -* Use of template directives is optional, templates work without them. -* All template preprocessing is done in `&TWiki::Store::readTemplate()` so that the caller simply gets an expanded template file (the same as before) -* Directives are of form %TMPL:<key>% and %TMPL:<key>\{"attr"\}%. -* Initial set of directives: - * %TMPL:INCLUDE\{"file"\}%: Includes a template file. The usual search path is applied. - * %TMPL:DEF\{"var"\}%: Define a variable. Text between this and the END directive is not returned, but put into a hash for later use. - * %TMPL:END%: Ends variable definition. - * %TMPL:P\{"var"\}%: Prints a previously defined variable. -* New directives can be added over time when needed, i.e. IF-THEN-ELSE. -* Variables live in a global name space, there is no parameter passing. -* Two pass processing, so that you can use a variable before declaring it or after. -* Templates and skins work transparently and interchangeably. You could for example define a new skin just for the header & footer and keep the other template files unchanged. -* **_Note:_** The template directive work only for templates, they do not get processed in topic text. - -### Examples - -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. This is not the version that will go into the release, it is just a quick hack. - -##### Base template oopsbase.tmpl - -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"\}% - -**_Note:_** Added a dot to escape rendering of variables, i.e. read **%.WEB%** as **%WEB%**. - - - -
- - %.TMPL:DEF{"sep"}% | %.TMPL:END% - - - %.WIKITOOLNAME% . %.WEB% . %.TOPIC% %.TMPL:P{"titleaction"}% - - - - - - - - - - - - -
- - - - %.WIKITOOLNAME% . %.WEB% . - %.TOPIC% %.TMPL:P{"titleaction"}% -
- %.TMPL:P{"webaction"}% -
- --- ++ %.TMPL:P{"heading"}% - %.TMPL:P{"message"}% - - - - -
- Topic %TOPIC% . { - %.TMPL:P{"topicaction"}% - } -
- -
-
- -##### Test template oopstest.tmpl - -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%
-%.TMPL:DEF{"webaction"}% test =webaction= %.TMPL:END%
-%.TMPL:DEF{"heading"}%
-Test heading %.TMPL:END%
-%.TMPL:DEF{"message"}%
-Test =message=. Blah blah blah blah blah blah blah blah blah blah blah...
-
-   * Some more blah blah blah blah blah blah blah blah blah blah...
-   * Param1: %PARAM1%
-   * Param2: %PARAM2%
-   * Param3: %PARAM3%
-   * Param4: %PARAM4%
-%.TMPL:END%
-%.TMPL:DEF{"topicaction"}%
-Test =topicaction=:
-[[%.WEB%.%TOPIC%][OK]] %.TMPL:P{"sep"}%
-[[%.TWIKIWEB%.TWikiRegistration][Register]] %.TMPL:END%
-%.TMPL:INCLUDE{"oopsbase"}%
-
- -##### Sample screen shot of oopstest.tmpl - -With URL: **.../bin/oops/Test/TestTopic2?template=oopstest&param1=WebHome&param2=WebNotify** - - - - - -
testscreen.gif
- -### Comments and feedback - -... is appreciated. - -* The itching factor to put this into the upcoming release is to easy the pending converstion of the templates into XHTML format and to have a more flexible solution for templates and skins. -* Is the terminology OK? -* Is the spec OK? -* Are there any other directives that are needed urgently? -* One drawback by using the directives is that you can only test a template from within TWiki. This is because you don't have a text that has a linear flow when you use TMPL:DEF, TMPL:P and TMPL:INCLUDE. - --- [[Main/PeterThoeny]] - 21 Jul 2001
- -Looks pretty good - we have a new intranet web designer who wants to put a standard look onto all our intranet sites, including TWiki, so the ability to define modular templates is of great interest! A few comments: - -* It's probably more readable to enforce variables being defined before use, which would avoid need for slower two-pass processing. - * [ [[Main/PeterThoeny]] ] You need two-pass processing because you need to define the "|" separator in the included template onone side, and on the other side define variables for the included template. The processing happens as regex in memory, so there is no mesurable speed penalty. -* It would be nice to simplify the syntax a bit, e.g. not using "" around variable names (they don't really need it, unlike filenames), and not using braces - however, this is not a big deal and there is some merit in keeping consistent with the current TWiki syntax. - * [ [[Main/PeterThoeny]] ] The templating system uses the standard internal TWiki function to parse variable attributes. The "" can be skipped (is possible but is not documented). -* Mixed-case keyword names would be nice, as it would be with the current TWiki variables - although upper case is probably more readable. - -Also, see [[VerbatimExpandsVariables]] for my views on making VERBATIM not expand %-variables! Fixing this would make discussions of templates easier. - --- [[Main/RichardDonkin]] - 22 Jul 2001
- -Looks good. Can do much more than the [[CommonHeaderFooterTemplate]] approach I proposed. TWiki has a fair bit of embedded HTML in it, it might be possible to replace some of this if the variables defined during template read are made available, possible in a name space that can be overridden by TWiki variables. - -If/Then/Else could help keep html in templates rather than in Perl. Is there are way of using Perl for the expression in If without compromising security? - --- [[Main/JohnTalintyre]] - 23 Jul 2001
- -This looks great. Just to prove it I coded up our drkw headerfooter [example](%ATTACHURLPATH%/twikitemphfexample) using these directives - it seems to be much more powerful. This exercise did bring a couple of questions/issues to mind: - -* TWiki currently has a set of templates that are structured something like... - * skin - * view - * preview - * attach - * rdiff - * search - * rename - * rename - * oops - * test - * attach - * ... -* ...so is it intended for the %INCLUDE directive to be recursive? The current template set would suggest that 2 deep recursion is some kind of minimum (do we need a max?). - * [ [[Main/PeterThoeny]] ] Recursion can be of any depth, however for perforance it is better to include just one. - -On a slightly less constructive note :), it strikes me that this kind of "template" programming style results in long lists of declarations in some parts of the source and then the occasional embedded "print" statement buried in the HTML. I was wondering whether we could come up with a more concise syntax that toggles between "code" and "data" - something like: - - - HTML - - %.{ - #a comment - use "filename"; - $name "value"; - $name qq( - valuelineone - valuelinetwo - ); - print $name; - }% - - HTML - - - and - - - HTML - %{print $name}% - HTML - - -This example maps fairly closely to the original suggestion: - - - - - - - - - - - - - - - - - - - - - - -
This... becomes...
%TMPL:DEF{"name"}%value%TMPL:END%%.{$name value}%
%TMPL:DEF{"name"}%%{$name qq(
%TMPL:END%)}%
%TMPL:INCLUDE{"filename"}%%.{use "filename"}%
- -This then lead me to think that doing some kind of pre-parsed `eval{}` of the code inside the toggles may be a very powerful way to quickly extend the reach of the TWiki template system to do things like if/then and regexps. For example, what if we allowed template code to (just) call the functions in Func.pm? [Of course, this would make TWiki templates more locked to perl compared to building a new (XHTML) set of intepreted template tags...] - --- [[Main/SteveRoe]] - 23 Jul 2001
- -It's worth noting that Peter's suggested syntax is %TMPL:foo%, i.e. no `'.'` after the `'%'` - the use of `'.'` is purely due to [[VerbatimExpandsVariables]] - please comment there, as I'd like to see this aspect of <VERBATIM> fixed. Hence, your attached example doesn't need to use `'%.'`. - -However, in your suggested new syntax, it might be useful to use `'%.'` as the intro sequence, as you have done. - --- [[Main/RichardDonkin]] - 23 Jul 2001
- -Thanks - fixed! - --- [[Main/SteveRoe]] - 23 Jul 2001
- -Please have a look at the latest templates in the [[TWikiAlphaRelease]]. There is now one master template called `twiki.tmpl` that all other templates include (well, will include when all done). The idea is to define all common parts of the templates in `twiki.tmpl` and simply use that from all other templates. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Template variable:Defines:
%TMPL:DEF{"sep"}% %TMPL:END% "|" separator
%TMPL:DEF{"htmldoctype"}% Start of all HTML pages
%TMPL:DEF{"standardheader"}% Standard header (for view, rdiff, ...
%TMPL:DEF{"simpleheader"}% Simple header with reduced links (for edit, attach, oops,...)
%TMPL:DEF{"standardfooter"}% Footer, excluding revision part and copyright part
%TMPL:DEF{"oops"}% Skeleton of oops dialog
- -I.e. the `preview.tmpl` template is now simply: - -
-%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"}%
-
- -With this it should be possible to create a skin that overloads just the `twiki.tmpl`, i.e. a `twiki.print.tmpl` that redefines the header and footer. - -In regards to Steve's idea of toggling between "code" and "data", this is certainly powerful. This is what ASP, JSP and [[TemplateToolkit]] is all about. I do not favor this approach for these reasons: - -* Mixing code and presentation is not so good because designers are not programmers and vice versa. I.e. a `$name qq( valuelineone valuelinetwo );` command is harder to grasp for a designer then some simple directives. Better let programmers write plugins and designers write templates. -* Security. It is challenging to ensure that no loop holes are in the system when you eval user specified Perl code. - --- [[Main/PeterThoeny]] - 23 Jul 2001
- -I suppose given the recent cvs posts on the mailing list, that this is a bit late, but isn't the whole template mechanism distinct from storing and managing revisions? I kind of see it as: - -* TWiki:Store gets the latest revision. (Current file store.pm.) -* TWiki:Tmpl does all variable substition. (New file Template.pm?) -* TWiki:Render converts structured text to (x)html. (Currently subs in TWiki.pm.) - -I don't know the TWiki code body well enough to know if this is feasible at this point. Sorry if this is noise at this point. - -Just my $.02 worth... - --- [[Main/DavidLeBlanc]] - 23 Jul 2001
- -Good feedback David. TWiki currently has a different internal structure for historical reasons, not as simple as you point out. We will change the internal structure of TWiki over time. - --- [[Main/PeterThoeny]] - 24 Jul 2001
- -Re Steve's suggested new syntax - I tend to agree with Peter for both usability (by designers, who may not know Perl) and security. I'd particularly like to avoid introducing new security issues - TWiki has some security problems already (see [[SecureSetup]] - it's quite hard to avoid open permissions on all files if you are not the webmaster and don't have root access, because it's hard to manipulate files owned by 'nobody'). - --- [[Main/RichardDonkin]] - 24 Jul 2001
- -I've been playing with this new templating system. Certainly powerful, but a bit confusing. A few thoughts: - -* Change the name of `webaction` - * [ [[Main/PeterThoeny]] - 24 Jul 2001 ] This might be a confusing term for the oops dialogs, but is the correct term for all other templates, e.g. the acions you can do on the current web. -* Move oops template definition from `twiki.tmpl` i.e. try and keep definition of snippets of html separate from whole pages - * [ [[Main/PeterThoeny]] ] I was considering this. Technically it is possible to have two level includes, the first one an %TMPL:INCLUDE\{"oops"\}%, and from `oops.tmpl` an %TMPL:INCLUDE\{"twiki"\}%. I decided to put all in one `twiki.tmpl` file for performance reasons. -* Consider an additional syntax for definition inline with print statement - see example below. - * [ [[Main/PeterThoeny]] ] Your proposed %TMPL:P\{"oops" titleaction="(oops)"\}% syntax is a shorter version of saying %TMPL:DEF\{"titleaction"\}% (oops) %TMPL:END% %TMPL:P\{"oops"\}%. This could be a useful addition. -* Slightly different form for DEF e.g. %TMPL:DEF:xxx\{% ... %\}TMPL:DEF%, as block nature of current form is somewhat hidden, some editors will even help point out missing braces. Could make it even shorted e.g. %xxx\{% ... %\}xxx% - * [ [[Main/PeterThoeny]] ] Questions if we should do it. With the current spec you can indent the text so that you can see the structure visually. Also, there is no nesting possible, so the braces are of questionable value. I opt for the current spec. -* Move copyright information into a footer (might be alternative footers without it) - * [ [[Main/PeterThoeny]] ] This is not so simple with the current layout because there are many differences. View and diff have rev info + copyright info; preview has a colored bar + check boxes + copyright info; edit and other scripts have copyright info only. - -`ooptauth.tmpl` currently: - -
-%TMPL:INCLUDE{"twiki"}%
-%TMPL:DEF{"titleaction"}% (oops) %TMPL:END%
-%TMPL:DEF{"webaction"}% *Attention* %TMPL:END%
-%TMPL:DEF{"heading"}% Either you need to register or the authentication failed %TMPL:END%
-%TMPL:DEF{"message"}%
-
-To edit topics on this %WIKITOOLNAME% collaborative web, you must be registered as a user.
-
----+++++ If you expected to be logged in at this point:
-
-   * Did you type in your login name and password correctly? Remeber, both are case sensitive.
-   * If you want to try again, back arrow and hit edit again.
-   * If you have forgotton your password, please contact %WIKIWEBMASTER% who will reset it for you.
-   * __Note:__ You can also login anonymously as user *TWikiGuest* with password *guest*.
-
----+++++ To register as a new user:
-
-   * Simply fill out the *[[%TWIKIWEB%.TWikiRegistration][TWikiRegistration]]* form.
-     It only takes a minute.%TMPL:END%
-%TMPL:DEF{"topicaction"}%
-[[%WEB%.%TOPIC%][OK]] %TMPL:P{"sep"}%
-[[%TWIKIWEB%.TWikiRegistration][Register]] %TMPL:END%
-%TMPL:P{"oops"}%
-
- -Suggest changing to: - -
-%TMPL:INCLUDE{"oopsbase"}%
-
-%TMPL:DEF{"message"}%
-
-To edit topics on this %WIKITOOLNAME% collaborative web, you must be registered as a user.
-
----+++++ If you expected to be logged in at this point:
-
-   * Did you type in your login name and password correctly? Remeber, both are case sensitive.
-   * If you want to try again, back arrow and hit edit again.
-   * If you have forgotton your password, please contact %WIKIWEBMASTER% who will reset it for you.
-   * __Note:__ You can also login anonymously as user *TWikiGuest* with password *guest*.
-
----+++++ To register as a new user:
-
-   * Simply fill out the *[[%TWIKIWEB%.TWikiRegistration][TWikiRegistration]]* form.
-     It only takes a minute.%TMPL:END%
-%TMPL:DEF{"topicaction"}%
-[[%WEB%.%TOPIC%][OK]] %TMPL:P{"sep"}%
-[[%TWIKIWEB%.TWikiRegistration][Register]] %TMPL:END%
-%TMPL:P{"oops" titleaction="(oops)" action="*Attention*"
-heading="Either you need to register or the authentication failed"}%
-
- --- [[Main/JohnTalintyre]] - 24 Jul 2001
- -I guess that the concerns about security and complexity in the templates are valid etc. And I have a lot of respect for the caution not to overengineer this kind of thing. Certainly the controls seem to be very powerful as they are... - -...I have now modified all of the templates on Codev to use the new TMPL facility. Hopefully this will save someone else the pain. This uses the standardheader, standardfooter and oops declarations as per the first rev of twiki.tmpl - the results are zipped and [attached](%ATTACHURLPATH%/tmpltemplates.zip) and hopefully can be put into CVS (?) to get everyone jump started on this. - -* [ [[Main/PeterThoeny]] - 03 Aug 2001 ] Thanks Steve for the modified template files, saved time! All template files are now updated and in [[TWikiAlphaRelease]]. - --- [[Main/SteveRoe]] - 25 Jul 2001
- -I'd like to suggest a new template print to be used within the header section of pages e.g. "INHEAD". `twiki.skin.tmpl` could define this to include scripts and style that should not be rendered, and in any case head is the standard place, not body (although this usually seems to work). - --- [[Main/JohnTalintyre]] - 31 Jul 2001
- -If I understand you correctly, you would like to have this change (in red) in `twiki.tmpl`: - -
-%TMPL:DEF{"htmldoctype"}%
-&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
-&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
-%TMPL:P{"inhead"}% %TMPL:END%
-
- -Is that correct? Where would you define "inhead"? - --- [[Main/PeterThoeny]] - 03 Aug 2001
- -Every template that was printing out an html heading would use this. Alternatively, being able to fully escape twiki processing (outside of the <head> section could have a similar effect). - --- [[Main/JohnTalintyre]] - 07 Aug 2001
-- [[TWiki/MikeMannix]] - 30 Aug 2001 diff --git a/Trash/TestWebMenu.mdwn b/Trash/TestWebMenu.mdwn deleted file mode 100644 index 04488f63..00000000 --- a/Trash/TestWebMenu.mdwn +++ /dev/null @@ -1,25 +0,0 @@ -# %WEB\{name="..." home="|." [expand="always|never"]\}% - entry for Web # %ITEM\{name="..." [topic="..."]\}% - topic in Web # Set DEFAULTITEMS - default topics # %DEFAULTITEMS% replaced by this - -* SET DEFAULTITEMS = %ITEM\{name="WebChanges" topic="WebChanges"\}%, %ITEM\{name="WebIndex" topic="WebIndex"\}%, %ITEM\{name="WebNotify" topic="WebNotify"\}%, %ITEM\{name="WebStatistics" topic="WebStatistics"\}% - -%WEB\{name="TWiki System" home="TWiki"\}% - -%ITEM\{name="Welcome" topic="WelcomeGuest"\}% - -%DEFAULTITEMS% - -%WEB\{name="People" home="Main"\}% - -%ITEM\{name="Everyone" topic="TWikiUsers"\}% - -%DEFAULTITEMS% - -%WEB\{name="Knowledge base" home="Know"\}% - -%DEFAULTITEMS% - -%WEB\{name="Test (sandbox)" home="Test"\}% - -%DEFAULTITEMS% - --- [[Main/JoachimNilsson]] - 23 May 2002 -- cgit v1.2.3