A way to add frames to get rich layout of wiki pages, in a simple and maintainable way
See also MultiColumns, DruidWikiTestCase, MetaDataInMoin, SectionParser.
The frame parser is "deprecated" and not needed anymore since 1.6. See below.
or just use the wiki parser
{{{#!wiki dotted/red This is a section }}}
This is a section
Contents
Frame Parser
Description
The Frame parser is used to align enclosed wiki markup or split wiki markup in boxes or just to draw a box around some wiki markup.
Download & Release Notes
Download |
Release Version |
Moin Version |
Release Notes |
1.0 |
1.6 |
Installation
For general installation instructions, see ParserMarket/InstallingParsers. This parser requires no special dependencies, such as outside Python libraries.
Usage
To use this parser, simply put #!Frame after the beginning of the code block.
Example
{{{ #!Frame align=float:right,background=gray,width=20% #!Gallery2 album=1,front_image=100_1194.JPG,album_name=Bremen,show_tools=0,show_text=0,show_date=0 }}} Some images from the trip to Bremen in 2004 * SpaceCenter * ScienceCenter {{{ #!Frame align=clear }}}
For more detailed examples, see /Examples and for an FAQ, see /FAQ
Copyright
Copyright: 2006 by Reimar Bauer
License
This parser is released under the terms of the GNU GPL.
Bugs
it does not solve Dependencies of an macro call e.g. time for Hits -- Could someone give an example of this? -- SteveDavison 2007-01-23 00:05:07 For Hits or dependencies not solved if cache is enabeld? -- ReimarBauer 2007-01-23 08:38:00
- currently only the wiki parser is used
- parser calls are case insensitive with 1.6 release
The Frame parser seems to break caching of Include calls within the parser. The behavior was very weird. Using the DeleteCacheAction would completely garble the included text. So I settled for the SectionParser instead. -- ChristophKoenig 2007-07-05 19:33:00
Discussion
Please add wishes here. -- ReimarBauer 2006-08-13 21:36:47
How about moving the render work to css file, see ZhangYunfeng/DivParser -- ZhangYunfeng 2006-08-25 04:21:37
Nice addition. I know the power of css, but that has to be defined beforehand in the theme and than it is static. I showed a way on ParserMarket/BarChart to enter new css to a given page too. So it could be added dynamically. But there will be less user to be able to do this. MacroMarket/Columns shows a multi columns layout with a lot of css added to the theme where you want to use it. This method shown here does not need any additions to the css header so may be a wiki user could use it easier. I do often use it as highlighter with different colors. Compared to css this would mean each has to get a css entry about same styles with a different color. And if it should be floated it needs some more versions and so on.
As you see from the coding here I've prevented someone from entering values or code which is not wanted. I have no idea how to get known css classes or ids which could be used dynamically from the code of a page into a list. So someone could only use these and to have the same protection. It would be worse if the solution is to code that in the parser. -- ReimarBauer 2006-08-25 07:24:04
I have added div tags to the parsers call too. May be you have to extend the class and id names at yourselfs theme css code -- ReimarBauer 2006-09-03 14:00:37
I see that the image tag ends with /> (line 298). This would be XHTML, not HTML 4.01. Is this from your plugin?
I grepped the parser that isn't defined there, that parser isn't active here so what it is your testcase? I come from MoinMoinBugs/Invalid HTML 4.01. So maybe this is a general MoinMoinBug?
Looks like attachment: does make this trouble -- ReimarBauer 2006-12-08 12:05:26
Is this installed on the MoinMoin wiki? I'm not able to get an example to work. -- SteveDavison 2007-01-23 00:05:07
No because it is on ParserMarket which is for 3rd party plugins. It is not finished yet. I will work on this after release of 1.6 or if I got some more spare time. -- ReimarBauer 2007-01-23 08:38:00
Is this parser compatible with 1.5.6? Thanks. -- SteveDavison 2007-01-24 20:47:11
It is -- ReimarBauer 2007-01-24 20:58:29
Here's an improvement that would be very helpful... The ability to change the link and non-existent link colors (and followed color too, I guess, even though it's BAD). Problem is that if you choose a background color that goes well with your text color, any links in the markup may be unreadable because they don't change color. -- SteveDavison 2007-01-26 08:29:11
Hi Reimar, I installed your parser and have been playing with it. Thanks for your efforts, it's a much needed feature. I've noticed a few problems though, and put together a test case. I'm posting it on a subpage, /TestCaseA. Even though it won't work on this wiki at the moment, you can copy the raw text. If you want screen dumps, I can provide. Not sure if there are known issues with running it on 1.5.2, which is my version... I'll be updating to 1.5.6 soon, and then I'll see if that changes anything. -- SteveDavison 2007-01-26 11:52:23
Hi! I'm trying to get Frame to work, but I don't seem to be able to. Is it because I have 1.5.3 that it down't work? Got it to work now!
Hi, I am trying to get this parser to work with MoinMoin 1.5.7 but to no avail. I only see the text I have entered e.g. #!Frame align=right some text on the next line but the text, or image, does not align. Any idea what I am missing or doing wrong ? -- AvanderBoom
Well, it seems I spoke to soon and got it working. It turned out I had to remove the space between the { { { and } } } which was not clear to me while reading the syntax part. I've put an attention text just below the syntax. -- AvanderBoom
Hi, I'm trying to use Frame with MoinMoin 1.5.8 but got an
cannot import name text_moin_wiki
error. I have installed the Frame.py file on data/plugin/parser and it's listed in my SystemPages. Here is more debugging information :
# /var/www/wikisar/data/plugin/parser/Frame.py in ? 1. 135 import StringIO, os, mimetypes 2. 136 from random import randint 3. 137 from MoinMoin.parser import text_moin_wiki 4. 138 from MoinMoin import wikiutil 5. 139 from MoinMoin.action import AttachFile * MoinMoin undefined * text_moin_wiki undefined
Any idea? -- EricVeirasGalisson 2007-07-05 15:00:24
Please use Frame-1.5.4-5.py the version you tried is for the upcoming 1.6.x release. -- ReimarBauer 2007-07-05 15:37:40
- Ok, in fact, I used the bad version, thanks.
Hello, I just want to know if it is normal that I can't embed the macro [[TableOfContents()]] (it only insert the 'title') but I can embed the macro [[FullSearch(regex:....)]] ? -- EricVeirasGalisson 2007-07-27 07:31:22
Its normal behaviour. From the description of TableOfContents
The macro works as follows: First, it renders the page using the TOCFormatter (below) to get access to the outline of the page. During the page rendering, only macros whose 'generates_headings' property is set and True are rendered, most macros don't generate any headings and thus need not be executed speeding up the process considerably. The generated outline is then written to the output.
- This can't be done that way in Frame.
Another question: how do I put a Frame below another one, aligned to the right for example? -- EricVeirasGalisson 2007-07-30 08:55:46
Frame doesn't work with MacroMarket/EventCalendar. If I put an MacroMarket/EventCalendar inside a Frame the calendar freezes to the day I edited the page. And if I try to go to the next month the page reloads and I see the same month again.
Deprecated
Because of adding an html parser to 1.6 which can do everything the frame parser does and the posibility to use styles for the wiki parser I do think this parser becomes obsolete. -- ReimarBauer 2008-02-16 09:19:00
{{{#!html <div style="float: right;"> }}} {{http://code.google.com/opensource/ghop/2007-8/images/ghoplogo.jpg}} {{{#!html </div> }}}
{{{#!wiki blue/dotted Example text }}}