After discussing the issue that I mentioned the other day regarding some modification that I did to an existing WordPress plugin with it’s author, I have decided to release my changes as a new plugin.
Live Post Preview is a WP plugin that alows you to preview your post in real time as you type it. It’s based on Live Comment Preiview which allows you to view your comment in real time as you type it. It was a pretty easy conversion from one to the other, I must admit.
It’s Thursday now (by the clock, anyways) and I started playing with this on like Sunday. I’ve just now finished. My changes may have been minor, but my efforts weren’t for sure….
First of all, I had to learn about plugins and how things worked and stuff in order to understand enough about what was going on to make the new plugin work. Then, I changed the names of variables and functions so that the naming would make sense in the new context (and to avoid naming conflicts within PHP). Then…..well, then nothing. Then it wouldn’t work. Technically, then I spent hours looking over the code, learning more about how it worked and event handling and crap and it still didn’t work. Then I started over from scratch, modifying the original plugin again. This time it worked just great and in a quarter of the time I’d spent attempting to debug my last screwup…. I’m still not sure what I did wrong (some minor syntax error could fail to create an error and just cause the whole thing to not work though…sucks). I should really diff the screwed up copy and the good copy and see what I get..
Then I setup hosting on dev.wp-plugins.org and then I had to learn about wiki formating and version control in order to get everything setup right. Then I had to write a post about it and then I had to have bad grammar and start every sentance with then just for fun…
Then So that took some time. It’s safe to say that I learned a lot. I still have a lot of stuff I want to look over about versioning. I’m not completely sure what I’m doing just yet, but it seems like cool stuff really.
The nicely ironic part about the whole thing is that in the process of doing this, I discovered two built-in ways of previewing a post without having to publish it first. First of all, Jeff, author of Live Comment Preview, recommended just saving the post as “private” and then viewing it. It will show up on your site only to you as that way (and WP knows that you’re you via cookies so there’s no messing around with authentication at all). This is probably the 100% best way to preview a post because you’ll see it exactly as it would look to anyone else. That is, using the correct stylsheet and surroundings (theme).
The second way that I found is that if you click on the “save and continue editing” button, WP will generate a preview at the bottom of the screen. (it does this for all posts that have been saved) Of course, you don’t get to see it in the correct context, but it’s a preview none-the-less.
To me, the preview is just important so I can confirm that I haven’t made any errors that do something silly like, make half the post into a link or bold or something. I also like to verify that my links work. Most of my posts don’t have pictures, but of course it’s useful to see how the layout will look when I do. I’ll just stick with the live preview for now…
Another interesting tidbit that I picked up on is that virtually any plugin made for WP has to be GPL’d since WP is. Makes sense, I just never thought about it before. How handy.
Comment by Aaron Brazell — June 2, 2005 @ 11:37 am
Nicely done. Now you can use all that learned WP knowledge and apply it to many more plugins!
:cheers:
Comment by SapiensBryan — June 2, 2005 @ 12:26 pm
Hi,
I think there is a minor mistake at the Live Post Preview link.
I think it should be :
live_post_preview();
instead of :
live-post-preview();
Because it didn’t work for me when I put “-” instead of “_”.
By the way, thanks for your plugin.
Comment by Mathias Bynens — June 2, 2005 @ 12:40 pm
Nice, this must be about the best preview plugin there is at the moment. But still,
<div id="commentPreview"></div>isn’t very semantic…Comment by Lucas — June 2, 2005 @ 12:39 pm
What? You mean it doesn’t work when the function I tell you to use doesn’t exist? Whoops…..details detail details……
Indeed. I would never write a funciton that uses dashes as a delimeter….too many naming conventions going through my head obviously. I just changed the wiki to reflect the actual function name. Thanks for the info.
Comment by Dave G — June 2, 2005 @ 1:43 pm
The installation instructions say to put into /wp-admin/edit-form.php OR /wp-admin/edit-form-advanced. Is there a specific place in these files to place the code? Could it be put into both files?
Comment by Dave G — June 2, 2005 @ 1:52 pm
An idea for an improvement would be if you could get it to preview restecting the text settings in the CSS for the active theme. That way you don’t just see a preview but you see it exactly how it would be formatted in your blog theme.
Comment by Lucas — June 2, 2005 @ 2:01 pm
Good question, Dave. The function call can be put anywhere in either of the files and it will work. Where you put it will change where it displays at though. For both files, I’d recommend placing it as the last line in in the file as this will cause it to display right underneath the buttons you use to save the post and whatnot. If you want it to display higher up, just try moving it around and see where it ends up.
It can be placed into both files. Only one form will be used at a time, but it won’t cause any problems to have it in both.
I’ll change the wiki to explain this as well.
Thank you for the suggestion as well.
Comment by SapiensBryan — June 2, 2005 @ 3:42 pm
Haha…LoL. I guessed too many naming conventions going through your head too. Anyway, I should have given more information about the function name.
The plugin works great. Love it so much.
Comment by Vamsi — August 7, 2005 @ 12:43 am
I was only thinking of the live comment plugin. That was more helpful for blog visitos and this is more helpful to the blog owner. Thanks for the great work.
Happy Friendship Day!
Comment by Lefebvre — October 14, 2005 @ 8:52 pm
I would love if everybody could see the post preview.
Is there a plugin for it? Post Live Preview for the readers?
Comment by Lucas — October 15, 2005 @ 12:52 pm
Post preview for the readers? You lost me….there is a live preview for comments (see link above), but I’m not exactly sure why you would want readers to preview posts before they’ve been published. Authors would of course want to do so, but they have access to the WP control panel, so of course they can see the output from Live Post Preview. You lost me.
Comment by Matthias — March 6, 2006 @ 4:57 pm
Hi!
Nice Plugin, thank you. But i had a big big problem. First if i have installed it, i could not write a new comment, because i do not see my comment-form. (i could see old entries, but i can not do new entries). SO i have deactivate the plugin in the admin panel, but i also do not see my comment from to write comments. So what sould i do, that i could write new comment entries?
please help
Comment by Lucas — March 7, 2006 @ 10:37 am
What version of WP are you using?
I never updated it for 2.x since WP already has an excellent preview built in now. Given, it’s not updated as you type, but it’s pretty quick to just hit the “save and continue button”, and the preview is much better since it shows exactly how it will look on your site. At any rate, I never bothered to even see if it would still work with 2.0 (it seems like when I was reading about it, they changed some things that would break it, come to think of it).
Pingback by Los Blog’s de la pagina de UiDoS » Plugins para WordPress — December 23, 2006 @ 10:30 am
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by lapedrada.es.kz » Plugins para WordPress — January 23, 2007 @ 11:05 am
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Profesor Blog » Los Mejores Plugins Para Worpress — April 14, 2007 @ 5:36 am
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by » Enchula tu Blog,Plugins Para Worpress Información Tecnología Internet y Gadgets — July 13, 2007 @ 10:57 pm
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by La Mansion » Blog Archive » Plugins Wordpress — May 16, 2008 @ 2:27 pm
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by 282 plugins para WordPress (4ª parte de la L a la Q) | Pichicola.com — August 17, 2008 @ 6:27 pm
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by (Casi) todos los plugins para wordpress « Camyna.com — August 30, 2008 @ 2:09 am
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Plugins Para WordPress | Mega Post — December 21, 2008 @ 3:12 pm
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Inicio « mediasur.cl — February 12, 2009 @ 2:17 am
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Inicio « mediasur.cl — February 12, 2009 @ 2:17 am
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Inicio « mediasur.cl — February 12, 2009 @ 2:17 am
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Plugins para Wordpress. | Puydi Publicidad 100% efectiva — February 27, 2009 @ 5:26 pm
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by webmaster esmuy.com » Blog Archive » Plugins para Wordpress — May 21, 2009 @ 10:24 am
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by webmaster esmuy.com » Blog Archive » Plugins para Wordpress — May 21, 2009 @ 10:24 am
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Gran colección de plugins Wordpress -- Mundo Inteligente — May 26, 2009 @ 3:36 pm
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Plugins para wordpress | UrbanBlog — May 30, 2009 @ 10:44 am
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Oloroko » Lista de Plugins para Wordpress — July 25, 2009 @ 5:01 pm
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Plugins para Wordpress para usar con blespot.com | Scorts Cd Juarez — October 25, 2009 @ 8:10 pm
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Plugins para Wordpress para usar con blespot.comPlugins para Wordpress | Blespot.com Blogs — October 25, 2009 @ 8:17 pm
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Oloroko Blog – Lista de Plugins para Wordpress — November 10, 2009 @ 4:10 pm
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by WwW.UrbaNicaNo.Net || Tu Web De Reggaetón & Eventos Urbanos » Plugins para Wordpress — November 29, 2009 @ 6:06 pm
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Plugins para Wordpress de la A a la Z. | La Fanega — January 13, 2010 @ 5:04 am
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Descargar Plugins para Wordpress | ZonaFull.Org — January 13, 2010 @ 8:44 pm
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]
Pingback by Plugins para Wordpress « — March 2, 2010 @ 6:49 pm
[...] Live Post Preview: Añade una vista previa al formulario de nuevas entradas. [...]