Jump to content

Hairygit

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling
  • Location
    Birmingham

Recent Profile Visitors

999 profile views

Hairygit's Achievements

Newbie

Newbie (2/6)

9

Reputation

  1. Good call - I have corrected the typo.
  2. errr.. no. I've added a profile picture.
  3. Glad you like it! I've linked to the forum download, I don't use Git - I'm strictly an amateur at this, it's not my day job. I must admit I was surprised how simple it was to achieve, once I'd realised what that hook was doing. A bit slow on the uptake here
  4. Hi folks. I've been lurking here for a while, trying to figure how things work before I overhaul my site. Anyway, I've no doubt I'll be asking for help at some point(s), so I didn't want to arrive empty handed. MarkupLorenIpsum Module for Processwire This module hooks after Page Render, and replaces any [lorem] tags found with random lorem ipsum text. How to use [lorem<length><format>] <length> (optional) number - sets the length of the output. Default is 5. <format> (optional) char - sets the format of the output, as follows: - 't' - formatted text. Each paragraph begins with a tab char. 'p' - plain text. No tabs or line feeds. 'h' - html. Each paragraph is formatted with <p>...</p>, except the first and last (see below). 'H' - html. Each paragraph is formatted with <p>...</p>. The default format is 'h' unless the length is <= the default, in which case the format is 'p' - useful for headings etc. The [lorem] tag is replaced with the generated text. Note that paragraph length is 100 (this is set in the construtor). Samples: - 'h': lorem ipsum lectus dapibus ... sapien malesuada.</p><p> auctor sapien, arcu inceptos ... consequat metus litora. 'H': <p>lorem ipsum lectus dapibus ... sapien malesuada.</p><p> auctor sapien, arcu inceptos ... consequat metus litora.</p> 't': \tlorem ipsum lectus dapibus ... sapien malesuada.\n\n\t auctor sapien, arcu inceptos ... consequat metus litora. 'p': lorem ipsum lectus dapibus donec sapien malesuada auctor sapien, arcu inceptos aenean consequat metus litora. Examples :- [lorem] - renders 5 words, plain format [loremh] - renders 5 words, html format [lorem20] - renders 20 words, html format [lorem20H] - renders 20 words, html format, wrapped in <p>...</p> [loren20p] - renders 20 words, plain format [loren20t] - renders 20 words, text format The reason for the two html options is that the textarea editor inserts <p> tags itself, so you would get <p><p>lorem...dapibus</p></p>. By default the extra tags are stripped, but this can be overidden if desired. It's built using example2 from the HelloWorld module as a wrapper for Mathew Tinsley's LoremIpsumGenerator class. markuploremipsum.zip
×
×
  • Create New...