Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Help for Display Settings

by SiteDocClan
on Aug 07, 2009 at 20:47 UTC ( #786921=sitefaqlet: print w/ replies, xml ) Need Help??

Display Settings

Use Display Settings to control how pages appear generally. This covers not only HTML styling (CSS), but also various PerlMonks-specific options, such as how <code>, <readmore>, and <spoiler> tags are handled.

Special Tag Options

Override <readmore> tags: users are requested to insert a <readmore> tag in a post that contains a long code section. In order to keep page lengths short in certain areas of the site, the remainder of the post will be replaced by a link to the full content of the post. Check this box if you would rather ignore the <readmore> tags and see the full text everywhere.

render spoiler tags as

Customize CPAN link options: This modifies the effect of the [cpan://...] shortcut style. If this variable is unset (empty), [cpan://Foo] will render as the link http://search.cpan.org/search?query=Foo&mode=module
If this variable is set, mode=module will be replaced with the contents of this variable. Possibilities for mode are: qw( all module dist author ). Additionally, you can ask to get CPAN search results in XML form by including format=xml in this setting. (Note, however, that this feature is not supported.)
Remember, this setting affects how cpan:// links work for you.

HTML Related Options

As you know, PerlMonks allows only a restricted subset of HTML to be used in posts. (See Perl Monks Approved HTML tags for the list or Markup in the Monastery for illustrations of usage and rendering.) This is enforced each time a node is rendered, not when the content is submitted by the poster. When a node is rendered, it is filtered through a process which escapes all the invalid markup — whether invalid tags, or invalid attributes on valid tags — thus rendering the markup visible as plain text. As an additional nicety, the same filter can — if you ask it to — close unclosed tags as necessary to ensure balanced tags.

If you're curious about the operation of this filter on the nodes you view, you can enable "reporting" to various degrees of verbosity. That's what the following settings do.

  • Enforce proper nesting of HTML - If set, PerlMonks adds explicit closing tags in cases where an element was implicitly closed due to the ending of an outer element.

  • HTML error reporting level - This controls how much you are told about what PerlMonks had to do to a node's content to make it compliant with Perl Monks Approved HTML tags. By default, these little notes will be shown in a medium gray font. This can be customized with CSS:
    • Markup which has been added will be in <font class="htmlinserted">
    • Tags which have been escaped will be in <font class="htmlignored">
    • Attributes which have been escaped will be in <font class="htmlattrib">
    Here's what the different levels mean:
    1. No reporting. All HTML filtering is completely "silent".
    2. Show when markup had to be added.
    3. Show when attributes had to be escaped.
    4. Show when tags had to be escaped.
    5. Show when tags had to be escaped, and also when there are unclosed <p> tags.
    The levels are cumulative: level 3 implies level 2, etc.
    Note that level 4 is not an option for viewing nodes in general, since unclosed <p> tags is an extremely minor sin which pretty much always be overlooked.

    A word from your sysadmins: Harrassing other users for the perceived low quality of their postings markup will not be tolerated.

  • HTML error reporting during Preview - This setting is the same as above, but only pertains to the Preview stage of the node posting process. Note that you can't select any level lower than 3. This is because we want you to post good, clean nodes!

Custom Node Title Definition

You may customize the text that appears in your browser's title bar here. Use the tokens %T, %N, %D and %S to insert the current node's title, node id, date, or section name. The section name will only actually appear for base nodes.

Code Listing Settings

  • Code Wrapping Off: by default, the site will wrap all content that appears between <code> tags at 70 columns. you can turn that off if you wish, but it can be difficult to read the site as unwrapped code will be rendered at the full width. This can mean a lot of horizontal scrolling to see the right hand side of the page.

  • Code Wrap Length: you may set the column at which code will be wrapped.

  • Auto Code Wrapping: allows your browser to perform code wrapping. If this is set, the value in Code Wrap Length can be used to insert soft hyphens in long runs of non-space characters.

  • Code Prefix: whatever you enter here will be used as a prefix for lines inside <code> blocks. If you specify something that matches /&\d+;/, then those digits will be incremented for each line of code. Typically you would specify &001;: to have all code lines numbered starting from 001. Note - This is not an HTML entity, although it was meant to look like one. It is specially interpreted by the perlmonks engine.

  • Large Code Font: This setting increases the font size of everything posted within <code></code> tags (or <c></c> tags).

    Normally, when text in a fixed-pitch font (such as Courier) is shown next to text in a variable-pitch font (such as Times) in the same size, (e.g. 12 point), the fixed-width text appears noticeably larger. To compensate for this and achieve a more equal-looking text size, PerlMonks normally decreases the size of code text by one point, by enclosing it in <font size="-1"> tags. If you wish to disable this feature, you should check this setting checkbox. You would do this, for example, if you are handling your own font sizing in CSS. Block-level code blocks are wrapped in <tt class="codetext"> and in-line code blocks are wrapped in <tt class="inlinecode">. In CSS, you'd define styles using tt.codetext and tt.inlinecode respectively. However, you may simply wish to set all <tt> segments to one point size smaller, via

    tt { font-size: smaller; }
    in your custom CSS.

Theme Configuration

The appearance of the PerlMonks site can be changed by choosing from one of several themes. You can stay with the default or pick a specialized theme. The dark theme exists for the people who prefer light text on dark backgrounds. Choosing a theme other than the default makes it easy to remember if you are logged in or not. "Monk pictures off" turns off the random monk picture in the top right corner of every page, while "Monk quips off" turns off the pithy quotes on the top left.

Stylesheet Settings

In addition to the themes above, you can alter the appearance of the PerlMonks site with your own custom CSS stylesheets.

  • Link to external CSS stylesheet: You can link to a stylesheet you maintain on another webserver by entering the stylesheet's URL here. This stylesheet will be loaded after any stylesheets specified for your selected theme.
  • On-Site CSS Markup: Any CSS code you enter here will be inserted into all pages you view.
  • Link to CSS stylesheet for print display type: At the top of each page just under the title are two links labeled "print" and "xml". The print link causes the current page to be redisplayed in a format suitable for printing. You can alter this format by specifying a stylesheet to use for print display type.

Back to the PerlMonks FAQ.

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-09-01 22:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (17 votes), past polls