We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

First Plugin: Lorem Ipsum Generator for Words, Sentences and Paragraphs

Development and Programming

Super McFly's avatar
Super McFly
90 posts
15 years ago
Super McFly's avatar Super McFly

This for ExpressionEngine 2 only

Here’s my second extension in two days, a lorem ipsum (standard dummy text) generator for words, sentences and paragraphs.

It would have been up earlier but figuring out git was a little painful.

Examples

{exp:sm_lorem_ipsum}
{exp:sm_lorem_ipsum type="w" count="10"}
{exp:sm_lorem_ipsum type="s" count="5"}
{exp:sm_lorem_ipsum type="p" count="3"}
{exp:sm_lorem_ipsum type="p" count="3" opening="<div>" closing="</div>"}

Parameters:

type=”” Defaults to “w”. The type of text to return: (w) words, (s) sentences or (p) paragraphs.

count=”” Defaults to 10. Number of words, sentences or paragraphs to return.

opening=”<div>” Defaults to “”. The tag to open a paragraph.

closing=”</div>” Defaults to “”. The tag to close a paragraph.

Download:

You can get the code from my GitHub page or you can download the attachment.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
15 years ago
Mark Bowen's avatar Mark Bowen

Might want to mention that the plugin is for 2.0 and not 1.6.x

I just tried getting it to work in 1.6.x and was wondering why I was getting a “No direct script access” warning coming up every time I tried to use it in a template. No biggie but I was thinking perhaps I’d done something stupid somewhere 😉

Thanks for sharing though, looks like it will be a handy little plugin this one.

Best wishes,

Mark

       
Super McFly's avatar
Super McFly
90 posts
15 years ago
Super McFly's avatar Super McFly

Thanks for reminding me, Mark. I feel a bit stupid for forgetting that but I’ve updated the post now.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
15 years ago
Mark Bowen's avatar Mark Bowen

No problem at all. No need to feel stupid at all. It’s very kind of you for releasing this for free as I’m sure it will help out a lot of people.

Hope you have a great weekend.

Best wishes,

Mark

       
Ryan M.'s avatar
Ryan M.
1,511 posts
15 years ago
Ryan M.'s avatar Ryan M.

Like many other EE add-ons living on GitHub, you might consider renaming your repo to “sm_lorem_ipsum.ee_addon” which can make it easier to find in a search there.

       
Super McFly's avatar
Super McFly
90 posts
15 years ago
Super McFly's avatar Super McFly

Thanks for the tip. I’ve looked through so many add-ons but never even noticed the naming pattern of them. I’ll have to sort that out.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
15 years ago
Ryan M.'s avatar Ryan M.

We just changed a small thing at devot:ee that should help people know when an add-on is EE1 only, EE2 only, or will work for both. I attached a small pic from the Lorem Ipsum Generator page here so you can see what I’m talking about. Hope that helps.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.