See also: HelpMiscellaneous, which contains some popular FAQs including apache tricks for...

Good looking tables, theme independent

For rows you want to look snazzy, give them a rowclass like the RecentChanges day indicator.

For cells you want to feel like a header cell, make them look like the helpful messages (which have a colored background and a slight bit of padding).

 ||<tablewidth="92%" -2 rowclass="rcdaybreak">Year of the Rabbit||
 ||<id="message">January||nothing happened||

Year of the Rabbit

January

nothing happened

Note:

The id="message" makes MoinMoin render invalid HTML (duplicated ID) and may lead to tragedy in themes that move the message window somewhere. Generally, I'd advise to never use the ID attribute outside of themes.

Limiting server load caused by stats pages

Add this to httpd.conf (Apache 1.3):

<Location ~ /EventStats_2f.*>
  ThrottlePolicy Request 1 60s
</Location>
<Location ~ /(RecentChanges|Aktuelle_c4nderungen)>
  ThrottlePolicy Concurrent 5 30s
</Location>
<Location ~ /.*action=info.*>
  ThrottlePolicy Concurrent 5 30s
</Location>

(you have to activate mod_throttle for this)

MailTo macro

Protect your and your users emails: use HelpOnMacros/MailTo macro; very easy!

Alter the look of preformatted blocks

If you want to make a particular '{{{' ... '}}}' block to have smaller font, you can

Use SectionParser:

#format python
#class tiny-code
code...

Or use include inside a table:

  1. move code out to a separate page e.g. CodeExample

  2. Include your code inside a table with smaller font size:
    • ||<tablestyle="font-size: 0.8em;"> <<Include(CodeExample)>> ||

      (!) or use tableclass and add a class to your css. (!)

If you want a global change, change the font-size for pre in your common.css.

 font-size: 0.8em; /* or whatever size you like, in pt, em, etc. */

Drastically altered front page for spiffy look

See also the ThemeMarket - sometimes just color is enough, sometimes you want to move things around on screen, and the python code of the themes lets you do that to some degree.

Reduce font size in preformatted block

For a small reduction in font size, in a preformatted block enclose the tripple braces in ~- followed by -~ like this:

~-{{{

text displayed smaller in preformatted block

}}}-~

View this page source (More actions | Raw text) to see the actual code for the following:

Normal size font:

Test string testing one, two, three four, five, six, seven eight, none, ten, eleven

Smaller font:

Test string testing one, two, three four, five, six, seven eight, none, ten, eleven

Including entirely external HTML

copied over from MoinMoinSuccessStories

Also in pages linking with external web sites I used the MacroMarket/HTML macro with an iframe. Text of Inscrits page is:

[[HTML(<iframe src="http://petrolera.xarxa.net/inscrits.php?classe=N" _fcksavedurl=""http://petrolera.xarxa.net/inscrits.php?classe=N"" width="100%" height="600"></iframe>)]]

Moin es great! -- Pere Martinez

If you just want to add a link quickly do it in the text editor with a WikiName. If you then later want to make a "pretty link" you can do this in the FCKEditor (just make spaces between words and change cases of characters).

Read protect parts of a page

If you want to display only parts of a page to a visitor the way to go is to include parts with the built in Include macro. So you can put this on a page YourName:

<<Include(YourName/ProtectedContent, , editlink)>>

and on the include page you can put something like this:

#acl YourName:read,write,admin,revert -All:read
 * list entry only visible to you.

So visitors see nothing but you see the content and also the edit button for the content.

MoinMoin: MoinMoinTips (last edited 2015-12-15 12:52:08 by hss-ppls-0248)