-
Recent Posts
Archives
- April 2023
- February 2023
- June 2021
- April 2019
- October 2017
- March 2017
- November 2016
- July 2016
- December 2015
- September 2015
- June 2015
- October 2014
- September 2014
- June 2014
- March 2014
- January 2014
- December 2013
- November 2013
- July 2013
- March 2013
- February 2013
- January 2013
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
Tag Archives: code
Text me bacon
I’m currently attending php[world] 2016 and went to a great talk by David Stockton on integrating SMS and voice calls with PHP. After discovering how easy it is to set up, I added text message support to Bacon Ipsum.
Give it a try! Text ‘bacon ipsum’ to 512-233-6634.
Now powered by Any Ipsum
Last month, we released the Any Ipsum WordPress plugin for people that were interested in creating their own custom ipsum generator.
Since I firmly believe in dogfooding, the Bacon Ipsum generator is now completely powered by this plugin as of today!
Any Ipsum
Ever since Bacon Ipsum launched back in June 2011, a huge number of alternative ipsum generators have popped up on the net. I’m not sure if this site was the catalyst for this or not, but I like to think so. 🙂
I often see “Someone should make an X ipsum…” with X being something that doesn’t exist yet. If you weren’t a developer, making your own ipsum generator could be difficult, but no more.
Today we released Any Ipsum, a WordPress plugin that will let you create your own alternative custom ipsum generator. As an example, I created a Meme Ipsum generator in just a few minutes, and eventually we’ll be converting Bacon Ipsum over to use this new plugin. It has all the features our site does: front-end HTML form, JSON API, oEmbed, etc.
So if you have an idea for the next big ipsum, give it a try! By default, it installs bacon ipsum (hey, I’m rather fond of it), but it’s very easy to customize it to your liking.
Big thanks to Sarah Martin for the new logo:
Bacon Reader
Google is using some Bacon Ipsum for their design guidelines, down in the Feed Reader sample.
Alfred
If you use Alfred, now there is a Bacon Ipsum workflow.
Workflow to generate @BaconIpsum with @alfredapp http://t.co/zuM9VFIvo2
— Sid ™️ (@koomai) July 26, 2013
jQuery Plugin Update
We’ve added a ‘no_tags’ option to the jQuery Plugin to keep the code from wrapping the output in <p> tags. Thanks to Joel Lord for the suggestion.
Odd behavior with Firefox
I saw a Tweet come across the wire last night and have been digging into the issue:
Interesting, Bacon Ipsum seems to cause problems for dabbler.
— Walter Rumsby (@wrumsby) September 6, 2012
After digging into it a bit more, it seems to be an issue only with Firefox and where you start copying text. If we use the mouse and start selecting text right at the first letter (where the red dot is), it works fine. You’ll see in View Selection Source that only the bacon ipsum content is selected and it can be pasted into dabblet without any issues.
If we put the mouse a little bit above the first bacon ipsum text and start selecting, some of the HTML is getting selected as well.
You can replicate the results in this dabblet and here’s more info via @wrumsby. Going to put this out on Twitter, hopefully the Mozilla team will see it and weigh in.
API and jQuery Plugin updates
I’ve added support to the JSON API so you can generate one or more sentences of bacon ipsum rather than always generating paragraphs of text. Just pass ‘sentences=x’ as a parameter.
For example: http://baconipsum.com/api/?type=meat-and-filler&sentences=1
The jQuery plugin has also been updated to support sentences.
All the source code goodness has also been posted to GitHub if you want to dig into it a little more. Enjoy!
Git some bacon
Want to implement your own ‘insert-something-witty-here’ ipsum generator? Then head on over to our GitHub repository and take a look at the code that runs baconipsum.com. The BaconIpsumGenerator class is straight PHP code that can easily be modified to work as you see fit. I’ll be refactoring this code a bit since the Make_Some_Meaty_Filler method is wrapping stuff in HTML and it really should return an array of paragraphs and sentences so the API code can handle it better. It’s on my to-do list.
I also spent some time this weekend writing proper WordPress plugins for the site. Previously, the home page’s form was hacked into the WP theme, and the API was just a standalone directory with a PHP page. Now they’re both plugins and run based on WP actions & shortcodes. It really shouldn’t affect what you see on the site at all, but it makes me feel warm & fuzzy to have it coded properly now.
Enjoy!